forked from OSchip/llvm-project
parent
a6fee9d6d5
commit
423909da4d
|
@ -4,7 +4,7 @@
|
|||
; Check by running globaldce, which will remove the constant if there are
|
||||
; no references to it!
|
||||
;
|
||||
; RUN: as < %s | opt -globaldce | dis | grep-not constant
|
||||
; RUN: as < %s | opt -globaldce | dis | not grep constant
|
||||
;
|
||||
|
||||
%v1 = internal constant int 5
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
; This test checks to make sure that constant exprs fold in some simple situations
|
||||
|
||||
; RUN: as < %s | dis | grep-not cast
|
||||
; RUN: as < %s | dis | not grep cast
|
||||
|
||||
%A = global int* cast (sbyte* null to int*) ; Cast null -> fold
|
||||
%B = global int** cast (int** %A to int**) ; Cast to same type -> fold
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
; RUN: echo "implementation internal int %foo() { ret int 7 }" | as > Output/%s.1.bc
|
||||
; RUN: as < %s > Output/%s.2.bc
|
||||
; RUN: link Output/%s.[12].bc | dis | grep 'internal' | grep-not '%foo('
|
||||
; RUN: link Output/%s.[12].bc | dis | grep 'internal' | not grep '%foo('
|
||||
|
||||
implementation
|
||||
declare int %foo()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; Instcombine was missing a test that caused it to make illegal transformations
|
||||
; sometimes. In this case, it transforms the sub into an add:
|
||||
; RUN: echo foo
|
||||
; RUN: as < %s | opt -instcombine | dis | grep-not add
|
||||
; RUN: as < %s | opt -instcombine | dis | not grep add
|
||||
;
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; RUN: as < %s | opt -instcombine | dis | grep-not add
|
||||
; RUN: as < %s | opt -instcombine | dis | not grep add
|
||||
|
||||
int %test(int %A) {
|
||||
%A.neg = sub int 0, %A
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
; This also tests that a subtract with a constant is properly converted
|
||||
; to a add w/negative constant
|
||||
|
||||
; RUN: as < %s | opt -instcombine -die | dis | grep-not add
|
||||
; RUN: as < %s | opt -instcombine -die | dis | not grep add
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; This test makes sure that these instructions are properly eliminated.
|
||||
;
|
||||
|
||||
; RUN: as < %s | opt -instcombine | dis | grep-not and
|
||||
; RUN: as < %s | opt -instcombine | dis | not grep and
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; RUN: as < %s | opt -instcombine -die | dis | grep call | grep-not cast
|
||||
; RUN: as < %s | opt -instcombine -die | dis | grep call | not grep cast
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
; slow. Might it be better to make there be an instcombine prepass before
|
||||
; level raise that takes care of the obvious stuff?
|
||||
|
||||
; RUN: as < %s | opt -instcombine | dis | grep-not cast
|
||||
; RUN: as < %s | opt -instcombine | dis | not grep cast
|
||||
|
||||
bool %test1(int %X) {
|
||||
%A = cast int %X to uint
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
; Tests to make sure elimination of casts is working correctly
|
||||
|
||||
; RUN: as < %s | opt -instcombine -die | dis | grep '%c' | grep-not cast
|
||||
; RUN: as < %s | opt -instcombine -die | dis | grep '%c' | not grep cast
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; This test makes sure that div instructions are properly eliminated.
|
||||
;
|
||||
|
||||
; RUN: as < %s | opt -instcombine | dis | grep-not div
|
||||
; RUN: as < %s | opt -instcombine | dis | not grep div
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
; The %A getelementptr instruction should be eliminated here
|
||||
|
||||
; RUN: as < %s | opt -instcombine -die | dis | grep getelementptr | grep-not '%A '
|
||||
; RUN: as < %s | opt -instcombine -die | dis | grep getelementptr | not grep '%A '
|
||||
|
||||
%Global = constant [10 x sbyte] c"helloworld"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; This test makes sure that these instructions are properly eliminated.
|
||||
;
|
||||
|
||||
; RUN: as < %s | opt -instcombine | dis | grep-not load
|
||||
; RUN: as < %s | opt -instcombine | dis | not grep load
|
||||
|
||||
%X = constant int 42
|
||||
%Y = constant [2 x { int, float }] [ { int, float } { int 12, float 1.0 },
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; This test makes sure that mul instructions are properly eliminated.
|
||||
;
|
||||
|
||||
; RUN: as < %s | opt -instcombine | dis | grep-not mul
|
||||
; RUN: as < %s | opt -instcombine | dis | not grep mul
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; This test makes sure that these instructions are properly eliminated.
|
||||
;
|
||||
|
||||
; RUN: as < %s | opt -instcombine -die | dis | grep-not xor
|
||||
; RUN: as < %s | opt -instcombine -die | dis | not grep xor
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; This test makes sure that these instructions are properly eliminated.
|
||||
;
|
||||
|
||||
; RUN: as < %s | opt -instcombine | dis | grep -v '%OROK = or' | grep-not 'or '
|
||||
; RUN: as < %s | opt -instcombine | dis | grep -v '%OROK = or' | not grep 'or '
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; This test makes sure that these instructions are properly eliminated.
|
||||
;
|
||||
|
||||
; RUN: as < %s | opt -instcombine -die | dis | grep-not phi
|
||||
; RUN: as < %s | opt -instcombine -die | dis | not grep phi
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
;
|
||||
; Equivalent to: http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01786.html
|
||||
|
||||
; RUN: as < %s | opt -instcombine | dis | grep-not 'call double %pow'
|
||||
; RUN: as < %s | opt -instcombine | dis | not grep 'call double %pow'
|
||||
|
||||
declare double %pow(double, double)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; This test makes sure that these instructions are properly eliminated.
|
||||
;
|
||||
|
||||
; RUN: as < %s | opt -instcombine | dis | grep-not rem
|
||||
; RUN: as < %s | opt -instcombine | dis | not grep rem
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; This test makes sure that these instructions are properly eliminated.
|
||||
;
|
||||
|
||||
; RUN: as < %s | opt -instcombine | dis | grep-not set
|
||||
; RUN: as < %s | opt -instcombine | dis | not grep set
|
||||
|
||||
%X = uninitialized global int
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
; into equivalent setne,eq instructions.
|
||||
;
|
||||
|
||||
; RUN: as < %s | opt -instcombine | dis | grep -v seteq | grep -v setne | grep-not set
|
||||
; RUN: as < %s | opt -instcombine | dis | grep -v seteq | grep -v setne | not grep set
|
||||
|
||||
bool "test1"(uint %A) {
|
||||
%B = setge uint %A, 1 ; setne %A, 0
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; This test makes sure that these instructions are properly eliminated.
|
||||
;
|
||||
|
||||
; RUN: as < %s | opt -instcombine | dis | grep-not sh
|
||||
; RUN: as < %s | opt -instcombine | dis | not grep sh
|
||||
|
||||
implementation
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
; This test makes sure that these instructions are properly eliminated.
|
||||
;
|
||||
|
||||
; RUN: as < %s | opt -instcombine -die | dis | grep sub | grep-not -v 'sub int %Cok, %Bok'
|
||||
; RUN: as < %s | opt -instcombine -die | dis | grep sub | not grep -v 'sub int %Cok, %Bok'
|
||||
|
||||
implementation
|
||||
|
||||
|
|
Loading…
Reference in New Issue