; is performed. It is not legal to delete the second load instruction because
; the value computed by the first load instruction is changed by the store.
-; RUN: as < %s | opt -load-vn -gcse -instcombine | dis | grep DONOTREMOVE
+; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | grep DONOTREMOVE
int %test() {
%A = alloca int
-; RUN: as < %s | opt -basicaa -aa-eval -disable-output
+; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
; Test for a bug in BasicAA which caused a crash when querying equality of P1&P2
void %test({[2 x int],[2 x int]}* %A, long %X, long %Y) {
%P1 = getelementptr {[2 x int],[2 x int]}* %A, long 0, ubyte 0, long %X
-; RUN: as < %s | opt -load-vn -gcse -instcombine | dis | grep sub
+; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | grep sub
; BasicAA was incorrectly concluding that P1 and P2 didn't conflict!
-; RUN: as < %s | opt -basicaa -aa-eval -disable-output
+; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
; Test for a bug in BasicAA which caused a crash when querying equality of P1&P2
void %test([17 x ushort]* %mask_bits) {
%P1 = getelementptr [17 x ushort]* %mask_bits, long 0, long 0
-; RUN: as < %s | opt -licm -disable-output
+; RUN: llvm-as < %s | opt -licm -disable-output
%struct..apr_array_header_t = type { int*, int, int, int, sbyte* }
%struct..apr_table_t = type { %struct..apr_array_header_t, uint, [32 x int], [32 x int] }
-; RUN: as < %s | opt -basicaa -aa-eval -disable-output
+; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
int %MTConcat([3 x int]* %a.1) {
%tmp.961 = getelementptr [3 x int]* %a.1, long 0, long 4
-; RUN: as < %s | opt -basicaa -aa-eval -disable-output
+; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
%struct..RefPoint = type { int, { uint, ushort, ushort } }
%struct..RefRect = type { %struct..RefPoint, %struct..RefPoint }
; This testcase tests for various features the basicaa test should be able to
; determine, as noted in the comments.
-; RUN: as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | dis | not grep REMOVE
+; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | llvm-dis | not grep REMOVE
%Global = external global { int }
; disambiguating some obvious cases. All loads should be removable in
; this testcase.
-; RUN: as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | dis | not grep load
+; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | llvm-dis | not grep load
%A = global int 7
%B = global int 8
; two pointers, then the load should be hoisted, and the store sunk. Thus
; the loop becomes empty and can be deleted by ADCE.
-; RUN: as < %s | opt -basicaa -licm --adce | dis | not grep Loop
+; RUN: llvm-as < %s | opt -basicaa -licm --adce | llvm-dis | not grep Loop
%A = global int 7
%B = global int 8
; This testcase ensures that redundant loads are eliminated when they should
; be. All RL variables (redundant loads) should be eliminated.
;
-; RUN: as < %s | opt -load-vn -gcse | dis | not grep %RL
+; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | not grep %RL
;
int "test1"(int* %P) {
%A = load int* %P
-; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | dis | grep sub
+; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | grep sub
int %test(int* %P) {
%X = volatile load int* %P
; This testcase ensures that redundant loads are preserved when they are not
; allowed to be eliminated.
-; RUN: as < %s | opt -load-vn -gcse | dis | grep sub
+; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | grep sub
;
int %test1(int* %P) {
%A = load int* %P
; Inlining used to break PHI nodes. This tests that they are correctly updated
; when a node is split around the call instruction. The verifier caught the error.
;
-; RUN: as < %s | opt -inline
+; RUN: llvm-as < %s | opt -inline
;
implementation
;
; Fixed by adding new arguments to ConstantFoldTerminator
;
-; RUN: as < %s | opt -constprop
+; RUN: llvm-as < %s | opt -constprop
implementation
-; RUN: as < %s | opt -adce
+; RUN: llvm-as < %s | opt -adce
implementation
; It is illegal to remove BB1 because it will mess up the PHI node!
;
-; RUN: as < %s | opt -adce | dis | grep BB1
+; RUN: llvm-as < %s | opt -adce | llvm-dis | grep BB1
int "test"(bool %C, int %A, int %B) {
; removed even though there were uses still around. Now the uses are filled
; in with a dummy value before the PHI is deleted.
;
-; RUN: as < %s | opt -adce
+; RUN: llvm-as < %s | opt -adce
%node_t = type { double*, %node_t*, %node_t**, double**, double*, int, int }
; This testcase is a distilled form of: 2002-05-28-Crash.ll
-; RUN: as < %s | opt -adce
+; RUN: llvm-as < %s | opt -adce
float "test"(int %i) {
%F = cast int %i to float ; This BB is not dead
; return !s;
;}
;
-; RUN: as < %s | opt -adce
+; RUN: llvm-as < %s | opt -adce
implementation ; Functions:
; block in this function, it would work fine, but that would be the part we
; have to fix now, wouldn't it....
;
-; RUN: as < %s | opt -adce
+; RUN: llvm-as < %s | opt -adce
void %foo(sbyte* %reg5481) {
%cast611 = cast sbyte* %reg5481 to sbyte** ; <sbyte**> [#uses=1]
; This testcase was extracted from the gzip SPEC benchmark
;
-; RUN: as < %s | opt -adce
+; RUN: llvm-as < %s | opt -adce
%bk = external global uint ; <uint*> [#uses=2]
%hufts = external global uint ; <uint*> [#uses=1]
; Testcase reduced from 197.parser by bugpoint
-; RUN: as < %s | opt -adce
+; RUN: llvm-as < %s | opt -adce
implementation ; Functions:
void %conjunction_prune() {
; entries for it's postdominator. But I think this can only happen when the
; PHI node is dead, so we just avoid patching up dead PHI nodes.
-; RUN: as < %s | opt -adce
+; RUN: llvm-as < %s | opt -adce
target endian = little
target pointersize = 32
-; RUN: as < %s | opt -adce -disable-output
+; RUN: llvm-as < %s | opt -adce -disable-output
%G = external global int*
implementation ; Functions:
-; RUN: as < %s | opt -adce -disable-output
+; RUN: llvm-as < %s | opt -adce -disable-output
target endian = little
target pointersize = 32
-; RUN: as < %s | opt -adce -simplifycfg | dis | not grep then:
+; RUN: llvm-as < %s | opt -adce -simplifycfg | llvm-dis | not grep then:
void %dead_test8(int* %data.1, int %idx.1) {
entry: ; No predecessors!
-; RUN: as < %s | opt -adce -disable-output
+; RUN: llvm-as < %s | opt -adce -disable-output
implementation ; Functions:
; This is the test case taken from Appel's book that illustrates a hard case
; that SCCP gets right, and when followed by ADCE, is completely eliminated
;
-; RUN: as < %s | opt -sccp -adce -simplifycfg | dis | not grep br
+; RUN: llvm-as < %s | opt -sccp -adce -simplifycfg | llvm-dis | not grep br
int "test function"(int %i0, int %j0) {
BB1:
-; RUN: as < %s | opt -adce -simplifycfg | dis
+; RUN: llvm-as < %s | opt -adce -simplifycfg | llvm-dis
int "Test"(int %A, int %B) {
BB1:
-; RUN: as < %s | opt -adce -simplifycfg | dis
+; RUN: llvm-as < %s | opt -adce -simplifycfg | llvm-dis
%FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint }
%spec_fd_t = type { int, int, int, ubyte* }
-; RUN: as < %s | opt -adce -simplifycfg | dis
+; RUN: llvm-as < %s | opt -adce -simplifycfg | llvm-dis
%FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint }
%spec_fd_t = type { int, int, int, ubyte* }
; is performed. It is not legal to delete the second load instruction because
; the value computed by the first load instruction is changed by the store.
-; RUN: as < %s | opt -load-vn -gcse -instcombine | dis | grep DONOTREMOVE
+; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | grep DONOTREMOVE
int %test() {
%A = alloca int
-; RUN: as < %s | opt -basicaa -aa-eval -disable-output
+; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
; Test for a bug in BasicAA which caused a crash when querying equality of P1&P2
void %test({[2 x int],[2 x int]}* %A, long %X, long %Y) {
%P1 = getelementptr {[2 x int],[2 x int]}* %A, long 0, ubyte 0, long %X
-; RUN: as < %s | opt -load-vn -gcse -instcombine | dis | grep sub
+; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | grep sub
; BasicAA was incorrectly concluding that P1 and P2 didn't conflict!
-; RUN: as < %s | opt -basicaa -aa-eval -disable-output
+; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
; Test for a bug in BasicAA which caused a crash when querying equality of P1&P2
void %test([17 x ushort]* %mask_bits) {
%P1 = getelementptr [17 x ushort]* %mask_bits, long 0, long 0
-; RUN: as < %s | opt -licm -disable-output
+; RUN: llvm-as < %s | opt -licm -disable-output
%struct..apr_array_header_t = type { int*, int, int, int, sbyte* }
%struct..apr_table_t = type { %struct..apr_array_header_t, uint, [32 x int], [32 x int] }
-; RUN: as < %s | opt -basicaa -aa-eval -disable-output
+; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
int %MTConcat([3 x int]* %a.1) {
%tmp.961 = getelementptr [3 x int]* %a.1, long 0, long 4
-; RUN: as < %s | opt -basicaa -aa-eval -disable-output
+; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
%struct..RefPoint = type { int, { uint, ushort, ushort } }
%struct..RefRect = type { %struct..RefPoint, %struct..RefPoint }
; This testcase tests for various features the basicaa test should be able to
; determine, as noted in the comments.
-; RUN: as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | dis | not grep REMOVE
+; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | llvm-dis | not grep REMOVE
%Global = external global { int }
; disambiguating some obvious cases. All loads should be removable in
; this testcase.
-; RUN: as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | dis | not grep load
+; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | llvm-dis | not grep load
%A = global int 7
%B = global int 8
; two pointers, then the load should be hoisted, and the store sunk. Thus
; the loop becomes empty and can be deleted by ADCE.
-; RUN: as < %s | opt -basicaa -licm --adce | dis | not grep Loop
+; RUN: llvm-as < %s | opt -basicaa -licm --adce | llvm-dis | not grep Loop
%A = global int 7
%B = global int 8
; Make sure that the constant propogator doesn't divide by zero!
;
-; RUN: as < %s | opt -constprop
+; RUN: llvm-as < %s | opt -constprop
;
int "test"() {
; Fix #2: The unary not instruction now no longer exists. Change to xor.
-; RUN: as < %s | opt -constprop | dis | not grep 'int 0'
+; RUN: llvm-as < %s | opt -constprop | llvm-dis | not grep 'int 0'
int "test1"() {
%R = xor int 123, -1
; SetCC on boolean values was not implemented!
-; RUN: as < %s | opt -constprop -die | dis | not grep 'set'
+; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep 'set'
bool "test1"() {
%A = setle bool true, false
; Make sure that the constant propagator doesn't cause a sigfpe
;
-; RUN: as < %s | opt -constprop
+; RUN: llvm-as < %s | opt -constprop
;
int "test"() {
; This is a basic sanity check for constant propogation. The add instruction
; should be eliminated.
-; RUN: as < %s | opt -constprop -die | dis | not grep add
+; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep add
int %test(bool %B) {
br bool %B, label %BB1, label %BB2
; Ensure constant propogation of logical instructions is working correctly.
-; RUN: as < %s | opt -constprop -die | dis | not ggrep -E 'and|or|xor'
+; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not ggrep -E 'and|or|xor'
int "test1"() { %R = and int 4,1234 ret int %R }
; Ensure constant propogation of 'not' instructions is working correctly.
-; RUN: as < %s | opt -constprop -die | dis | not grep xor
+; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep xor
int "test1"() {
%R = xor int 4, -1
; This is a basic sanity check for constant propogation. The add instruction
; should be eliminated.
-; RUN: as < %s | opt -constprop -die | dis | not grep phi
+; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep phi
int %test(bool %B) {
BB0:
; Ensure constant propagation of remainder instructions is working correctly.
-; RUN: as < %s | opt -constprop -die | dis | not grep rem
+; RUN: llvm-as < %s | opt -constprop -die | llvm-dis | not grep rem
int %test1() {
%R = rem int 4, 3
-; RUN: as < %s | opt -constmerge > /dev/null
+; RUN: llvm-as < %s | opt -constmerge > /dev/null
%foo = internal constant {int} {int 7}
%bar = internal constant {int} {int 7}
-; RUN: as < %s | opt -cee
+; RUN: llvm-as < %s | opt -cee
implementation
; }
; }
;
-; RUN: as < %s | opt -cee -simplifycfg | dis | not grep bb3
+; RUN: llvm-as < %s | opt -cee -simplifycfg | llvm-dis | not grep bb3
implementation
declare void %bar()
; Testcase distilled from bisort where we tried to perform branch target
; forwarding where it was not safe.
-; RUN: as < %s | opt -cee
+; RUN: llvm-as < %s | opt -cee
;
%HANDLE = type { int, %HANDLE*, %HANDLE* }
%struct.node = type { int, %HANDLE*, %HANDLE* }
-; RUN: as < %s | opt -cee
+; RUN: llvm-as < %s | opt -cee
;
; The 'cee' pass is breaking SSA form when it blindly forwards the branch from
; Eq to branch to "Forwarded" instead.
-; RUN: as < %s | opt -cee
+; RUN: llvm-as < %s | opt -cee
;
; This testcase causes an assertion error.
;
; Test to make sure that SSA is correctly updated
-; RUN: as < %s | opt -cee
+; RUN: llvm-as < %s | opt -cee
;
implementation ; Functions:
; Simple test to make sure dominators are updated properly
-; RUN: as < %s | opt -cee
+; RUN: llvm-as < %s | opt -cee
implementation ; Functions:
-; RUN: as < %s | opt -cee -constprop -instcombine -dce | dis | not grep 'REMOVE'
+; RUN: llvm-as < %s | opt -cee -constprop -instcombine -dce | llvm-dis | not grep 'REMOVE'
int %test1(int %A) {
%cond = seteq int %A, 40
-; RUN: as < %s | opt -cee -simplifycfg | dis | not grep 'REMOVE'
+; RUN: llvm-as < %s | opt -cee -simplifycfg | llvm-dis | not grep 'REMOVE'
implementation
;
; Note that this is a "feature" test, not a correctness test.
;
-; RUN: as < %s | opt -cee -simplifycfg | dis | not grep cond213
+; RUN: llvm-as < %s | opt -cee -simplifycfg | llvm-dis | not grep cond213
;
implementation ; Functions:
; a load or store of a pointer indicates that the pointer is not null.
; Any succeeding uses of the pointer should get this info
-; RUN: as < %s | opt -cee -instcombine -simplifycfg | dis | not grep br
+; RUN: llvm-as < %s | opt -cee -instcombine -simplifycfg | llvm-dis | not grep br
implementation ; Functions:
;
; This should eliminate all BB's except BB0, BB9, BB10
;
-; RUN: as < %s | opt -cee -instcombine -simplifycfg | dis | not grep 'bb[2-8]'
+; RUN: llvm-as < %s | opt -cee -instcombine -simplifycfg | llvm-dis | not grep 'bb[2-8]'
implementation ; Functions:
-; RUN: as < %s | opt -deadargelim | dis | not grep DEADARG
+; RUN: llvm-as < %s | opt -deadargelim | llvm-dis | not grep DEADARG
implementation
-; RUN: as < %s | opt -f -lowerrefs -o Output/%s.bc
+; RUN: llvm-as < %s | opt -f -lowerrefs -o Output/%s.bc
;
%Flat_struct = type { sbyte, float }
%Flat_t = type { sbyte, float }
; Test that: extern int X[] and int X[] = { 1, 2, 3, 4 } are resolved
; correctly.
;
-; RUN: as < %s | opt -funcresolve | dis | not grep external
+; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | not grep external
%X = external global [0 x int]
%X = global [4 x int] [ int 1, int 2, int 3, int 4 ]
; Test that: extern int X[] and int X[] = { 1, 2, 3, 4 } are resolved
; correctly. This doesn't have constantexprs
;
-; RUN: as < %s | opt -funcresolve | dis | not grep external
+; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | not grep external
;
%X = external global [0 x int]
-; RUN: as < %s | opt -funcresolve -funcresolve | dis | not grep declare
+; RUN: llvm-as < %s | opt -funcresolve -funcresolve | llvm-dis | not grep declare
declare void %qsortg(sbyte*, int, int)
;
-; RUN: as < %s | opt -funcresolve -instcombine | dis | not grep '\.\.\.'
+; RUN: llvm-as < %s | opt -funcresolve -instcombine | llvm-dis | not grep '\.\.\.'
declare int %foo(...)
declare int %foo(int)
-; RUN: as < %s | opt -funcresolve -disable-output 2>&1 | not grep WARNING
+; RUN: llvm-as < %s | opt -funcresolve -disable-output 2>&1 | not grep WARNING
%__popcount_tab = external constant [0 x ubyte]
%__popcount_tab = constant [4 x ubyte] c"\00\01\01\02"
-; RUN: as < %s | opt -funcresolve -disable-output
+; RUN: llvm-as < %s | opt -funcresolve -disable-output
void %foo(int, int) {
ret void
-; RUN: as < %s | opt -funcresolve | dis | not grep declare
+; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | not grep declare
%Table = constant int(...)* %foo
-; RUN: as < %s | opt -funcresolve | dis | not grep declare
+; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | not grep declare
declare void %test(...)
-; RUN: as < %s | opt -funcresolve | dis | not grep foo
+; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | not grep foo
; The funcresolve pass was resolving the two foo's together in this test,
; adding a ConstantPointerRef to one of them. Then because of this
-; RUN: as < %s | opt -funcresolve -disable-output 2>&1 | not grep WARNING
+; RUN: llvm-as < %s | opt -funcresolve -disable-output 2>&1 | not grep WARNING
declare int %foo(int *%X)
declare int %foo(float *%X)
-; RUN: as < %s | opt -funcresolve -instcombine | dis | grep '\.\.\.' | not grep call
+; RUN: llvm-as < %s | opt -funcresolve -instcombine | llvm-dis | grep '\.\.\.' | not grep call
declare int %foo(...)
; This shows where the function is called with the prototype indicating a
; return type exists, but it really doesn't.
-; RUN: as < %s | opt -funcresolve -instcombine | dis | grep '\.\.\.' | not grep call
+; RUN: llvm-as < %s | opt -funcresolve -instcombine | llvm-dis | grep '\.\.\.' | not grep call
declare int %foo(...)
; This shows where the function is called with the prototype indicating a
; return type doesn't exists, but it really does.
;
-; RUN: as < %s | opt -funcresolve -instcombine | dis | grep '\.\.\.' | not grep call
+; RUN: llvm-as < %s | opt -funcresolve -instcombine | llvm-dis | grep '\.\.\.' | not grep call
declare void %foo(...)
-; RUN: as < %s | opt -funcresolve
+; RUN: llvm-as < %s | opt -funcresolve
declare int %read(...)
; This entire chain of computation should be optimized away, but
; wasn't because the two multiplies were not detected as being identical.
;
-; RUN: as < %s | opt -gcse -instcombine -dce | dis | not grep sub
+; RUN: llvm-as < %s | opt -gcse -instcombine -dce | llvm-dis | not grep sub
implementation ; Functions:
; This testcase shows a bug where an common subexpression exists, but there
; is no shared dominator block that the expression can be hoisted out to.
;
-; RUN: as < %s | opt -gcse | dis
+; RUN: llvm-as < %s | opt -gcse | llvm-dis
int "test"(int %X, int %Y) {
%Z = add int %X, %Y
; This testcase shows a bug where an common subexpression exists, but there
; is no shared dominator block that the expression can be hoisted out to.
;
-; RUN: as < %s | opt -load-vn -gcse | dis | not grep load
+; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | not grep load
int %test(int* %P) {
store int 5, int* %P
; Various test cases to ensure basic functionality is working for GCSE
-; RUN: as < %s | opt -gcse
+; RUN: llvm-as < %s | opt -gcse
implementation
-; RUN: as < %s | opt -globaldce
+; RUN: llvm-as < %s | opt -globaldce
;
implementation
-; RUN: as < %s | opt -globaldce
+; RUN: llvm-as < %s | opt -globaldce
;
%X = global void() * %func
implementation
; Make sure that functions are removed successfully if they are referred to by
; a global that is dead. Make sure any globals they refer to die as well.
-; RUN: as < %s | opt -globaldce | dis | not grep foo
+; RUN: llvm-as < %s | opt -globaldce | llvm-dis | not grep foo
%b = internal global int ()* %foo ;; Unused, kills %foo
; This testcase tests that a worklist is being used, and that globals can be
; removed if they are the subject of a constexpr and ConstantPointerRef
-; RUN: as < %s | opt -globaldce | dis | not grep global
+; RUN: llvm-as < %s | opt -globaldce | llvm-dis | not grep global
%t0 = internal global [4 x sbyte] c"foo\00"
%t1 = internal global [4 x sbyte] c"bar\00"
-; RUN: as < %s | opt -globaldce
+; RUN: llvm-as < %s | opt -globaldce
%foo = internal global int 7 ;; Should die when function %foo is killed
; distilled from 255.vortex
-; RUN: as < %s | opt -globaldce | dis | not grep testfunc
+; RUN: llvm-as < %s | opt -globaldce | llvm-dis | not grep testfunc
implementation
-; RUN: as < %s | opt -globaldce | dis | not grep global
+; RUN: llvm-as < %s | opt -globaldce | llvm-dis | not grep global
%X = uninitialized global int
%Y = internal global int 7
; Induction variable pass is doing bad things with pointer induction vars,
; trying to do arithmetic on them directly.
;
-; RUN: as < %s | opt -indvars
+; RUN: llvm-as < %s | opt -indvars
;
void %test(int %A, uint %S, sbyte* %S) {
; This is a test case for the expression analysis code, not really indvars.
; It was assuming any constant of int type was a ConstantInteger.
;
-; RUN: as < %s | opt -indvars
+; RUN: llvm-as < %s | opt -indvars
%X = global int 7
-; RUN: llvm-as < %s | opt -indvars | dis | grep indvar
+; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep indvar
int %test() {
br bool true, label %LoopHead, label %LoopHead
; This test ensures that alloca instructions in the entry block for an inlined
; function are moved to the top of the function they are inlined into.
;
-; RUN: as < %s | opt -inline | dis | grep -C 1 alloca | grep Entry:
+; RUN: llvm-as < %s | opt -inline | llvm-dis | grep -C 1 alloca | grep Entry:
int %func(int %i) {
%X = alloca int
-; RUN: as < %s | opt -inline -disable-output -print
+; RUN: llvm-as < %s | opt -inline -disable-output -print
int %func(int %i) {
ret int %i
; This test ensures that inlining an "empty" function does not destroy the CFG
;
-; RUN: as < %s | opt -inline | dis | not grep br
+; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep br
int %func(int %i) {
ret int %i
; This checks to ensure that the inline pass deletes functions if they get
; inlined into all of their callers.
-; RUN: as < %s | opt -inline | dis | not grep %reallysmall
+; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep %reallysmall
implementation
; Test that we can inline a simple function, turning the calls in it into invoke
; instructions
-; RUN: as < %s | opt -inline | dis | not grep 'call[^e]'
+; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep 'call[^e]'
declare void %might_throw()
; Test that if an invoked function is inlined, and if that function cannot
; throw, that the dead handler is now unreachable.
-; RUN: as < %s | opt -inline -simplifycfg | dis | not grep UnreachableExceptionHandler
+; RUN: llvm-as < %s | opt -inline -simplifycfg | llvm-dis | not grep UnreachableExceptionHandler
declare void %might_throw()
; Test that any rethrown exceptions in an inlined function are automatically
; turned into branches to the invoke destination.
-; RUN: as < %s | opt -inline | dis | not grep 'call void %llvm.unwind'
+; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep 'call void %llvm.unwind'
declare void %might_throw()
declare void %llvm.unwind()
; This testcase causes instcombine to hang.
;
-; RUN: as < %s | opt -instcombine
+; RUN: llvm-as < %s | opt -instcombine
implementation
; 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 | not grep add
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep add
;
; stayed on the worklist, as soon as it came back up to be processed, bad things
; happened, and opt asserted.
;
-; RUN: as < %s | opt -instcombine
+; RUN: llvm-as < %s | opt -instcombine
;
%.LC0 = internal global [21 x sbyte] c"hbMakeCodeLengths(1)\00" ; <[21 x sbyte]*> [#uses=1]
; This testcase is incorrectly getting completely eliminated. There should be
; SOME instruction named %c here, even if it's a bitwise and.
;
-; RUN: as < %s | opt -instcombine -die | dis | grep '%c'
+; RUN: llvm-as < %s | opt -instcombine -die | llvm-dis | grep '%c'
;
ulong %test3(ulong %A) {
%c1 = cast ulong %A to ubyte
-; RUN: as < %s | opt -instcombine
+; RUN: llvm-as < %s | opt -instcombine
%bob = type { int }
-; RUN: as < %s | opt -instcombine | dis | not grep add
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep add
int %test(int %A) {
%A.neg = sub int 0, %A
-; RUN: as < %s | opt -instcombine | dis | grep 4294967295
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 4294967295
ulong %test(ulong %Val) {
%tmp.3 = cast ulong %Val to uint ; <uint> [#uses=1]
-; RUN: as < %s | opt -instcombine -disable-output
+; RUN: llvm-as < %s | opt -instcombine -disable-output
%X = global int 5
long %test() {
; because it things that the constant value is a not expression... and
; constantly inverts the branch back and forth.
;
-; RUN: as < %s | opt -instcombine -disable-output
+; RUN: llvm-as < %s | opt -instcombine -disable-output
ubyte %test19(bool %c) {
br bool true, label %True, label %False
; This is a bug in the VMcode library, not instcombine, it's just convenient
; to expose it here.
-; RUN: as < %s | opt -instcombine -disable-output
+; RUN: llvm-as < %s | opt -instcombine -disable-output
%A = global int 1
%B = global int 2
; should pass through the optimizer without failure.
;
; Extra code:
-; RUN: as < %s | opt -instcombine
+; RUN: llvm-as < %s | opt -instcombine
;
target endian = little
; This testcase can be simplified by "realizing" that alloca can never return
; null.
-; RUN: as < %s | opt -instcombine -simplifycfg | dis | not grep 'br '
+; RUN: llvm-as < %s | opt -instcombine -simplifycfg | llvm-dis | not grep 'br '
implementation ; Functions:
-; RUN: as < %s | opt -instcombine | dis | grep load
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep load
void %test(int* %P) {
%X = volatile load int* %P ; Dead but not deletable!
ret void
; This test makes sure that add instructions are properly eliminated.
-; RUN: as < %s | opt -instcombine -die | dis | grep -v OK | not grep add
+; RUN: llvm-as < %s | opt -instcombine -die | llvm-dis | grep -v OK | not grep add
implementation
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: as < %s | opt -instcombine | dis | not grep and
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep and
implementation
-; RUN: as < %s | opt -instcombine -die | dis | grep call | not grep cast
+; RUN: llvm-as < %s | opt -instcombine -die | llvm-dis | grep call | not grep cast
implementation
; 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 | not grep cast
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep cast
bool %test1(int %X) {
%A = cast int %X to uint
; Tests to make sure elimination of casts is working correctly
-; RUN: as < %s | opt -instcombine -die | dis | grep '%c' | not grep cast
+; RUN: llvm-as < %s | opt -instcombine -die | llvm-dis | grep '%c' | not grep cast
implementation
; This test makes sure that div instructions are properly eliminated.
;
-; RUN: as < %s | opt -instcombine | dis | not grep div
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep div
implementation
; The %A getelementptr instruction should be eliminated here
-; RUN: as < %s | opt -instcombine -die | dis | grep getelementptr | not grep '%A '
+; RUN: llvm-as < %s | opt -instcombine -die | llvm-dis | grep getelementptr | not grep '%A '
%Global = constant [10 x sbyte] c"helloworld"
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: as < %s | opt -instcombine | dis | not grep load
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep load
%X = constant int 42
%Y = constant [2 x { int, float }] [ { int, float } { int 12, float 1.0 },
; test that malloc's with a constant argument are promoted to array allocations
-; RUN: as < %s | opt -instcombine -die | dis | grep getelementptr
+; RUN: llvm-as < %s | opt -instcombine -die | llvm-dis | grep getelementptr
int* %test() {
%X = malloc int, uint 4
; This test makes sure that mul instructions are properly eliminated.
;
-; RUN: as < %s | opt -instcombine | dis | not grep mul
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep mul
implementation
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: as < %s | opt -instcombine -die | dis | not grep xor
+; RUN: llvm-as < %s | opt -instcombine -die | llvm-dis | not grep xor
implementation
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: as < %s | opt -instcombine | dis | grep -v xor | not grep 'or '
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep -v xor | not grep 'or '
implementation
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: as < %s | opt -instcombine -die | dis | not grep phi
+; RUN: llvm-as < %s | opt -instcombine -die | llvm-dis | not grep phi
implementation
;
; Equivalent to: http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01786.html
-; RUN: as < %s | opt -instcombine | dis | not grep 'call double %pow'
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'call double %pow'
declare double %pow(double, double)
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: as < %s | opt -instcombine | dis | not grep rem
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep rem
implementation
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: as < %s | opt -instcombine | dis | not grep set
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep set
%X = uninitialized global int
; into equivalent setne,eq instructions.
;
-; RUN: as < %s | opt -instcombine | dis | grep -v seteq | grep -v setne | not grep set
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep -v seteq | grep -v setne | not grep set
bool %test1(uint %A) {
%B = setge uint %A, 1 ; setne %A, 0
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: as < %s | opt -instcombine | dis | not grep sh
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep sh
implementation
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: as < %s | opt -instcombine -die | dis | grep sub | not grep -v 'sub int %Cok, %Bok'
+; RUN: llvm-as < %s | opt -instcombine -die | llvm-dis | grep sub | not grep -v 'sub int %Cok, %Bok'
implementation
; This test makes sure that these instructions are properly eliminated.
;
-; RUN: as < %s | opt -instcombine | dis | not grep 'xor '
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'xor '
implementation
-; RUN: as < %s | opt -basicaa -licm -disable-output
+; RUN: llvm-as < %s | opt -basicaa -licm -disable-output
;%MoveArray = external global [64 x ulong]
; Exit blocks need to be updated for all nested loops...
-; RUN: as < %s | opt -preheaders
+; RUN: llvm-as < %s | opt -preheaders
implementation ; Functions:
; This testcase fails because preheader insertion is not updating exit node
; information for loops.
-; RUN: as < %s | opt -licm
+; RUN: llvm-as < %s | opt -licm
int %main(int %argc, sbyte** %argv) {
bb0: ; No predecessors!
; happens because preheader insertion doesn't insert a preheader for this
; case... bad.
-; RUN: as < %s | opt -licm -adce -simplifycfg | dis | not grep 'br '
+; RUN: llvm-as < %s | opt -licm -adce -simplifycfg | llvm-dis | not grep 'br '
int %main(int %argc) {
br label %bb5
; LICM is adding stores before phi nodes. bad.
-; RUN: as < %s | opt -licm
+; RUN: llvm-as < %s | opt -licm
bool %test(bool %c) {
br bool %c, label %Loop, label %Out
; Test that hoisting is disabled for pointers of different types...
;
-; RUN: as < %s | opt -licm
+; RUN: llvm-as < %s | opt -licm
void %test(int* %P) {
br label %Loop
; loaded from. Basically if the load gets hoisted, the subtract gets turned
; into a constant zero.
;
-; RUN: as < %s | opt -licm -load-vn -gcse -instcombine | dis | grep load
+; RUN: llvm-as < %s | opt -licm -load-vn -gcse -instcombine | llvm-dis | grep load
%X = global int 7
declare void %foo()
; This testcase tests for a problem where LICM hoists
; potentially trapping instructions when they are not guaranteed to execute.
;
-; RUN: as < %s | opt -licm | dis | grep -C 2 "IfUnEqual" | grep div
+; RUN: llvm-as < %s | opt -licm | llvm-dis | grep -C 2 "IfUnEqual" | grep div
%X = global int 0
declare void %foo()
; This testcase tests to make sure a trapping instruction is hoisted when
; it is guaranteed to execute.
;
-; RUN: as < %s | opt -licm | dis | grep -C 2 "test" | grep div
+; RUN: llvm-as < %s | opt -licm | llvm-dis | grep -C 2 "test" | grep div
%X = global int 0
declare void %foo()
-; RUN: as < %s | opt -licm | dis
+; RUN: llvm-as < %s | opt -licm | llvm-dis
void "testfunc"(int %i) {
; Test that LICM works when there is not a loop-preheader
-; RUN: as < %s | opt -licm | dis
+; RUN: llvm-as < %s | opt -licm | llvm-dis
void "testfunc"(int %i, bool %ifcond) {
br bool %ifcond, label %Then, label %Else
-; RUN: as < %s | opt -licm -stats 2>&1 | grep "memory locations promoted to register"
+; RUN: llvm-as < %s | opt -licm -stats 2>&1 | grep "memory locations promoted to register"
%X = global int 7
; The fix is to have the -raise pass correctly convert it to the second
; equivelent form.
;
-; RUN: as < %s | opt -q -raise > Output/%s.raised.bc
+; RUN: llvm-as < %s | opt -q -raise > Output/%s.raised.bc
; RUN: lli -force-interpreter -array-checks -abort-on-exception < Output/%s.raised.bc
;
; An invalid assertion killed the level raiser. Fixed.
;
-; RUN: as < %s | opt -raise
+; RUN: llvm-as < %s | opt -raise
implementation
; method pointer type into a call. In doing so, it would have to change the
; types of the arguments to the call, but broke doing so.
;
-; RUN: as < %s | opt -raise
+; RUN: llvm-as < %s | opt -raise
implementation
; Note that this code is actually miscompiled from the input source, but despite
; that, level raise should not hang!
;
-; RUN: as < %s | opt -raise
+; RUN: llvm-as < %s | opt -raise
%Disjunct = type { \2 *, short, sbyte, sbyte *, { short, short, sbyte, sbyte, \2, sbyte * } *, { short, short, sbyte, sbyte, \2, sbyte * } * }
%chosen_disjuncts = uninitialized global %Disjunct * * ; <%Disjunct * * *> [#uses=1]
; getelementptr instruction... with a bad level raise pass, this code
; will segfault on execution.
;
-; RUN: as < %s | opt -raise |lli -abort-on-exception
+; RUN: llvm-as < %s | opt -raise |lli -abort-on-exception
%Village = type { [4 x \3 *], \2 *, { \2 *, { int, int, int, \5 * } *, \2 * }, { int, int, int, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int,
int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * } }, int, int }
; Level raise is making an incorrect transformation, which causes incorrect
; bytecode to be generated.
;
-; RUN: as < %s | opt -raise | dis
+; RUN: llvm-as < %s | opt -raise | llvm-dis
;
%Village = type { [4 x \3 *], \2 *, { \2 *, { int, int, int, \5 * } *, \2 * }, { int, int, int, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * }, { \2 *, { int, int, int, \6 * } *, \2 * } }, int, int }
; successful, all cast instructions should be eliminated from this testcase.
;
-; RUN: as < %s | opt -raise | dis | not grep cast
+; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep cast
%Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
%hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int }
; prevented reg115 from being able to change.
;
-; RUN: as < %s | opt -raise | dis | grep '= cast' | not grep \*
+; RUN: llvm-as < %s | opt -raise | llvm-dis | grep '= cast' | not grep \*
%Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
%HashEntry = type { uint, sbyte *, \2 } *
-; RUN: as < %s | opt -raise | dis | grep '= cast' | not grep \*
+; RUN: llvm-as < %s | opt -raise | llvm-dis | grep '= cast' | not grep \*
%Hash = type { { uint, sbyte *, \2 } * *, int (uint) *, int } *
%HashEntry = type { uint, sbyte *, \2 } *
; x[j*i-12] = j;
; }
-; RUN: as < %s | opt -raise | dis | grep ' cast ' | not grep '*'
+; RUN: llvm-as < %s | opt -raise | llvm-dis | grep ' cast ' | not grep '*'
implementation
; return (int*)malloc(i+j);
; }
-; RUN: as < %s | opt -raise | dis | grep ' cast ' | not grep '*'
+; RUN: llvm-as < %s | opt -raise | llvm-dis | grep ' cast ' | not grep '*'
implementation
; to a 32 bit version of the number with all upper 16 bits clear (ushort->uint
; involves no sign extension). Optimizing this to a single cast is invalid!
;
-; RUN: as < %s | opt -raise -q | lli -abort-on-exception
+; RUN: llvm-as < %s | opt -raise -q | lli -abort-on-exception
;
implementation
; This testcase is not level raised properly...
;
-; RUN: as < %s | opt -raise | dis | grep ' cast ' | not grep '*'
+; RUN: llvm-as < %s | opt -raise | llvm-dis | grep ' cast ' | not grep '*'
%List = type { int, %List* }
; This testcase should have the cast propogated through the load
; just like a store does...
;
-; RUN: as < %s | opt -raise | dis | grep ' cast ' | not grep '*'
+; RUN: llvm-as < %s | opt -raise | llvm-dis | grep ' cast ' | not grep '*'
int "test"(uint * %Ptr) {
%P2 = cast uint *%Ptr to int *
-; RUN: as < %s | opt -raise | dis | grep '= cast' | not grep \*
+; RUN: llvm-as < %s | opt -raise | llvm-dis | grep '= cast' | not grep \*
%FILE = type { int, ubyte*, ubyte*, ubyte, ubyte, uint, uint, uint }
; This could be fixed by making all stores add themselves to a list, and check
; their arguments are consistent AFTER all other values are propogated.
-; RUN: as < %s | opt -raise | dis | not grep '= cast'
+; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep '= cast'
%Tree = type %struct.tree*
%struct.tree = type { int, double, double, %Tree, %Tree, %Tree, %Tree }
-; RUN: as < %s | opt -raise
+; RUN: llvm-as < %s | opt -raise
%Tree = type %struct.tree*
%struct.tree = type { int, double, double, %Tree, %Tree, %Tree, %Tree }
; This crashes raise, with an cast<> failure
-; RUN: as < %s | opt -raise
+; RUN: llvm-as < %s | opt -raise
implementation
sbyte* %test(int* %ptr) {
; because both the source and the destination of the %Y cast are converted
; to a new type, which causes massive problems.
-; RUN: as < %s | opt -raise -raise-start-inst=W
+; RUN: llvm-as < %s | opt -raise -raise-start-inst=W
int **%test(sbyte **%S) {
BB0:
; Looks like we don't raise alloca's like we do mallocs
;
-; RUN: as < %s | opt -raise | dis | grep '= cast' | not grep \*
+; RUN: llvm-as < %s | opt -raise | llvm-dis | grep '= cast' | not grep \*
implementation ; Functions:
-; RUN: as < %s | opt -raise -raise-start-inst=cast271
+; RUN: llvm-as < %s | opt -raise -raise-start-inst=cast271
%CON_list = type { %CON_list*, %CON_node* }
%CON_node = type { %DIS_list*, %DIS_list*, int }
-; RUN: as < %s | opt -raise
+; RUN: llvm-as < %s | opt -raise
int* %test(int* %P, int* %Q) {
%P = cast int* %P to ulong
-; RUN: as < %s | opt -raise | dis | grep -v uint | not grep 4294967295
+; RUN: llvm-as < %s | opt -raise | llvm-dis | grep -v uint | not grep 4294967295
%length_code = uninitialized global [256 x ubyte]
-; RUN: as < %s | opt -raise | dis | grep call | not grep '\.\.\.'
+; RUN: llvm-as < %s | opt -raise | llvm-dis | grep call | not grep '\.\.\.'
implementation
; Due to a recent change, this testcase now sends the raise pass into an infinite loop
;
-; RUN: as < %s | opt -raise
+; RUN: llvm-as < %s | opt -raise
implementation
; This testcase should be able to eliminate at least one of the casts.
;
-; RUN: as < %s | opt -raise | dis | not grep 'REMOVE'
+; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep 'REMOVE'
int %foo(sbyte * %PF) {
%UPF = cast sbyte* %PF to uint()*
; Testcase reduced from 197.parser by bugpoint
-; RUN: as < %s | opt -raise -raise-start-inst=cast455 > /dev/null
+; RUN: llvm-as < %s | opt -raise -raise-start-inst=cast455 > /dev/null
void %conjunction_prune() {
; <label>:0 ; No predecessors!
-; RUN: as < %s | opt -raise -debug -raise-start-inst=cast459
+; RUN: llvm-as < %s | opt -raise -debug -raise-start-inst=cast459
int %deflateInit2_({ ubyte*, uint, ulong, ubyte*, uint, ulong, sbyte*, { \4, int, ubyte*, ulong, ubyte*, int, int, ubyte, ubyte, int, uint, uint, uint, ubyte*, ulong, ushort*, ushort*, uint, uint, uint, uint, uint, long, uint, uint, int, uint, uint, uint, uint, uint, uint, int, int, uint, int, [573 x { { ushort }, { ushort } }], [61 x { { ushort }, { ushort } }], [39 x { { ushort }, { ushort } }], { { { ushort }, { ushort } }*, int, { int }* }, { { { ushort }, { ushort } }*, int, { int }* }, { { { ushort }, { ushort } }*, int, { int }* }, [16 x ushort], [573 x int], int, int, [573 x ubyte], ubyte*, uint, uint, ushort*, ulong, ulong, uint, int, ushort, int }*, sbyte* (sbyte*, uint, uint)*, void (sbyte*, sbyte*)*, sbyte*, int, ulong, ulong }* %strm, int %level, int %method, int %windowBits, int %memLevel, int %strategy, sbyte* %version, int %stream_size) {
bb0: ; No predecessors!
-; RUN: as < %s | opt -raise
+; RUN: llvm-as < %s | opt -raise
declare void %foo()
-; RUN: as < %s | opt -raise | dis | not grep cast
+; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep cast
void %test(...) { ret void }
-; RUN: as < %s | opt -raise -disable-output
+; RUN: llvm-as < %s | opt -raise -disable-output
%T = type { [0 x ubyte] }
; The expr analysis routines were being too aggressive across cast instructions!
-; RUN: as < %s | opt -raise | dis | not grep 4294967295
+; RUN: llvm-as < %s | opt -raise | llvm-dis | not grep 4294967295
target endian = big
target pointersize = 64
; This testcase exposed a problem with the loop identification pass (LoopInfo).
; Basically, it was incorrectly calculating the loop nesting information.
;
-; RUN: as < %s | opt -preheaders
+; RUN: llvm-as < %s | opt -preheaders
implementation ; Functions:
; inserted for the "fail" loop, but the exit block of a loop is not updated
; to be the preheader instead of the exit loop itself.
-; RUN: as < %s | opt -preheaders
+; RUN: llvm-as < %s | opt -preheaders
int %re_match_2() {
br label %loopentry.1
-; RUN: as < %s | opt -tailduplicate -instcombine -simplifycfg -licm -disable-output
+; RUN: llvm-as < %s | opt -tailduplicate -instcombine -simplifycfg -licm -disable-output
target endian = little
target pointersize = 32
-; RUN: as < %s | opt -preheaders
+; RUN: llvm-as < %s | opt -preheaders
implementation
-; RUN: as < %s | opt -preheaders
+; RUN: llvm-as < %s | opt -preheaders
void %foo(bool %C) {
br bool %C, label %T, label %F
; This testcase exposed a problem with the loop identification pass (LoopInfo).
; Basically, it was incorrectly calculating the loop nesting information.
;
-; RUN: as < %s | opt -preheaders
+; RUN: llvm-as < %s | opt -preheaders
implementation ; Functions:
; inserted for the "fail" loop, but the exit block of a loop is not updated
; to be the preheader instead of the exit loop itself.
-; RUN: as < %s | opt -preheaders
+; RUN: llvm-as < %s | opt -preheaders
int %re_match_2() {
br label %loopentry.1
-; RUN: as < %s | opt -tailduplicate -instcombine -simplifycfg -licm -disable-output
+; RUN: llvm-as < %s | opt -tailduplicate -instcombine -simplifycfg -licm -disable-output
target endian = little
target pointersize = 32
-; RUN: as < %s | opt -preheaders
+; RUN: llvm-as < %s | opt -preheaders
implementation
-; RUN: as < %s | opt -preheaders
+; RUN: llvm-as < %s | opt -preheaders
void %foo(bool %C) {
br bool %C, label %T, label %F
-; RUN: as < %s | opt -lowersetjmp | dis | grep invoke
+; RUN: llvm-as < %s | opt -lowersetjmp | llvm-dis | grep invoke
%JmpBuf = type int
%.str_1 = internal constant [13 x sbyte] c"returned %d\0A\00"
-; RUN: as < %s | opt -lowerswitch
+; RUN: llvm-as < %s | opt -lowerswitch
void %child(int %ct.1) {
entry: ; No predecessors!
-; RUN: as < %s | opt -lowerswitch
+; RUN: llvm-as < %s | opt -lowerswitch
void %test() {
switch uint 0, label %Next []
; Uninitialized values are not handled correctly.
;
-; RUN: as < %s | opt -mem2reg
+; RUN: llvm-as < %s | opt -mem2reg
;
implementation
; This input caused the mem2reg pass to die because it was trying to promote
; the %r alloca, even though it is invalid to do so in this case!
;
-; RUN: as < %s | opt -mem2reg
+; RUN: llvm-as < %s | opt -mem2reg
implementation
-; RUN: as < %s | opt -mem2reg
+; RUN: llvm-as < %s | opt -mem2reg
implementation ; Functions:
; This testcases makes sure that mem2reg can handle unreachable blocks.
-; RUN: as < %s | opt -mem2reg
+; RUN: llvm-as < %s | opt -mem2reg
int %test() {
%X = alloca int
; Mem2reg used to only add one incoming value to a PHI node, even if it had
; multiple incoming edges from a block.
;
-; RUN: as < %s | opt -mem2reg -disable-output
+; RUN: llvm-as < %s | opt -mem2reg -disable-output
int %test(bool %c1, bool %c2) {
%X = alloca int
; Promoting some values allows promotion of other values.
-; RUN: as < %s | opt -mem2reg | dis | not grep alloca
+; RUN: llvm-as < %s | opt -mem2reg | llvm-dis | not grep alloca
int %test2() {
%result = alloca int ; ty=int*
; generated code should perform the appropriate masking operations required
; depending on the endianness of the target...
-; RUN: as < %s | opt -mem2reg | dis | not grep 'alloca'
+; RUN: llvm-as < %s | opt -mem2reg | llvm-dis | not grep 'alloca'
implementation
; Simple sanity check testcase. Both alloca's should be eliminated.
-; RUN: as < %s | opt -mem2reg | dis | not grep 'alloca'
+; RUN: llvm-as < %s | opt -mem2reg | llvm-dis | not grep 'alloca'
implementation
; Basic testcases - these are only tested by inspection, but illustrate the
; basic cases PRE can handle.
;
-; RUN: as < %s | opt -pre -disable-output
+; RUN: llvm-as < %s | opt -pre -disable-output
declare void %use(int)
declare int %get()
-; RUN: as < %s | opt -pinodes -instcombine -die | dis | not grep add
+; RUN: llvm-as < %s | opt -pinodes -instcombine -die | llvm-dis | not grep add
int "test"(int %i, int %j) {
%c = seteq int %i, 0
-; RUN: as < %s | opt -paths
+; RUN: llvm-as < %s | opt -paths
;
%globalCrc = uninitialized global uint ; <uint*> [#uses=1]
-; RUN: as < %s | opt -prune-eh | dis | not grep invoke
+; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | not grep invoke
implementation
-; RUN: as < %s | opt -prune-eh | dis | not grep invoke
+; RUN: llvm-as < %s | opt -prune-eh | llvm-dis | not grep invoke
implementation
-; RUN: as < %s | opt -reassociate -instcombine -constprop -dce | dis | not grep add
+; RUN: llvm-as < %s | opt -reassociate -instcombine -constprop -dce | llvm-dis | not grep add
int %test(int %A) {
%X = add int %A, 1
-; RUN: as < %s | opt -reassociate -instcombine -constprop -die | dis | not grep 5
+; RUN: llvm-as < %s | opt -reassociate -instcombine -constprop -die | llvm-dis | not grep 5
int %test(int %A, int %B) {
%W = add int %B, -5
; With sub reassociation, constant folding can eliminate all of the constants.
;
-; RUN: as < %s | opt -reassociate -constprop -instcombine -dce | dis | not grep add
+; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -dce | llvm-dis | not grep add
int %test(int %A, int %B) {
%W = add int 5, %B
; With sub reassociation, constant folding can eliminate the two 12 constants.
;
-; RUN: as < %s | opt -reassociate -constprop -dce | dis | not grep 12
+; RUN: llvm-as < %s | opt -reassociate -constprop -dce | llvm-dis | not grep 12
int "test"(int %A, int %B, int %C, int %D) {
%M = add int %A, 12
; The reassociate pass is not preserving dominance properties correctly
;
-; RUN: as < %s | opt -reassociate
+; RUN: llvm-as < %s | opt -reassociate
int %compute_dist(int %i, int %j) {
%reg119 = sub int %j, %i
-; RUN: as < %s | opt -reassociate -disable-output
+; RUN: llvm-as < %s | opt -reassociate -disable-output
implementation ; Functions:
; With reassociation, constant folding can eliminate the 12 and -12 constants.
;
-; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep add
+; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep add
int %test(int %arg) {
%tmp1 = sub int -12, %arg
; With reassociation, constant folding can eliminate the +/- 30 constants.
;
-; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep 30
+; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep 30
int "test"(int %reg109, int %reg1111) {
%reg115 = add int %reg109, -30 ; <int> [#uses=1]
; In this case, we want to reassociate the specified expr so that i+j can be
; hoisted out of the inner most loop.
;
-; RUN: as < %s | opt -reassociate | dis | grep 115 | not grep 117
+; RUN: llvm-as < %s | opt -reassociate | llvm-dis | grep 115 | not grep 117
%.LC0 = internal global [4 x sbyte] c"%d\0A\00" ; <[4 x sbyte]*> [#uses=1]
; Reassociation should apply to Add, Mul, And, Or, & Xor
;
-; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep 12
+; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep 12
int "test_mul"(int %arg) {
%tmp1 = mul int 12, %arg
; With sub reassociation, constant folding can eliminate the 12 and -12 constants.
;
-; RUN: as < %s | opt -reassociate -constprop -instcombine -die | dis | not grep 12
+; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep 12
int "test"(int %A, int %B) {
%X = add int -12, %A
; real benchmark (mst from Olden benchmark, MakeGraph function). When SCCP is
; fixed, this should be eliminated by a single SCCP application.
;
-; RUN: as < %s | opt -sccp | dis | not grep loop
+; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep loop
int* %test() {
bb1:
-; RUN: as < %s | opt -sccp | dis | not grep sub
+; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep sub
void %test3(int, int) {
add int 0, 0
; This test shows a case where SCCP is incorrectly eliminating the PHI node
; because it thinks it has a constant 0 value, when it really doesn't.
-; RUN: as < %s | opt -sccp | dis | grep phi
+; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep phi
int "test"(int %A, bool %c) {
bb1:
; this is in fact NOT the case, so the return should still be alive in the code
; after sccp and CFG simplification have been performed.
;
-; RUN: as < %s | opt -sccp -simplifycfg | dis | grep ret
+; RUN: llvm-as < %s | opt -sccp -simplifycfg | llvm-dis | grep ret
void "old_main"() {
-; RUN: as < %s | opt -sccp | dis | not grep '%X'
+; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep '%X'
%G = uninitialized global [40x int]
-; RUN: as < %s | opt -sccp -simplifycfg | dis | not grep then:
+; RUN: llvm-as < %s | opt -sccp -simplifycfg | llvm-dis | not grep then:
void %cprop_test11(int* %data.1) {
entry: ; No predecessors!
; The PHI cannot be eliminated from this testcase, SCCP is mishandling invoke's!
-; RUN: as < %s | opt -sccp | dis | grep phi
+; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep phi
declare void %foo()
int %test(bool %cond) {
; This is a basic sanity check for constant propogation. The add instruction
; should be eliminated.
-; RUN: as < %s | opt -sccp | dis | not grep add
+; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep add
int %test(bool %B) {
br bool %B, label %BB1, label %BB2
; This is the test case taken from appel's book that illustrates a hard case
; that SCCP gets right. BB3 should be completely eliminated.
;
-; RUN: as < %s | opt -sccp -constprop -dce -cfgsimplify | dis | not grep BB3
+; RUN: llvm-as < %s | opt -sccp -constprop -dce -cfgsimplify | llvm-dis | not grep BB3
int %test function(int %i0, int %j0) {
BB1:
-; RUN: as < %s | opt -scalarrepl | dis | grep alloca | grep '4 x'
+; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep alloca | grep '4 x'
; Test that an array is not incorrectly deconstructed...
-; RUN: as < %s | opt -scalarrepl
+; RUN: llvm-as < %s | opt -scalarrepl
void %main() {
%E = alloca { { int, float, double, long }, { int, float, double, long } } ; <{ { int, float, double, long }, { int, float, double, long } }*> [#uses=1]
-; RUN: as < %s | opt -scalarrepl
+; RUN: llvm-as < %s | opt -scalarrepl
int %test() {
%X = alloca { [ 4 x int] }
-; RUN: as < %s | opt -scalarrepl -mem2reg | dis | not grep alloca
+; RUN: llvm-as < %s | opt -scalarrepl -mem2reg | llvm-dis | not grep alloca
int %test() {
%X = alloca [ 4 x int ]
-; RUN: as < %s | opt -scalarrepl -mem2reg | dis | grep alloca
+; RUN: llvm-as < %s | opt -scalarrepl -mem2reg | llvm-dis | grep alloca
int %test() {
%X = alloca [ 4 x int ]
-; RUN: as < %s | opt -scalarrepl -mem2reg | dis | not grep alloca
+; RUN: llvm-as < %s | opt -scalarrepl -mem2reg | llvm-dis | not grep alloca
int %test() {
%X = alloca { int, float }
; Basic block #2 should not be merged into BB #3!
;
-; RUN: as < %s | opt -simplifycfg | dis | grep 'br label'
+; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | grep 'br label'
;
void "cprop_test12"(int* %data) {
bb0:
;
; Which is not valid SSA
;
-; RUN: as < %s | opt -simplifycfg | dis
+; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis
void "test"() {
br bool true, label %end, label %Loop
; -simplifycfg is not folding blocks if there is a PHI node involved. This
; should be fixed eventually
-; RUN: as < %s | opt -simplifycfg | dis | not grep br
+; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep br
int %main(int %argc) {
br label %InlinedFunctionReturnNode
-; RUN: as < %s | opt -simplifycfg
+; RUN: llvm-as < %s | opt -simplifycfg
int %test(int %A, int %B, bool %cond) {
J:
-; RUN: as < %s | opt -simplifycfg -disable-output
+; RUN: llvm-as < %s | opt -simplifycfg -disable-output
implementation ; Functions:
; Do not remove the invoke!
;
-; RUN: as < %s | opt -simplifycfg -disable-output
+; RUN: llvm-as < %s | opt -simplifycfg -disable-output
int %test() {
%A = invoke int %test() to label %Ret except label %Ret
; Do not remove the invoke!
;
-; RUN: as < %s | opt -simplifycfg | dis | grep invoke
+; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | grep invoke
int %test() {
invoke int %test() to label %Ret except label %Ret
; This test checks to make sure that 'br X, Dest, Dest' is folded into
; 'br Dest'
-; RUN: as < %s | opt -simplifycfg | dis | not grep 'br bool %c2'
+; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'br bool %c2'
declare void %noop()
; due to the fact that the SimplifyCFG function does not use
; the ConstantFoldTerminator function.
-; RUN: as < %s | opt -simplifycfg | dis | not grep 'br bool %c2'
+; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'br bool %c2'
declare void %noop()
-; RUN: as < %s | opt -simplifycfg | dis | not grep switch
+; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep switch
int %test1() { ; Test normal folding
switch uint 5, label %Default [
; Test merging of blocks with phi nodes.
;
-; RUN: as < %s | opt -simplifycfg | dis | not grep 'N:'
+; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'N:'
;
int %test(bool %a) {
; If this test is successful, the function should be reduced to 'call; ret'
-; RUN: as < %s | opt -simplifycfg | dis | not egrep 'invoke|br'
+; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not egrep 'invoke|br'
declare void %bar()
declare void %llvm.unwind()
; Test merging of blocks that only have PHI nodes in them
;
-; RUN: as < %s | opt -simplifycfg | dis | not grep 'N:'
+; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'N:'
;
int %test(bool %a, bool %b) {
; where the mergedinto block doesn't have any PHI nodes, and is in fact
; dominated by the block-to-be-eliminated
;
-; RUN: as < %s | opt -simplifycfg | dis | not grep 'N:'
+; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep 'N:'
;
int %test(bool %a, bool %b) {
; Test CFG simplify removal of branch instructions...
;
-; RUN: as < %s | opt -simplifycfg | dis | not grep br
+; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | not grep br
void "test1"() {
; This test ensures that the simplifycfg pass continues to constant fold
; terminator instructions.
-; RUN: as < %s | opt -simplifycfg | not grep br
+; RUN: llvm-as < %s | opt -simplifycfg | not grep br
int %test(int %A, int %B) {
J:
-; RUN: as < %s | opt -tailduplicate -disable-output
+; RUN: llvm-as < %s | opt -tailduplicate -disable-output
void %motion_result7() {
entry:
-; RUN: as < %s | opt -tailduplicate -disable-output
+; RUN: llvm-as < %s | opt -tailduplicate -disable-output
implementation
-; RUN: as < %s | opt -tailduplicate -disable-output
+; RUN: llvm-as < %s | opt -tailduplicate -disable-output
implementation
; This test checks to make sure phi nodes are updated properly
;
-; RUN: as < %s | opt -tailduplicate -disable-output
+; RUN: llvm-as < %s | opt -tailduplicate -disable-output
-; RUN: as < %s | opt -tailduplicate -disable-output
+; RUN: llvm-as < %s | opt -tailduplicate -disable-output
declare void %__main()