mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Convert scripts from using explicit control flow to use the new grep-not script
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6955 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
35f7ba9120
commit
c6cab24151
@ -1,10 +1,7 @@
|
|||||||
; Instcombine was missing a test that caused it to make illegal transformations
|
; Instcombine was missing a test that caused it to make illegal transformations
|
||||||
; sometimes. In this case, it transforms the sub into an add:
|
; sometimes. In this case, it transforms the sub into an add:
|
||||||
; RUN: echo foo
|
; RUN: echo foo
|
||||||
; RUN: if as < %s | opt -instcombine | dis | grep add
|
; RUN: as < %s | opt -instcombine | dis | grep-not add
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
; RUN: if as < %s | opt -instcombine | dis | grep add
|
; RUN: as < %s | opt -instcombine | dis | grep-not add
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
int %test(int %A) {
|
int %test(int %A) {
|
||||||
%A.neg = sub int 0, %A
|
%A.neg = sub int 0, %A
|
||||||
|
@ -3,10 +3,7 @@
|
|||||||
; This also tests that a subtract with a constant is properly converted
|
; This also tests that a subtract with a constant is properly converted
|
||||||
; to a add w/negative constant
|
; to a add w/negative constant
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine -die | dis | grep add
|
; RUN: as < %s | opt -instcombine -die | dis | grep-not add
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
; This test makes sure that these instructions are properly eliminated.
|
; This test makes sure that these instructions are properly eliminated.
|
||||||
;
|
;
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine | dis | grep and
|
; RUN: as < %s | opt -instcombine | dis | grep-not and
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
; RUN: if as < %s | opt -instcombine -die | dis | grep call | grep cast
|
; RUN: as < %s | opt -instcombine -die | dis | grep call | grep-not cast
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -3,10 +3,7 @@
|
|||||||
; slow. Might it be better to make there be an instcombine prepass before
|
; slow. Might it be better to make there be an instcombine prepass before
|
||||||
; level raise that takes care of the obvious stuff?
|
; level raise that takes care of the obvious stuff?
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine | dis | grep cast
|
; RUN: as < %s | opt -instcombine | dis | grep-not cast
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
bool %test1(int %X) {
|
bool %test1(int %X) {
|
||||||
%A = cast int %X to uint
|
%A = cast int %X to uint
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
; Tests to make sure elimination of casts is working correctly
|
; Tests to make sure elimination of casts is working correctly
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine -die | dis | grep '%c' | grep cast
|
; RUN: as < %s | opt -instcombine -die | dis | grep '%c' | grep-not cast
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
; This test makes sure that div instructions are properly eliminated.
|
; This test makes sure that div instructions are properly eliminated.
|
||||||
;
|
;
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine | dis | grep div
|
; RUN: as < %s | opt -instcombine | dis | grep-not div
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
; The %A getelementptr instruction should be eliminated here
|
; The %A getelementptr instruction should be eliminated here
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine -die | dis | grep getelementptr | grep '%A '
|
; RUN: as < %s | opt -instcombine -die | dis | grep getelementptr | grep-not '%A '
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
%Global = constant [10 x sbyte] c"helloworld"
|
%Global = constant [10 x sbyte] c"helloworld"
|
||||||
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
; This test makes sure that these instructions are properly eliminated.
|
; This test makes sure that these instructions are properly eliminated.
|
||||||
;
|
;
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine | dis | grep load
|
; RUN: as < %s | opt -instcombine | dis | grep-not load
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
%X = constant int 42
|
%X = constant int 42
|
||||||
%Y = constant [2 x { int, float }] [ { int, float } { int 12, float 1.0 },
|
%Y = constant [2 x { int, float }] [ { int, float } { int 12, float 1.0 },
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
; This test makes sure that these instructions are properly eliminated.
|
; This test makes sure that these instructions are properly eliminated.
|
||||||
;
|
;
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine -die | dis | grep xor
|
; RUN: as < %s | opt -instcombine -die | dis | grep-not xor
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
; This test makes sure that these instructions are properly eliminated.
|
; This test makes sure that these instructions are properly eliminated.
|
||||||
;
|
;
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine | dis | grep -v '%OROK = or' | grep or\
|
; RUN: as < %s | opt -instcombine | dis | grep -v '%OROK = or' | grep-not 'or '
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
; This test makes sure that these instructions are properly eliminated.
|
; This test makes sure that these instructions are properly eliminated.
|
||||||
;
|
;
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine -die | dis | grep phi
|
; RUN: as < %s | opt -instcombine -die | dis | grep-not phi
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -2,10 +2,7 @@
|
|||||||
;
|
;
|
||||||
; Equivalent to: http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01786.html
|
; Equivalent to: http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01786.html
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine | dis | grep 'call double %pow'
|
; RUN: as < %s | opt -instcombine | dis | grep-not 'call double %pow'
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
declare double %pow(double, double)
|
declare double %pow(double, double)
|
||||||
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
; This test makes sure that these instructions are properly eliminated.
|
; This test makes sure that these instructions are properly eliminated.
|
||||||
;
|
;
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine | dis | grep rem
|
; RUN: as < %s | opt -instcombine | dis | grep-not rem
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
; This test makes sure that these instructions are properly eliminated.
|
; This test makes sure that these instructions are properly eliminated.
|
||||||
;
|
;
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine | dis | grep set
|
; RUN: as < %s | opt -instcombine | dis | grep-not set
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
%X = uninitialized global int
|
%X = uninitialized global int
|
||||||
|
|
||||||
|
@ -3,10 +3,7 @@
|
|||||||
; into equivalent setne,eq instructions.
|
; into equivalent setne,eq instructions.
|
||||||
;
|
;
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine | dis | grep -v seteq | grep -v setne | grep set
|
; RUN: as < %s | opt -instcombine | dis | grep -v seteq | grep -v setne | grep-not set
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
bool "test1"(uint %A) {
|
bool "test1"(uint %A) {
|
||||||
%B = setge uint %A, 1 ; setne %A, 0
|
%B = setge uint %A, 1 ; setne %A, 0
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
; This test makes sure that these instructions are properly eliminated.
|
; This test makes sure that these instructions are properly eliminated.
|
||||||
;
|
;
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine | dis | grep sh
|
; RUN: as < %s | opt -instcombine | dis | grep-not sh
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
; This test makes sure that these instructions are properly eliminated.
|
; This test makes sure that these instructions are properly eliminated.
|
||||||
;
|
;
|
||||||
|
|
||||||
; RUN: if as < %s | opt -instcombine -die | dis | grep sub | grep -v 'sub int %Cok, %Bok'
|
; RUN: as < %s | opt -instcombine -die | dis | grep sub | grep-not -v 'sub int %Cok, %Bok'
|
||||||
; RUN: then exit 1
|
|
||||||
; RUN: else exit 0
|
|
||||||
; RUN: fi
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user