llvm.org GIT mirror llvm / 69ccadd
Use the llvm-upgrade program to upgrade llvm assembly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32115 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 13 years ago
1199 changed file(s) with 1680 addition(s) and 1674 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llvm-as < %s | opt -anders-aa -load-vn -gcse -deadargelim | llvm-dis | not grep ARG
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -anders-aa -load-vn -gcse -deadargelim | llvm-dis | not grep ARG
11
22 %G = internal constant int* null
33
None ; RUN: llvm-as < %s | opt -anders-aa -aa-eval
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -anders-aa -aa-eval
11
22 implementation
33
None ; RUN: llvm-as < %s | opt -anders-aa -load-vn -gcse -deadargelim | llvm-dis | grep store | not grep null
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -anders-aa -load-vn -gcse -deadargelim | llvm-dis | grep store | not grep null
11
22 ; Because the 'internal' function is passed to an external function, we don't
33 ; know what the incoming values will alias. As such, we cannot do the
None ; RUN: llvm-as < %s | opt -anders-aa -load-vn -gcse -instcombine | llvm-dis | grep 'ret bool true'
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -anders-aa -load-vn -gcse -instcombine | llvm-dis | grep 'ret bool true'
11
22 %G = internal global int* null
33 declare int *%ext()
None ; RUN: llvm-as < %s | opt -anders-aa -disable-output
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -anders-aa -disable-output
11
22 void %foo() { ret void }
11 ; is performed. It is not legal to delete the second load instruction because
22 ; the value computed by the first load instruction is changed by the store.
33
4 ; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | grep DONOTREMOVE
4 ; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -instcombine | llvm-dis | grep DONOTREMOVE
55
66 int %test() {
77 %A = alloca int
None ; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -aa-eval -disable-output
11 ; Test for a bug in BasicAA which caused a crash when querying equality of P1&P2
22 void %test({[2 x int],[2 x int]}* %A, long %X, long %Y) {
33 %P1 = getelementptr {[2 x int],[2 x int]}* %A, long 0, uint 0, long %X
None ; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | grep sub
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -instcombine | llvm-dis | grep sub
11
22 ; BasicAA was incorrectly concluding that P1 and P2 didn't conflict!
33
None ; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -aa-eval -disable-output
11 ; Test for a bug in BasicAA which caused a crash when querying equality of P1&P2
22 void %test([17 x ushort]* %mask_bits) {
33 %P1 = getelementptr [17 x ushort]* %mask_bits, long 0, long 0
None ; RUN: llvm-as < %s | opt -licm -disable-output
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -licm -disable-output
11 %struct..apr_array_header_t = type { int*, int, int, int, sbyte* }
22 %struct..apr_table_t = type { %struct..apr_array_header_t, uint, [32 x int], [32 x int] }
33
None ; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -aa-eval -disable-output
11
22 int %MTConcat([3 x int]* %a.1) {
33 %tmp.961 = getelementptr [3 x int]* %a.1, long 0, long 4
None ; RUN: llvm-as < %s | opt -basicaa -aa-eval -disable-output
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -aa-eval -disable-output
11
22 %struct..RefPoint = type { int, { uint, ushort, ushort } }
33 %struct..RefRect = type { %struct..RefPoint, %struct..RefPoint }
0 ; In this test, a local alloca cannot alias an incoming argument.
11
2 ; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | not grep sub
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -instcombine | llvm-dis | not grep sub
33
44 int %test(int* %P) {
55 %X = alloca int
0 ; This testcase consists of alias relations which should be completely
11 ; resolvable by basicaa.
22
3 ; RUN: llvm-as < %s | opt -aa-eval -print-may-aliases 2>&1 -disable-output | not grep May:
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -aa-eval -print-may-aliases 2>&1 -disable-output | not grep May:
44
55 %T = type { uint, [10 x ubyte] }
66
0 ; This testcase consists of alias relations which should be completely
11 ; resolvable by basicaa, but require analysis of getelementptr constant exprs.
22
3 ; RUN: llvm-as < %s | opt -aa-eval -print-may-aliases 2>&1 -disable-output | not grep May:
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -aa-eval -print-may-aliases 2>&1 -disable-output | not grep May:
44
55 %T = type { uint, [10 x ubyte] }
66
None ; RUN: llvm-as < %s | opt -licm
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -licm
11
22 "java/lang/Object" = type { %struct.llvm_java_object_base }
33 "java/lang/StringBuffer" = type { "java/lang/Object", int, { "java/lang/Object", uint, [0 x ushort] }*, bool }
None ; RUN: llvm-as < %s | opt -dse
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -dse
11
22 "java/lang/Object" = type { %struct.llvm_java_object_base }
33 "java/lang/StringBuffer" = type { "java/lang/Object", int, { "java/lang/Object", uint, [0 x ushort] }*, bool }
None ; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'load int\* %A'
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'load int\* %A'
11
22 declare double* %useit(int*)
33
None ; RUN: llvm-as < %s | opt -aa-eval -disable-output 2>&1 | grep '2 no alias respon'
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -aa-eval -disable-output 2>&1 | grep '2 no alias respon'
11
22 ;; TEST that A[1][0] may alias A[0][i].
33
None ; RUN: llvm-as < %s | opt -licm -disable-output
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -licm -disable-output
11 target endian = big
22 target pointersize = 32
33 target triple = "powerpc-apple-darwin8.7.0"
0 ; This testcase tests for various features the basicaa test should be able to
11 ; determine, as noted in the comments.
22
3 ; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | llvm-dis | not grep REMOVE
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine -dce | llvm-dis | not grep REMOVE
44
55 %Global = external global { int }
66
11 ; disambiguating some obvious cases. All loads should be removable in
22 ; this testcase.
33
4 ; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine -dce | llvm-dis | not grep load
4 ; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine -dce | llvm-dis | not grep load
55
66 %A = global int 7
77 %B = global int 8
0 ; A store or load cannot alias a global if the accessed amount is larger then
11 ; the global.
22
3 ; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep load
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep load
44
55 %B = global short 8
66
22 ; two pointers, then the load should be hoisted, and the store sunk. Thus
33 ; the loop becomes empty and can be deleted by ADCE.
44
5 ; RUN: llvm-as < %s | opt -basicaa -licm --adce | llvm-dis | not grep Loop
5 ; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -licm --adce | llvm-dis | not grep Loop
66
77 %A = global int 7
88 %B = global int 8
0 ; A very rudimentary test on AliasAnalysis::getModRefInfo.
1 ; RUN: llvm-as < %s | opt -print-all-alias-modref-info -aa-eval -disable-output &&
2 ; RUN: llvm-as < %s | opt -print-all-alias-modref-info -aa-eval -disable-output 2>&1 | not grep NoModRef
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -print-all-alias-modref-info -aa-eval -disable-output &&
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -print-all-alias-modref-info -aa-eval -disable-output 2>&1 | not grep NoModRef
33
44 int %callee() {
55 %X = alloca { int, int }
None ; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'ret int 0'
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'ret int 0'
11 declare void %foo(int*)
22 declare void %bar()
33
None ; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-dspass=td -dsgc-check-flags=Ptr:HR
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-dspass=td -dsgc-check-flags=Ptr:HR
11
22
33
None ; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse | llvm-dis | not grep load
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -no-aa -ds-aa -load-vn -gcse | llvm-dis | not grep load
11 %T = type { int*, int* }
22
33 int %main() {
0 ; This is the same testcase as 2003-06-29-NodeCollapsing2.ll, but it uses the
11 ; graph checker.
22 ;
3 ; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
44 ;
55 %T = type { int}
66
None ; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-dspass=td -dsgc-check-flags=X:GM
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-dspass=td -dsgc-check-flags=X:GM
11
22 %G = internal global int 5
33
None ; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
11
22 %X = internal global { int, short, short } { int 1, short 2, short 3 }
33
0 ; This should cause the global node to collapse!!
11 ; XFAIL: *
2 ; RUN: llvm-as < %s | opt -analyze -datastructure-gc --dsgc-check-flags=test:GAU
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc --dsgc-check-flags=test:GAU
33
44 %Tree = type { int, %Tree*, %Tree* }
55 %T5 = external global %Tree
0 ; This is the same testcase as 2003-06-29-NodeCollapsing2.ll, but it uses the
11 ; graph checker.
22 ;
3 ; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
44 ;
55
66 %S = type { double, int }
None ; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-check-flags=Xn:SMR &&
1 ; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-check-flags=X:SMR
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-check-flags=Xn:SMR &&
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-check-flags=X:SMR
22
33 declare void %llvm.memcpy.i32(sbyte*, sbyte*, uint, uint)
44 declare void %llvm.memmove.i32(sbyte*, sbyte*, uint, uint)
None ; RUN: llvm-as < %s | opt -ds-aa -load-vn -gcse -instcombine | llvm-dis | not grep sub
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -ds-aa -load-vn -gcse -instcombine | llvm-dis | not grep sub
11
22 void %bar(int* %p) {
33 ret void
None ; RUN: llvm-as < %s | opt -ds-aa -load-vn -gcse -instcombine | llvm-dis | grep sub
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -ds-aa -load-vn -gcse -instcombine | llvm-dis | grep sub
11
22 void %bar(int* %p) {
33 store int 15, int* %p
None ; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-check-flags=G:GIM -dsgc-dspass=bu &&\
1 ; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-check-flags=G:GIM -dsgc-dspass=td
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-check-flags=G:GIM -dsgc-dspass=bu &&\
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-check-flags=G:GIM -dsgc-dspass=td
22
33 %S = type { double, int }
44
None ; RUN: llvm-as < %s | opt -ds-aa -load-vn -gcse | llvm-dis | grep 'load int\* %L'
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -ds-aa -load-vn -gcse | llvm-dis | grep 'load int\* %L'
11
22 %G = internal global int* null
33
None ; RUN: llvm-as < %s | opt -analyze -datastructure
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure
11
22 target endian = little
33 target pointersize = 32
None ; RUN: llvm-as < %s | opt -analyze -datastructure
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure
11
22 ; ModuleID = 'bug3.bc'
33 target endian = little
None ; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-check-flags=x:IA
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-check-flags=x:IA
11
22 ; ModuleID = 'bug3.bc'
33 target endian = little
None ; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-dspass=bu -dsgc-check-flags=Y:SHM && \
1 ; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-dspass=td -dsgc-check-flags=P1:SHM,P2:SHM
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-dspass=bu -dsgc-check-flags=Y:SHM && \
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-dspass=td -dsgc-check-flags=P1:SHM,P2:SHM
22
33 %G = internal constant [2 x int*(int*)*] [
44 int*(int*)* %callee1, int*(int*)* %callee2
33 ; -- latter should remain unresolved in main() and copied to GG
44 ; -- globals in GG pointed to by latter should be marked I, but not other nodes
55 ;
6 ; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-check-flags=KnownPtr:S,UnknownPtr:SI -dsgc-dspass=bu
6 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-check-flags=KnownPtr:S,UnknownPtr:SI -dsgc-dspass=bu
77
88 %Z = internal global int 0
99 %X = internal global int 0
None ; RUN: llvm-as < %s | opt -analyze -budatastructure -dont-print-ds
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -budatastructure -dont-print-ds
11
22 %MidFnTy = type void (\2*)
33
0 ; Test to check for support for "physical subtyping"
11 ;
2 ; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-abort-if-any-collapsed
33 ;
44 %S = type { int }
55 %T = type { int, float, double }
0
1 ; RUN: llvm-as < %s | opt -analyze -datastructure-gc --dsgc-abort-if-merged=Y,BVal
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc --dsgc-abort-if-merged=Y,BVal
22
33 implementation
44
0 ; This tests to make sure that G ends up in the globals graph of the BU pass.
11 ; If it is not, then %G will get converted to a 'constant' from a 'global'
22 ;
3 ; RUN: llvm-as < %s | opt -ds-opt -globaldce | llvm-dis | grep %G
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -ds-opt -globaldce | llvm-dis | grep %G
44
55
66 %G = internal global int 0 ; [#uses=2]
None ; RUN: llvm-as < %s | opt -analyze -datastructure-gc -dsgc-dspass=bu -dsgc-check-flags=A:SM
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc -dsgc-dspass=bu -dsgc-check-flags=A:SM
11 ; Constant globals should not mark stuff incomplete. This should allow the
22 ; bu pass to resolve the indirect call immediately in "test", allowing %A to
33 ; be marked complete and the store to happen.
0 ; Make sure that the ds-opt pass is constantizing globals
11 ;
2 ; RUN: llvm-as < %s | opt -ds-opt | llvm-dis | grep %G | grep constant
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -ds-opt | llvm-dis | grep %G | grep constant
33
44
55 %G = internal global int 0 ; [#uses=2]
0 ; Test that ds-aa can be used for queries that require field sensitive AA.
1 ; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse | llvm-dis | not grep load
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -no-aa -ds-aa -load-vn -gcse | llvm-dis | not grep load
22
33 %Pair = type { int, int }
44
0 ; Test that GCSE uses ds-aa to do alias analysis, which is capable of
11 ; disambiguating some cases.
22
3 ; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse -instcombine -dce | llvm-dis | not grep ELIM
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -no-aa -ds-aa -load-vn -gcse -instcombine -dce | llvm-dis | not grep ELIM
44
55 %intpair = type {int*, int*}
66 implementation
0 ; This test was failing because the globals X and Y are marked incomplete
11 ; in the TD graph for %test
22 ; XFAIL: *
3 ; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse -instcombine | llvm-dis | not grep seteq
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -no-aa -ds-aa -load-vn -gcse -instcombine | llvm-dis | not grep seteq
44
55 %X = internal global int 20
66 %Y = internal global int* null
0 ; Test that ds-aa is returning must-alias information when it can.
11 ; XFAIL: *
2 ; RUN: llvm-as < %s | opt -no-aa -ds-aa -load-vn -gcse | llvm-dis | not grep load
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -no-aa -ds-aa -load-vn -gcse | llvm-dis | not grep load
33
44 %X = internal global int 20
55
22 ; has no defined way to check for this, so DSA can know that strcpy doesn't
33 ; require merging the input arguments.
44
5 ; RUN: llvm-as < %s | opt -analyze -datastructure-gc --dsgc-abort-if-merged=A,B --dsgc-check-flags=A:ASM,B:ASR --dsgc-dspass=bu
5 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -datastructure-gc --dsgc-abort-if-merged=A,B --dsgc-check-flags=A:ASM,B:ASR --dsgc-dspass=bu
66
77 implementation
88
None ; RUN: llvm-as < %s | opt -analyze -domset -disable-verify
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -domset -disable-verify
11 ;
22 int %re_match_2() {
33 ENTRY:
None ; RUN: llvm-as < %s | opt -analyze -postdomfrontier -disable-verify
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -postdomfrontier -disable-verify
11 ;
22 ; ModuleID = '2006-09-26-PostDominanceFrontier.bc'
33 target endian = little
None ; RUN: llvm-as < %s | opt -domtree -break-crit-edges -analyze -domtree | grep '3.*%brtrue$'
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -domtree -break-crit-edges -analyze -domtree | grep '3.*%brtrue$'
11 ; PR932
22 implementation ; Functions:
33
None ; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
11 %X = internal global int 4
22
33 int %test(int *%P) {
None ; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
11
22 ; This test requires the use of previous analyses to determine that
33 ; doesnotmodX does not modify X (because 'sin' doesn't).
None ; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse -instcombine | llvm-dis | grep 'ret int 0'
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -load-vn -gcse -instcombine | llvm-dis | grep 'ret int 0'
11 %G = internal global int* null
22
33 implementation
None ; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
11 %X = internal global int 4
22
33 int %test(int *%P) {
0 ; Test that pure functions are cse'd away
11
2 ; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse -instcombine | llvm-dis | not grep sub
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -load-vn -gcse -instcombine | llvm-dis | not grep sub
33
44 int %pure(int %X) {
55 %Y = add int %X, 1
0 ; This testcase ensures that redundant loads are eliminated when they should
11 ; be. All RL variables (redundant loads) should be eliminated.
22 ;
3 ; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | not grep %RL
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse | llvm-dis | not grep %RL
44 ;
55 int "test1"(int* %P) {
66 %A = load int* %P
0
1 ; RUN: llvm-as < %s | opt -load-vn -gcse -instcombine | llvm-dis | grep sub
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse -instcombine | llvm-dis | grep sub
22
33 int %test(int* %P) {
44 %X = volatile load int* %P
0 ; This testcase ensures that redundant loads are preserved when they are not
11 ; allowed to be eliminated.
2 ; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | grep sub
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse | llvm-dis | grep sub
33 ;
44 int %test1(int* %P) {
55 %A = load int* %P
None ; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
11 declare int %strlen(sbyte*)
22
33 int %test(sbyte* %P) {
None ; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
11 declare int %strlen(sbyte*)
22 declare void %use(int %X)
33
None ; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | not grep sub
11
22 %S = type { int, sbyte }
33
None ; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | not grep load
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -load-vn -gcse | llvm-dis | not grep load
11 ; Test that loads of undefined memory are eliminated.
22
33 int %test1() {
0 ; This testcase was incorrectly computing that the loopentry.7 loop was
11 ; not a child of the loopentry.6 loop.
22 ;
3 ; RUN: llvm-as < %s | opt -analyze -loops | grep "^ Loop Containing: %loopentry.7"
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -loops | grep "^ Loop Containing: %loopentry.7"
44
55 void %getAndMoveToFrontDecode() { ; No predecessors!
66 br label %endif.2
44 ; of the bug that was causing the Olden Health benchmark to output incorrect
55 ; results!
66 ;
7 ; RUN: llvm-as < %s | opt -constprop | llvm-dis > %t.1 && \
8 ; RUN: llvm-as < %s | llvm-dis | llvm-as | opt -constprop | llvm-dis > %t.2 && \
7 ; RUN: llvm-upgrade < %s | llvm-as | opt -constprop | llvm-dis > %t.1 && \
8 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | opt -constprop | llvm-dis > %t.2 && \
99 ; RUN: diff %t.1 %t.2
1010
1111 implementation
0 ; The output formater prints out 1.0e100 as Inf!
11 ;
2 ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis
2 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | llvm-dis
33
44 implementation
55
33 ; Check by running globaldce, which will remove the constant if there are
44 ; no references to it!
55 ;
6 ; RUN: llvm-as < %s | opt -globaldce | llvm-dis | not grep constant
6 ; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce | llvm-dis | not grep constant
77 ;
88
99 %v1 = internal constant int 5
0 ; Test to make sure that the 'internal' tag is not lost!
11 ;
2 ; RUN: llvm-as < %s | llvm-dis | grep internal
2 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep internal
33
44 declare void %foo()
55 implementation
0 ; Test that opaque types are preserved correctly
1 ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis
1 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | llvm-dis
22 ;
33
44 %Ty = type opaque
0 ; Test double quotes in strings work correctly!
1 ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis
1 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as | llvm-dis
22 ;
33
44 %str = internal global [6 x sbyte] c"\22foo\22\00"
0 ; Test that returning a pointer to a function causes the disassembler to print
11 ; the right thing.
22 ;
3 ; RUN: llvm-as < %s | llvm-dis | llvm-as
3 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as
44
55 %ty = type void (int)
66
None ; RUN: llvm-as < %s | llvm-dis | llvm-as
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as
11
22 ; Make sure that \\ works in a string initializer
33 %Slashtest = internal global [8 x sbyte] c"\5Cbegin{\00"
77 ; reader should NEVER produce a program "successfully" with placeholders still
88 ; around!
99
10 ; RUN: llvm-as < %s | llvm-dis | llvm-as
10 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as
1111
1212 %.LC0 = internal global [4 x sbyte] c"foo\00" ; <[4 x sbyte]*> [#uses=1]
1313
0 ; Testcase that seems to break the bytecode reader. This comes from the
11 ; "crafty" spec benchmark.
22 ;
3 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | llvm-as
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | llvm-as
44
55 %CHESS_POSITION = type { uint, int }
66
None ; RUN: llvm-as < %s | llvm-dis
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis
11
22 %Domain = type { %Domain**, %Domain* }
33
None ; RUN: llvm-as < %s | llvm-dis
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis
11
22 void %test() {
33 %tmp.123 = cast long cast ([5 x { ubyte, sbyte }]* getelementptr ([30 x [5 x { ubyte, sbyte }]]* null, long 0, long 0) to long) to int
None ; RUN: llvm-as < %s | llvm-dis | grep -- -2147483648
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep -- -2147483648
11
22 int %foo() {
33 ret int -2147483648
None ; RUN: llvm-as < %s | llvm-dis
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis
11 void %test() {
22 invoke void %test() to label %Next except label %Next
33 Next:
None ; RUN: llvm-as < %s | opt -instcombine -simplifycfg | llvm-dis | not grep br
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -simplifycfg | llvm-dis | not grep br
11
22 %.str_1 = internal constant [6 x sbyte] c"_Bool\00" ; <[6 x sbyte]*> [#uses=1]
33
None ; RUN: llvm-as < %s | llvm-dis | not grep getelementptr
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep getelementptr
11
22 %A = external global { float } ; <{ float }*> [#uses=1]
33 global int* cast (float* getelementptr ({ float }* %A, long 0, ubyte 0) to int*)
None ; RUN: llvm-as < %s | llvm-dis
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis
11
22 int %test() {
33 ret int shr (int cast (int()* %test to int), ubyte 2)
None ; RUN: llvm-as < %s | llvm-dis | grep ' bitcast ('
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep ' bitcast ('
11
22 %.Base64_1 = external constant [4 x sbyte]
33
None ; RUN: llvm-as < %s | llvm-dis | not grep 'getelementptr.*getelementptr'
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep 'getelementptr.*getelementptr'
11
22 %struct.TUVVertex = type { short, short, short, short }
33 %struct.TTriangleItem = type { sbyte*, sbyte*, [3 x %struct.TUVVertex] }
None ; RUN: llvm-as < %s | llvm-dis | grep 9223372036854775808
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep 9223372036854775808
11
22 global long -9223372036854775808
33
None ; RUN: llvm-as < %s | llvm-dis | grep -- -0.0
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep -- -0.0
11
22
33 global double 0x8000000000000000
None ; RUN: llvm-as < %s | llvm-dis | not grep cast
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep cast
11 ; All of these should be eliminable
22
33
None ; RUN: llvm-as < %s | opt -inline | llvm-dis | not grep '%G = alloca int'
0 ; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | not grep '%G = alloca int'
11
22 ; In this testcase, %bar stores to the global G. Make sure that inlining does
33 ; not cause it to store to the G in main instead.
None ; RUN: llvm-as < %s | llvm-dis | grep '1.0'
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep '1.0'
11
22 double %test() {
33 ret double 1.0 ;; This should not require hex notation
None ; RUN: llvm-as < %s | llvm-dis | llvm-as
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as
11
22 ; Ensure that the asm writer emits types before both operands of the
33 ; store, even though they can be the same.
None ; RUN: llvm-as < %s | llvm-dis | llvm-as
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | llvm-as
11
22 %t = type opaque
33 %x = global %t undef
None ; RUN: llvm-as < %s | llvm-dis | grep 'tail call csretcc'
0 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | grep 'tail call csretcc'
11
22 declare csretcc void %foo({}*, ...)
33
0 ; This test checks to make sure that constant exprs fold in some simple situations
11
2 ; RUN: llvm-as < %s | llvm-dis | not grep '(' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep '(' &&
33 ; RUN: llvm-as < %s
44
55 %A = global long 0
0 ; This test checks to make sure that constant exprs fold in some simple situations
11
2 ; RUN: llvm-as < %s | llvm-dis | not grep cast
2 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis | not grep cast
33
44 %A = global int* cast (sbyte* null to int*) ; Cast null -> fold
55 %B = global int** cast (int** %A to int**) ; Cast to same type -> fold
None ; RUN: llvm-as < %s | llc -march=arm
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
11 void %f(uint %a) {
22 entry:
33 %tmp = alloca sbyte, uint %a
None ; RUN: llvm-as < %s | llc -march=arm
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
11 void %f(int %a, int %b, int %c, int %d, int %e) {
22 entry:
33 %a_addr = alloca int ; [#uses=2]
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep and | wc -l | grep 1 &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep orr | wc -l | grep 1 &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep eor | wc -l | grep 1 &&
4 ; RUN: llvm-as < %s | llc -march=arm | grep mov.*lsl | wc -l | grep 1 &&
5 ; RUN: llvm-as < %s | llc -march=arm | grep mov.*asr | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep and | wc -l | grep 1 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep orr | wc -l | grep 1 &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep eor | wc -l | grep 1 &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep mov.*lsl | wc -l | grep 1 &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep mov.*asr | wc -l | grep 1
66
77 int %f1(int %a, int %b) {
88 entry:
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep bne &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep bge &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep bcs &&
4 ; RUN: llvm-as < %s | llc -march=arm | grep bcc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep bne &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep bge &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep bcs &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep bcc
55
66 void %f1(int %a, int %b, int* %v) {
77 entry:
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep bl &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep blx
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep bl &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep blx
33
44 void %f() {
55 entry:
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #0" | wc -l | grep 1 &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #255" | wc -l | grep 1 &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #256" | wc -l | grep 1 &&
4 ; RUN: llvm-as < %s | llc -march=arm | grep ".word.*257" | wc -l | grep 1 &&
5 ; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #-1073741761" | wc -l | grep 1 &&
6 ; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #1008" | wc -l | grep 1 &&
7 ; RUN: llvm-as < %s | llc -march=arm | grep "\.comm.*a,4,4" | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #0" | wc -l | grep 1 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #255" | wc -l | grep 1 &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #256" | wc -l | grep 1 &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ".word.*257" | wc -l | grep 1 &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #-1073741761" | wc -l | grep 1 &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #1008" | wc -l | grep 1 &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "\.comm.*a,4,4" | wc -l | grep 1
88
99 %a = internal global int 0
1010
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep __divsi3 &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep __udivsi3 &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep __modsi3 &&
4 ; RUN: llvm-as < %s | llc -march=arm | grep __umodsi3
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __divsi3 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __udivsi3 &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __modsi3 &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __umodsi3
55
66 int %f1(int %a, int %b) {
77 entry:
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep fmsr &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep fmrs &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep fmrrd &&
4 ; RUN: llvm-as < %s | llc -march=arm | grep fmdrr &&
5 ; RUN: llvm-as < %s | llc -march=arm | grep fldd &&
6 ; RUN: llvm-as < %s | llc -march=arm | grep flds &&
7 ; RUN: llvm-as < %s | llc -march=arm | grep fstd &&
8 ; RUN: llvm-as < %s | llc -march=arm | grep fsts &&
9 ; RUN: llvm-as < %s | llc -march=arm | grep ".word.*1065353216"
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fmsr &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fmrs &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fmrrd &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fmdrr &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fldd &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep flds &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fstd &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fsts &&
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ".word.*1065353216"
1010
1111
1212 double %h(double* %v) {
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep fadds &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep faddd &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep fmuls &&
4 ; RUN: llvm-as < %s | llc -march=arm | grep fmuld &&
5 ; RUN: llvm-as < %s | llc -march=arm | grep fnegs &&
6 ; RUN: llvm-as < %s | llc -march=arm | grep fnegd &&
7 ; RUN: llvm-as < %s | llc -march=arm | grep fdivs &&
8 ; RUN: llvm-as < %s | llc -march=arm | grep fdivd
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fadds &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep faddd &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fmuls &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fmuld &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fnegs &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fnegd &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fdivs &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fdivd
99
1010 float %f1(float %a, float %b) {
1111 entry:
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep movmi &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep moveq &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep movgt &&
4 ; RUN: llvm-as < %s | llc -march=arm | grep movge &&
5 ; RUN: llvm-as < %s | llc -march=arm | grep movls &&
6 ; RUN: llvm-as < %s | llc -march=arm | grep movne &&
7 ; RUN: llvm-as < %s | llc -march=arm | grep fcmps &&
8 ; RUN: llvm-as < %s | llc -march=arm | grep fcmpd
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movmi &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep moveq &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movgt &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movge &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movls &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movne &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fcmps &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fcmpd
99
1010 int %f1(float %a) {
1111 entry:
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep fcvtsd &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep fcvtds &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep ftosis &&
4 ; RUN: llvm-as < %s | llc -march=arm | grep ftouis &&
5 ; RUN: llvm-as < %s | llc -march=arm | grep ftosid &&
6 ; RUN: llvm-as < %s | llc -march=arm | grep ftouid &&
7 ; RUN: llvm-as < %s | llc -march=arm | grep fsitos &&
8 ; RUN: llvm-as < %s | llc -march=arm | grep fsitod &&
9 ; RUN: llvm-as < %s | llc -march=arm | grep fuitos &&
10 ; RUN: llvm-as < %s | llc -march=arm | grep fuitod
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fcvtsd &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fcvtds &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ftosis &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ftouis &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ftosid &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ftouid &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fsitos &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fsitod &&
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fuitos &&
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep fuitod
1111
1212 float %f1(double %x) {
1313 entry:
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep flds | wc -l | grep 2 &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep "flds.*\[" | wc -l | grep 1 &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep "fsts.*\[" | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep flds | wc -l | grep 2 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "flds.*\[" | wc -l | grep 1 &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "fsts.*\[" | wc -l | grep 1
44
55 float %f1(float %a) {
66 entry:
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep mov | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep mov | wc -l | grep 1
22 %str = internal constant [12 x sbyte] c"Hello World\00" ; <[12 x sbyte]*> [#uses=1]
33
44 implementation ; Functions:
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep "ldr r0.*#0" | wc -l | grep 2 &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep "ldr r0.*#4092" | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldr r0.*#0" | wc -l | grep 2 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "ldr r0.*#4092" | wc -l | grep 1
33
44 int %f1(int* %v) {
55 entry:
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep ldrsb &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep ldrb &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep ldrsh &&
4 ; RUN: llvm-as < %s | llc -march=arm | grep ldrh
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ldrsb &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ldrb &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ldrsh &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ldrh
55
66 int %f1(sbyte* %p) {
77 entry:
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep "mov r1, #0" | wc -l | grep 4 &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #1" | wc -l | grep 1 &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep ".word.*2147483647" | wc -l | grep 2 &&
4 ; RUN: llvm-as < %s | llc -march=arm | grep "mov r0, #-2147483648" | wc -l | grep 1 &&
5 ; RUN: llvm-as < %s | llc -march=arm | grep ".word.*4294967295" | wc -l | grep 1 &&
6 ; RUN: llvm-as < %s | llc -march=arm | grep "adds" | wc -l | grep 1 &&
7 ; RUN: llvm-as < %s | llc -march=arm | grep "adcs" | wc -l | grep 1 &&
8 ; RUN: llvm-as < %s | llc -march=arm | grep "subs" | wc -l | grep 1 &&
9 ; RUN: llvm-as < %s | llc -march=arm | grep "sbcs" | wc -l | grep 1 &&
10 ; RUN: llvm-as < %s | llc -march=arm | grep "smull" | wc -l | grep 1 &&
11 ; RUN: llvm-as < %s | llc -march=arm | grep "umull" | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r1, #0" | wc -l | grep 4 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #1" | wc -l | grep 1 &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ".word.*2147483647" | wc -l | grep 2 &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mov r0, #-2147483648" | wc -l | grep 1 &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ".word.*4294967295" | wc -l | grep 1 &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "adds" | wc -l | grep 1 &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "adcs" | wc -l | grep 1 &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "subs" | wc -l | grep 1 &&
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "sbcs" | wc -l | grep 1 &&
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "smull" | wc -l | grep 1 &&
11 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "umull" | wc -l | grep 1
1212
1313 long %f1() {
1414 entry:
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep __ashldi3 &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep __ashrdi3 &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep __lshrdi3
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __ashldi3 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __ashrdi3 &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __lshrdi3
44 uint %f1(ulong %x, ubyte %y) {
55 entry:
66 %a = shl ulong %x, ubyte %y
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep strb &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep strh
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep strb &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep strh
33
44 void %f1() {
55 entry:
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep "mul r0, r12, r0" | wc -l | grep 1 &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep "mul r0, r1, r0" | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mul r0, r12, r0" | wc -l | grep 1 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "mul r0, r1, r0" | wc -l | grep 1
33
44 int %mul1(int %u) {
55 entry:
None ; RUN: llvm-as < %s | llc -march=arm
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
11 int %test(int %a1) {
22 ret int %a1
33 }
None ; RUN: llvm-as < %s | llc -march=arm
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
11 int %test(int %a1, int %a2) {
22 ret int %a2
33 }
None ; RUN: llvm-as < %s | llc -march=arm
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
11 int %test(int %a1, int %a2, int %a3) {
22 ret int %a3
33 }
None ; RUN: llvm-as < %s | llc -march=arm
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
11 int %test(int %a1, int %a2, int %a3, int %a4) {
22 ret int %a4
33 }
None ; RUN: llvm-as < %s | llc -march=arm
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
11 int %test(int %a1, int %a2, int %a3, int %a4, int %a5) {
22 ret int %a5
33 }
None ; RUN: llvm-as < %s | llc -march=arm
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
11 void %test() {
22 ret void
33 }
None ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep moveq | wc -l | grep 1 &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep movgt | wc -l | grep 1 &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep movlt | wc -l | grep 1 &&
4 ; RUN: llvm-as < %s | llc -march=arm | grep movle | wc -l | grep 1 &&
5 ; RUN: llvm-as < %s | llc -march=arm | grep movls | wc -l | grep 1 &&
6 ; RUN: llvm-as < %s | llc -march=arm | grep movhi | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep moveq | wc -l | grep 1 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movgt | wc -l | grep 1 &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movlt | wc -l | grep 1 &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movle | wc -l | grep 1 &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movls | wc -l | grep 1 &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep movhi | wc -l | grep 1
77
88 int %f1(int %a) {
99 entry:
None ; RUN: llvm-as < %s | llc -march=arm
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
11 %str = internal constant [43 x sbyte] c"Hello World %d %d %d %d %d %d %d %d %d %d\0A\00" ; <[43 x sbyte]*> [#uses=1]
22
33 implementation ; Functions:
None ; RUN: llvm-as < %s | llc -march=arm
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
11 %str = internal constant [7 x ubyte] c"%d %d\0A\00" ; <[7 x ubyte]*> [#uses=1]
22
33 implementation ; Functions:
0 ; There should be exactly two calls here (memset and malloc), no more.
1 ; RUN: llvm-as < %s | llc -march=alpha | grep jsr | wc -l | grep 2
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep jsr | wc -l | grep 2
22
33 implementation ; Functions:
44
0 ; This shouldn't crash
1 ; RUN: llvm-as < %s | llc -march=alpha
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
22
33 ; ModuleID = 'bugpoint-reduced-simplified.bc'
44 target endian = little
0 ; The global symbol should be legalized
1 ; RUN: llvm-as < %s | llc -march=alpha
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
22
33 target endian = little
44 target pointersize = 64
0 ; This shouldn't crash
1 ; RUN: llvm-as < %s | llc -march=alpha
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
22
33 ; ModuleID = 'simp.bc'
44 target endian = little
None ; RUN: llvm-as < %s | llc -march=alpha
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
11
22 target endian = little
33 target pointersize = 64
None ; RUN: llvm-as < %s | llc -march=alpha
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
11
22 target endian = little
33 target pointersize = 64
None ; RUN: llvm-as < %s | llc -march=alpha
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
11
22 target datalayout = "e-p:64:64"
33 target endian = little
0 ;test all the shifted and signextending adds and subs with and without consts
11
2 ; RUN: llvm-as < %s | llc -march=alpha | grep ' addl' |wc -l |grep 2 &&
3 ; RUN: llvm-as < %s | llc -march=alpha | grep ' addq' |wc -l |grep 2 &&
4 ; RUN: llvm-as < %s | llc -march=alpha | grep ' subl' |wc -l |grep 2 &&
5 ; RUN: llvm-as < %s | llc -march=alpha | grep ' subq' |wc -l |grep 1 &&
6 ; RUN: llvm-as < %s | llc -march=alpha | grep 'lda $0,-100($16)' |wc -l |grep 1 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep ' addl' |wc -l |grep 2 &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep ' addq' |wc -l |grep 2 &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep ' subl' |wc -l |grep 2 &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep ' subq' |wc -l |grep 1 &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'lda $0,-100($16)' |wc -l |grep 1 &&
77
8 ; RUN: llvm-as < %s | llc -march=alpha | grep 's4addl' |wc -l |grep 2 &&
9 ; RUN: llvm-as < %s | llc -march=alpha | grep 's8addl' |wc -l |grep 2 &&
10 ; RUN: llvm-as < %s | llc -march=alpha | grep 's4addq' |wc -l |grep 2 &&
11 ; RUN: llvm-as < %s | llc -march=alpha | grep 's8addq' |wc -l |grep 2 &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's4addl' |wc -l |grep 2 &&
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's8addl' |wc -l |grep 2 &&
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's4addq' |wc -l |grep 2 &&
11 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's8addq' |wc -l |grep 2 &&
1212
13 ; RUN: llvm-as < %s | llc -march=alpha | grep 's4subl' |wc -l |grep 2 &&
14 ; RUN: llvm-as < %s | llc -march=alpha | grep 's8subl' |wc -l |grep 2 &&
15 ; RUN: llvm-as < %s | llc -march=alpha | grep 's4subq' |wc -l |grep 2 &&
16 ; RUN: llvm-as < %s | llc -march=alpha | grep 's8subq' |wc -l |grep 2
13 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's4subl' |wc -l |grep 2 &&
14 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's8subl' |wc -l |grep 2 &&
15 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's4subq' |wc -l |grep 2 &&
16 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 's8subq' |wc -l |grep 2
1717
1818 implementation ; Functions:
1919
0 ; Make sure this testcase codegens to the bic instruction
1 ; RUN: llvm-as < %s | llc -march=alpha | grep 'bic'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'bic'
22
33 implementation ; Functions:
44
0 ; Make sure this testcase codegens the bsr instruction
1 ; RUN: llvm-as < %s | llc -march=alpha | grep 'bsr'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'bsr'
22
33 implementation
44
0 ;All this should do is not crash
1 ;RUN: llvm-as < %s | llc -march=alpha
1 ;RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha
22
33 target endian = little
44 target pointersize = 64
None ; RUN: llvm-as < %s | llc -march=alpha | not grep cmovlt
1 ; RUN: llvm-as < %s | llc -march=alpha | grep cmoveq
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | not grep cmovlt
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep cmoveq
22
33 long %cmov_lt(long %a, long %c) {
44 entry:
None ; RUN: llvm-as < %s | llc -march=alpha | grep cmpbge | wc -l | grep 2
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep cmpbge | wc -l | grep 2
11
22 bool %test1(ulong %A, ulong %B) {
33 %C = and ulong %A, 255
0 ; Make sure this testcase codegens to the ctlz instruction
1 ; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev67 | grep -i 'ctlz'
2 ; RUN: llvm-as < %s | llc -march=alpha -mattr=+CIX | grep -i 'ctlz'
3 ; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev6 | not grep -i 'ctlz'
4 ; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev56 | not grep -i 'ctlz'
5 ; RUN: llvm-as < %s | llc -march=alpha -mattr=-CIX | not grep -i 'ctlz'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev67 | grep -i 'ctlz'
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=+CIX | grep -i 'ctlz'
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev6 | not grep -i 'ctlz'
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev56 | not grep -i 'ctlz'
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=-CIX | not grep -i 'ctlz'
66
77 declare ubyte %llvm.ctlz(ubyte)
88
0 ; Make sure this testcase does not use ctpop
1 ; RUN: llvm-as < %s | llc -march=alpha | grep -i 'ctpop' |wc -l |grep 0
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep -i 'ctpop' |wc -l |grep 0
22
33 declare ulong %llvm.ctlz(ulong)
44
0 ; Make sure this testcase codegens to the ctpop instruction
1 ; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev67 | grep -i 'ctpop'
2 ; RUN: llvm-as < %s | llc -march=alpha -mattr=+CIX | grep -i 'ctpop'
3 ; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev6 | not grep -i 'ctpop'
4 ; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev56 | not grep -i 'ctpop'
5 ; RUN: llvm-as < %s | llc -march=alpha -mattr=-CIX | not grep -i 'ctpop'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev67 | grep -i 'ctpop'
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=+CIX | grep -i 'ctpop'
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev6 | not grep -i 'ctpop'
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mcpu=ev56 | not grep -i 'ctpop'
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha -mattr=-CIX | not grep -i 'ctpop'
66
77
88 declare long %llvm.ctpop(long)
0 ; Make sure this testcase codegens to the eqv instruction
1 ; RUN: llvm-as < %s | llc -march=alpha | grep 'eqv'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'eqv'
22
33 implementation ; Functions:
44
0 ; Make sure this testcase codegens to the ctpop instruction
1 ; RUN: llvm-as < %s | llc -march=alpha | grep -i 'subl $16,1,$0'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep -i 'subl $16,1,$0'
22
33 implementation ; Functions:
44
0 ; try to check that we have the most important instructions, which shouldn't appear otherwise
1 ; RUN: llvm-as < %s | llc -march=alpha | grep 'jmp' &&
2 ; RUN: llvm-as < %s | llc -march=alpha | grep 'gprel32' &&
3 ; RUN: llvm-as < %s | llc -march=alpha | grep 'ldl' &&
4 ; RUN: llvm-as < %s | llc -march=alpha | grep 'rodata'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'jmp' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'gprel32' &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'ldl' &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'rodata'
55
66 target endian = little
77 target pointersize = 64
0 ; Make sure this testcase does not use mulq
1 ; RUN: llvm-as < %s | llc -march=alpha | grep -i 'mul' |wc -l |grep 0
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep -i 'mul' |wc -l |grep 0
22
33 implementation ; Functions:
44
0 ; Make sure this testcase codegens to the lda -1 instruction
1 ; RUN: llvm-as < %s | llc -march=alpha | grep '\-1'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep '\-1'
22
33 implementation ; Functions:
44
0 ; Make sure this testcase codegens to the ornot instruction
1 ; RUN: llvm-as < %s | llc -march=alpha | grep 'eqv'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'eqv'
22
33 implementation ; Functions:
44
0 ; Make sure this testcase codegens to the ornot instruction
1 ; RUN: llvm-as < %s | llc -march=alpha | grep 'ornot'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'ornot'
22
33 implementation ; Functions:
44
None ; RUN: llvm-as < %s | llc -march=alpha | grep rpcc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep rpcc
11
22 declare ulong %llvm.readcyclecounter()
33
0 ; Make sure this testcase codegens to the zapnot instruction
1 ; RUN: llvm-as < %s | llc -march=alpha | grep 'zapnot'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'zapnot'
22
33 ulong %foo(ulong %y) {
44 entry:
0 ; Make sure this testcase codegens to the bic instruction
1 ; RUN: llvm-as < %s | llc -march=alpha | grep 'zapnot'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'zapnot'
22
33 implementation ; Functions:
44
0 ; Make sure this testcase codegens to the zapnot instruction
1 ; RUN: llvm-as < %s | llc -march=alpha | grep 'zapnot'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep 'zapnot'
22
33 implementation ; Functions:
44
None ; RUN: llvm-as < %s | llc -march=alpha | grep zapnot | wc -l | grep 2
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep zapnot | wc -l | grep 2
11
22 ulong %foo(ulong %y) {
33 %tmp = and ulong %y, 65535
None ; RUN: llvm-as < %s | llc -march=alpha | grep zapnot
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=alpha | grep zapnot
11
22 ulong %foo(ulong %y) {
33 %tmp = shl ulong %y, ubyte 3 ; [#uses=1]
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 ; Make sure that global variables do not collide if they have the same name,
33 ; but different types.
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 ; This case was emitting code that looked like this:
33 ; ...
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 ; Test const pointer refs & forward references
33
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 global int* cast (float* %0 to int*) ;; Forward numeric reference
33 global float* %0 ;; Duplicate forward numeric reference
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 %sptr1 = global [11x sbyte]* %somestr ;; Forward ref to a constant
33 %somestr = constant [11x sbyte] c"hello world"
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 %fptr = global void() * %f ;; Forward ref method defn
33 declare void "f"() ;; External method
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 %array = constant [2 x int] [ int 12, int 52 ] ; <[2 x int]*> [#uses=1]
33 %arrayPtr = global int* getelementptr ([2 x int]* %array, long 0, long 0) ; [#uses=1]
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 %MyIntList = uninitialized global { \2 *, int }
33
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 ; The C Writer bombs on this testcase because it tries the print the prototype
33 ; for the test function, which tries to print the argument name. The function
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 ; Indirect function call test... found by Joel & Brian
33 ;
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 ; This testcase fails because the C backend does not arrange to output the
33 ; contents of a structure type before it outputs the structure type itself.
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22
33
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22
33 declare void %foo(...)
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 %MPI_Comm = type %struct.Comm*
33 %struct.Comm = type opaque
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 %bob = external global int ; [#uses=2]
33
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22
33 %BitField = type int
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 %testString = internal constant [18 x sbyte] c "Escaped newline\n\00"
33
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 ; Apparently this constant was unsigned in ISO C 90, but not in C 99.
33
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 ; This testcase breaks the C backend, because gcc doesn't like (...) functions
33 ; with no arguments at all.
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 ; The C backend was dying when there was no typename for a struct type!
33
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22
33 %X = type { int, float }
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 ; Make sure hex constant does not continue into a valid hexadecimal letter/number
33 %version = global [3 x sbyte] c"\001\00"
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22
33 %version = global [3 x sbyte] c"1\00\00"
0
1 ; RUN: llvm-as < %s | llc -march=c > %t1.cbe.c
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c > %t1.cbe.c
22 ; RUN: gcc -B/usr/bin/ %t1.cbe.c -o %t1.cbe
33 ; RUN: %t1.cbe
44
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22
33 declare int %callee(int, int)
None ; RUN: llvm-as < %s | llc -march=c | grep common | grep X
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep common | grep X
11
22 %X = linkonce global int 5
33
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 ; This is a non-normal FP value: it's a nan.
33 %NAN = global { float } { float 0x7FF8000000000000 }
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22
33 %A = type { uint, sbyte*, { uint, uint, uint, uint, uint, uint, uint, uint }*, ushort }
0 ; XFAIL: *
1 ; RUN: llvm-as < %s | llc -march=c
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
22
33
44 declare sbyte* %llvm.va_start()
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 ; reduced from DOOM.
33 %union._XEvent = type { int }
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 %y = weak global sbyte 0
33 implementation
None ; RUN: llvm-as < %s | llc -march=c | grep builtin_return_address
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep builtin_return_address
11
22 declare sbyte* %llvm.returnaddress(uint)
33 declare sbyte* %llvm.frameaddress(uint)
33 ; this testcase for example, which caused the CBE to mangle one, screwing
44 ; everything up. :( Test that this does not happen anymore.
55 ;
6 ; RUN: llvm-as < %s | llc -march=c | not grep _memcpy
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | not grep _memcpy
77
88 declare void %llvm.memcpy(sbyte*, sbyte*, uint,uint)
99 declare float* %memcpy(int*, uint,int)
0 ; This is a non-normal FP value
1 ; RUN: llvm-as < %s | llc -march=c | grep FPConstant | grep static
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep FPConstant | grep static
22
33 float %func () {
44 ret float 0xFFF0000000000000 ; -inf
None ; RUN: llvm-as < %s | llc -march=c | grep func1 | grep WEAK
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep func1 | grep WEAK
11
22 implementation
33
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 declare void %llvm.va_end(sbyte*)
33
0 ; The CBE should not emit code that casts the function pointer. This causes
11 ; GCC to get testy and insert trap instructions instead of doing the right
22 ; thing. :(
3 ; RUN: llvm-as < %s | llc -march=c
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
44
55 implementation
66
None ; RUN: llvm-as < %s | llc -march=c | not grep 'extern.*msg'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | not grep 'extern.*msg'
11
22 ; This is PR472
33
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 int %foo() {
33 ret int and (int 123456, int cast (int()* %foo to int))
None ; RUN: llvm-as < %s | llc -march=c | grep volatile
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep volatile
11
22 void %test(int* %P) {
33 %X = volatile load int*%P
None ; RUN: llvm-as < %s | llc -march=c
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c
11
22 %JNIEnv = type %struct.JNINa*
33 %struct.JNINa = type { sbyte*, sbyte*, sbyte*, void (%JNIEnv*)* }
None ; RUN: llvm-as < %s | llc -march=c | not grep "\-\-65535"
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | not grep "\-\-65535"
11 ; ModuleID = ''
22 target endian = little
33 target pointersize = 32
None ; RUN: llvm-as < %s | llc -march=c | grep fmod
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep fmod
11
22 double %test(double %A, double %B) {
33 %C = rem double %A, %B
None ; RUN: llvm-as < %s | llc -march=c &&
1 ; RUN: llvm-as < %s | llc -march=c | grep '\* *volatile *\*'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c | grep '\* *volatile *\*'
22
33 %G = external global void()*
44
None ; RUN: llvm-as < %s | llc -enable-correct-eh-support
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -enable-correct-eh-support
11
22 int %test() {
33 unwind
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %global_long_1 = linkonce global long 7
33 %global_long_2 = linkonce global long 49
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 void %intersect_pixel() {
33 entry:
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11 %struct.TypHeader = type { uint, %struct.TypHeader**, [3 x sbyte], ubyte }
22 %.str_67 = external global [4 x sbyte] ; <[4 x sbyte]*> [#uses=1]
33 %.str_87 = external global [17 x sbyte] ; <[17 x sbyte]*> [#uses=1]
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11 ; Test that llvm.memcpy works with a i64 length operand on all targets.
22
33
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 void %test() {
33 %X = alloca {}
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11 float %t(long %u) {
22 %u = cast long %u to ulong ; [#uses=1]
33 %tmp5 = add ulong %u, 9007199254740991 ; [#uses=1]
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %str = external global [36 x sbyte] ; <[36 x sbyte]*> [#uses=0]
33 %str = external global [29 x sbyte] ; <[29 x sbyte]*> [#uses=0]
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 long %test(long %A) {
33 %B = cast long %A to sbyte
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 target endian = little
33 target pointersize = 32
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11 ; This crashed the PPC backend.
22
33 void %test() {
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11 %G = external global int
22
33 void %encode_one_frame(long %tmp.2i) {
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11 ; Infinite loop in the dag combiner, reduced from 176.gcc.
22
33 %struct._obstack_chunk = type { sbyte*, %struct._obstack_chunk*, [4 x sbyte] }
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 implementation ; Functions:
33
None ; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah
11
22 ; The vload was getting memoized to the previous scalar load!
33
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11 ; PR748
22
33 %G = external global ushort ; [#uses=1]
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 int %test(int %tmp93) {
33 %tmp98 = shl int %tmp93, ubyte 31 ; [#uses=1]
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %struct.FILE = type { ubyte*, int, int, short, short, %struct.__sbuf, int, sbyte*, int (sbyte*)*, int (sbyte*, sbyte*, int)*, long (sbyte*, long, int)*, int (sbyte*, sbyte*, int)*, %struct.__sbuf, %struct.__sFILEX*, int, [3 x ubyte], [1 x ubyte], %struct.__sbuf, int, long }
33 %struct.SYMBOL_TABLE_ENTRY = type { [9 x sbyte], [9 x sbyte], int, int, uint, %struct.SYMBOL_TABLE_ENTRY* }
None ; RUN: llvm-as < %s | llc -fast
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -fast
11
22 float %test(uint %tmp12771278) {
33 switch uint %tmp12771278, label %bb1279 [
None ; RUN: llvm-as < %s | llc -fast
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -fast
11
22 %struct.cl_perfunc_opts = type { ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, int, int, int, int, int, int, int }
33 %cl_pf_opts = external global %struct.cl_perfunc_opts ; <%struct.cl_perfunc_opts*> [#uses=2]
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11 %struct.rtunion = type { long }
22 %struct.rtx_def = type { ushort, ubyte, ubyte, [1 x %struct.rtunion] }
33 %ix86_cpu = external global uint ; [#uses=1]
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %struct.CUMULATIVE_ARGS = type { int, int, int, int, int, int, int, int, int, int, int, int, int, int }
33 %struct.VEC_edge = type { uint, uint, [1 x %struct.edge_def*] }
None ; RUN: llvm-as < %s | llc -regalloc=local
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -regalloc=local
11
22 %struct.CHESS_POSITION = type { ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, ulong, uint, int, sbyte, sbyte, [64 x sbyte], sbyte, sbyte, sbyte, sbyte, sbyte }
33 %search = external global %struct.CHESS_POSITION ; <%struct.CHESS_POSITION*> [#uses=2]
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 void %foo() {
33 br label %cond_true813.i
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 void %start_pass_huff(int %gather_statistics) {
33 entry:
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 void %form_component_prediction(int %dy) {
33 entry:
None ; RUN: llvm-as < %s | llc -march=x86 &&
1 ; RUN: llvm-as < %s | llc -march=x86 | not grep adc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep adc
22
33 ; PR987
44
None ; RUN: llvm-as < %s | llc -march=ppc32 | grep rlwimi
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep rlwimi
11
22 void %test(short %div.0.i.i.i.i, int %L_num.0.i.i.i.i, int %tmp1.i.i206.i.i, short* %P) {
33 %X = shl short %div.0.i.i.i.i, ubyte 1 ; [#uses=1]
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11 ; PR1011
22
33 %struct.mng_data = type { sbyte* (%struct.mng_data*, uint)*, int, int, int, sbyte, sbyte, int, int, int, int, int }
0 ; New testcase, this contains a bunch of simple instructions that should be
11 ; handled by a code generator.
22
3 ; RUN: llvm-as < %s | llc
3 ; RUN: llvm-upgrade < %s | llvm-as | llc
44
55 int %add(int %A, int %B) {
66 %R = add int %A, %B
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %.str_1 = internal constant [16 x sbyte] c"%d %d %d %d %d\0A\00"
33
0 ; Verify debugger intrinsics are ignored or accepted.
1 ; RUN: llvm-as < %s | llc
1 ; RUN: llvm-upgrade < %s | llvm-as | llc
22
33 ;; Debugger type declarations
44 %lldb.compile_unit = type { uint, ushort, ushort, sbyte*, sbyte*, sbyte*, {}* }
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 implementation
33
None ; RUN: llvm-as < %s | llc -march=x86 | grep cmp | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep cmp | wc -l | grep 1
11 ; PR964
22
33 sbyte* %FindChar(sbyte* %CurPtr) {
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11 double %test(bool %X) {
22 %Y = cast bool %X to double
33 ret double %Y
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 int %foo(int %x) {
33 ret int %x
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 int %foo(int %x) {
33 ret int 42
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 void %foo() {
33 ret void
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 int %bar(int %x) {
33 ret int 0
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %a_fstr = internal constant [8 x sbyte] c"a = %f\0A\00"
33 %a_lstr = internal constant [10 x sbyte] c"a = %lld\0A\00"
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11 %lldb.compile_unit = type { uint, ushort, ushort, sbyte*, sbyte*, sbyte*, { }* }
22 %d.compile_unit7 = external global %lldb.compile_unit ; <%lldb.compile_unit*> [#uses=1]
33
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 int %test(int %X) {
33 %Y = div int %X, -2
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 double %fneg(double %X) {
33 %Y = sub double -0.0, %X
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 sbyte %test1(double %X) {
33 %tmp.1 = cast double %X to sbyte
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %g = global int 0
33
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %.str_1 = internal constant [7 x sbyte] c"hello\0A\00"
33
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 ;; SQRT
33 declare float %llvm.sqrt(float)
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11 ; XFAIL: ia64|sparcv8
22
33
0 ; Make sure this testcase is supported by all code generators
1 ; RUN: llvm-as < %s | llc
1 ; RUN: llvm-upgrade < %s | llvm-as | llc
22
33 declare long %llvm.ctpop(long)
44 declare int %llvm.ctpop(int)
None ; RUN: llvm-as < %s | llc -o /dev/null -f
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -o /dev/null -f
11
22 ; Test that select of a select works
33
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %.str_1 = internal constant [4 x sbyte] c"%d\0A\00"
33
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %a_str = internal constant [8 x sbyte] c"a = %f\0A\00"
33 %b_str = internal constant [8 x sbyte] c"b = %f\0A\00"
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
33 %b_str = internal constant [8 x sbyte] c"b = %d\0A\00"
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %.str_1 = internal constant [4 x sbyte] c"%d\0A\00"
33
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
33 %a_mul_str = internal constant [13 x sbyte] c"a * %d = %d\0A\00"
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
33 %b_str = internal constant [8 x sbyte] c"b = %d\0A\00"
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %a_str = internal constant [8 x sbyte] c"a = %d\0A\00"
33 %b_str = internal constant [8 x sbyte] c"b = %d\0A\00"
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 int %main() {
33 ret int 0
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 int %main() {
33 ret int 42
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 long %test_imm(long %X) {
33 %Y = shr long %X, ubyte 17
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 declare sbyte* %llvm.stacksave()
33 declare void %llvm.stackrestore(sbyte*)
None ; RUN: llvm-as < %s | llc -march=x86 &&
1 ; RUN: llvm-as < %s | llc -march=x86 | grep 'mov.*str1' | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'mov.*str1' | wc -l | grep 1
22 ; PR925
33
44 target endian = little
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 void ""(float* %inregs, float* %outregs) {
33 %a_addr.i = alloca <4 x float> ; <<4 x float>*> [#uses=1]
None ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep _test &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | not grep vperm
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep _test &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep vperm
22
33 void %test(<4 x float> *%tmp2.i) {
44 %tmp2.i = load <4x float>* %tmp2.i
0 ; Test that vectors are scalarized/lowered correctly.
1 ; RUN: llvm-as < %s | llc &&
2 ; RUN: llvm-as < %s | llc -mtriple a-b-c &&
3 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 &&
4 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g3 &&
5 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=i386 &&
6 ; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah
1 ; RUN: llvm-upgrade < %s | llvm-as | llc &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple a-b-c &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g3 &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=i386 &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mcpu=yonah
77
88 %f1 = type <1 x float>
99 %f2 = type <2 x float>
None ; RUN: llvm-as < %s | llc -march=ia64
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ia64
11
22 %_ZN9__gnu_cxx16__stl_prime_listE = external global [28 x uint] ; <[28 x uint]*> [#uses=3]
33
0 ; this should turn into shladd
1 ; RUN: llvm-as < %s | llc -march=ia64 | grep 'shladd'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ia64 | grep 'shladd'
22
33 implementation ; Functions:
44
None ; RUN: llvm-as < %s | llc -march=ia64
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ia64
11
22 double %test() {
33 ret double 0.0
None ; RUN: llvm-as < %s | llc -march=ppc32
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
11
22 void %main() {
33 %tr1 = shr uint 1, ubyte 0
None ; RUN: llvm-as < %s | llc -march=ppc32
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
11
22 void %main() {
33 %tr4 = shl ulong 1, ubyte 0 ; [#uses=0]
None ; RUN: llvm-as < %s | llc -march=ppc32
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
11
22 void %main() {
33 %shamt = add ubyte 0, 1 ; [#uses=1]
None ; RUN: llvm-as < %s | llc -march=ppc32 | not grep '.comm.*X,0'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep '.comm.*X,0'
11
22 %X = linkonce global {} {}
None ; RUN: llvm-as < %s | llc -march=ppc32
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
11
22 int %main() {
33 %setle = setle long 1, 0
None ; RUN: llvm-as < %s | llc -march=ppc32
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
11
22 long %test() { ret long undef }
0 ; this should not crash the ppc backend
11
2 ; RUN: llvm-as < %s | llc -march=ppc32
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
33
44 uint %test( int %j.0.0.i) {
55 %tmp.85.i = and int %j.0.0.i, 7
0 ; This function should have exactly one call to fixdfdi, no more!
11
2 ; RUN: llvm-as < %s | llc -march=ppc32 -mattr=-64bit | grep 'bl .*fixdfdi' | wc -l | grep 1
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mattr=-64bit | grep 'bl .*fixdfdi' | wc -l | grep 1
33
44 double %test2(double %tmp.7705) {
55 %mem_tmp.2.0.in = cast double %tmp.7705 to long ; [#uses=1]
0 ; This was erroneously being turned into an rlwinm instruction.
11 ; The sign bit does matter in this case.
22
3 ; RUN: llvm-as < %s | llc -march=ppc32 | grep srawi
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep srawi
44 int %test(int %X) {
55 %Y = and int %X, -2
66 %Z = shr int %Y, ubyte 11
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11 target endian = big
22 target pointersize = 32
33 target triple = "powerpc-apple-darwin8.2.0"
None ; RUN: llvm-as < %s | llc &&
1 ; RUN: llvm-as < %s | llc | not grep ', f1'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc | not grep ', f1'
22
33 target endian = big
44 target pointersize = 32
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 void %iterative_hash_host_wide_int() {
33 %zero = alloca int ; [#uses=2]
None ; RUN: llvm-as < %s | llc -march=ppc32
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
11
22 double %CalcSpeed(float %tmp127) {
33 %tmp145 = cast float %tmp127 to double ; [#uses=1]
None ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep 'vspltish v.*, 10'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep 'vspltish v.*, 10'
11
22 void %test(<8 x short>* %P) {
33 %tmp = load <8 x short>* %P ; <<8 x short>> [#uses=1]
None ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5
11
22 void %test(sbyte* %stack) {
33 entry:
None ; RUN: llvm-as < %s | llc -march=ppc32
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
11
22 %struct.attr_desc = type { sbyte*, %struct.attr_desc*, %struct.attr_value*, %struct.attr_value*, uint }
33 %struct.attr_value = type { %struct.rtx_def*, %struct.attr_value*, %struct.insn_ent*, int, int }
None ; RUN: llvm-as < %s | llc -mtriple=powerpc64-apple-darwin | grep extsw | wc -l | grep 2
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=powerpc64-apple-darwin | grep extsw | wc -l | grep 2
11
22 %lens = external global ubyte*
33 %vals = external global int*
None ; RUN: llvm-as < %s | llc -march=ppc32
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32
11
22 void %img2buf(int %symbol_size_in_bytes, ushort* %ui16) {
33 %tmp93 = load ushort* null ; [#uses=1]
None ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep vsldoi &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | not grep vor
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep vsldoi &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | not grep vor
22
33 <4 x float> %func(<4 x float> %fp0, <4 x float> %fp1) {
44 %tmp76 = shufflevector <4 x float> %fp0, <4 x float> %fp1, <4 x uint> < uint 0, uint 1, uint 2, uint 7 > ; <<4 x float>> [#uses=1]
None ; RUN: llvm-as < %s | llc
0 ; RUN: llvm-upgrade < %s | llvm-as | llc
11
22 %struct..0anon = type { int }
33 %struct.rtx_def = type { ushort, ubyte, ubyte, [1 x %struct..0anon] }
None ; RUN: llvm-as < %s | llc -march=ppc64
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64
11 target endian = big
22 target pointersize = 64
33 target triple = "powerpc64-apple-darwin8"
None ; RUN: llvm-as < %s | llc -march=ppc32 -combiner-alias-analysis | grep 'f5'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -combiner-alias-analysis | grep 'f5'
11
22 target endian = big
33 target pointersize = 32
None ; RUN: llvm-as < %s | llc -march=ppc32 &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep IMPLICIT_DEF
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep IMPLICIT_DEF
22
33 void %foo(long %X) {
44 entry:
None ; RUN: llvm-as < %s | llc -march=ppc32 | grep xor
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep xor
11
22 target endian = big
33 target pointersize = 32
None ; RUN: llvm-as < %s | llc -march=ppc64
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64
11
22 int * %foo(uint %n) {
33 %A = alloca int, uint %n
None ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5
11
22 void %glgRunProcessor15() {
33 %tmp26355.i = shufflevector <4 x float> zeroinitializer, <4 x float> < float 0x379FFFE000000000, float 0x379FFFE000000000, float 0x379FFFE000000000, float 0x379FFFE000000000 >, <4 x uint> < uint 0, uint 1, uint 2, uint 7 > ; <<4 x float>> [#uses=1]
None ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'rlwinm r0, r1, 0, 22, 31' &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'subfic r0, r0, -17408' &&
2 ; RUN: llvm-as < %s | llc -march=ppc64 | grep 'rldicl r0, r1, 0, 54'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'rlwinm r0, r1, 0, 22, 31' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'subfic r0, r0, -17408' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'rldicl r0, r1, 0, 54'
33
44
55 implementation
None ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'stw r31, 20(r1)' &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'stwu r1, -64(r1)' &&
2 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'lwz r1, 0(r1)' &&
3 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'lwz r31, 20(r1)' &&
4 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
5 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'stwu r1, -64(r1)' &&
6 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'lwz r1, 0(r1)' &&
7 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
8 ; RUN: llvm-as < %s | llc -march=ppc64 | grep 'std r31, 40(r1)' &&
9 ; RUN: llvm-as < %s | llc -march=ppc64 | grep 'stdu r1, -112(r1)' &&
10 ; RUN: llvm-as < %s | llc -march=ppc64 | grep 'ld r1, 0(r1)' &&
11 ; RUN: llvm-as < %s | llc -march=ppc64 | grep 'ld r31, 40(r1)' &&
12 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'std r31, 40(r1)' &&
13 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'stdu r1, -112(r1)' &&
14 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'ld r1, 0(r1)' &&
15 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'ld r31, 40(r1)'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'stw r31, 20(r1)' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'stwu r1, -64(r1)' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'lwz r1, 0(r1)' &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'lwz r31, 20(r1)' &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stwu r1, -64(r1)' &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lwz r1, 0(r1)' &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'std r31, 40(r1)' &&
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'stdu r1, -112(r1)' &&
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'ld r1, 0(r1)' &&
11 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'ld r31, 40(r1)' &&
12 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'std r31, 40(r1)' &&
13 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'stdu r1, -112(r1)' &&
14 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ld r1, 0(r1)' &&
15 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ld r31, 40(r1)'
1616
1717
1818 implementation
None ; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'stw r31, 20(r1)' &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'lis r0, -1' &&
2 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'ori r0, r0, 32704' &&
3 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'stwux r1, r1, r0' &&
4 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'lwz r1, 0(r1)' &&
5 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'lwz r31, 20(r1)' &&
6 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
7 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'lis r0, -1' &&
8 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'ori r0, r0, 32704' &&
9 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'stwux r1, r1, r0' &&
10 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'lwz r1, 0(r1)' &&
11 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
12 ; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'std r31, 40(r1)' &&
13 ; RUN: llvm-as < %s | llc -march=ppc64 | grep 'lis r0, -1' &&
14 ; RUN: llvm-as < %s | llc -march=ppc64 | grep 'ori r0, r0, 32656' &&
15 ; RUN: llvm-as < %s | llc -march=ppc64 | grep 'stdux r1, r1, r0' &&
16 ; RUN: llvm-as < %s | llc -march=ppc64 | grep 'ld r1, 0(r1)' &&
17 ; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'ld r31, 40(r1)' &&
18 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'std r31, 40(r1)' &&
19 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'lis r0, -1' &&
20 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'ori r0, r0, 32656' &&
21 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'stdux r1, r1, r0' &&
22 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'ld r1, 0(r1)' &&
23 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'ld r31, 40(r1)'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'stw r31, 20(r1)' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'lis r0, -1' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'ori r0, r0, 32704' &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'stwux r1, r1, r0' &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'lwz r1, 0(r1)' &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'lwz r31, 20(r1)' &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lis r0, -1' &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'ori r0, r0, 32704' &&
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stwux r1, r1, r0' &&
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lwz r1, 0(r1)' &&
11 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
12 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'std r31, 40(r1)' &&
13 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'lis r0, -1' &&
14 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'ori r0, r0, 32656' &&
15 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'stdux r1, r1, r0' &&
16 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'ld r1, 0(r1)' &&
17 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'ld r31, 40(r1)' &&
18 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'std r31, 40(r1)' &&
19 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'lis r0, -1' &&
20 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ori r0, r0, 32656' &&
21 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'stdux r1, r1, r0' &&
22 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ld r1, 0(r1)' &&
23 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ld r31, 40(r1)'
2424
2525
2626 implementation
None ; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'stw r31, 20(r1)' &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'stwu r1, -.*(r1)' &&
2 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'addi r1, r1, ' &&
3 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'lwz r31, 20(r1)' &&
4 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | not grep 'stw r31, 20(r1)' &&
5 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | not grep 'stwu r1, -.*(r1)' &&
6 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | not grep 'addi r1, r1, ' &&
7 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | not grep 'lwz r31, 20(r1)' &&
8 ; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'std r31, 40(r1)' &&
9 ; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'stdu r1, -.*(r1)' &&
10 ; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'addi r1, r1, ' &&
11 ; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'ld r31, 40(r1)' &&
12 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | not grep 'stw r31, 40(r1)' &&
13 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | not grep 'stdu r1, -.*(r1)' &&
14 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | not grep 'addi r1, r1, ' &&
15 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | not grep 'ld r31, 40(r1)'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'stw r31, 20(r1)' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'stwu r1, -.*(r1)' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'addi r1, r1, ' &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'lwz r31, 20(r1)' &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | not grep 'stw r31, 20(r1)' &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | not grep 'stwu r1, -.*(r1)' &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | not grep 'addi r1, r1, ' &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | not grep 'lwz r31, 20(r1)' &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'std r31, 40(r1)' &&
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'stdu r1, -.*(r1)' &&
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'addi r1, r1, ' &&
11 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'ld r31, 40(r1)' &&
12 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | not grep 'stw r31, 40(r1)' &&
13 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | not grep 'stdu r1, -.*(r1)' &&
14 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | not grep 'addi r1, r1, ' &&
15 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | not grep 'ld r31, 40(r1)'
1616
1717
1818 implementation
None ; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'stw r31, 20(r1)' &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'stwu r1, -16448(r1)' &&
2 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'addi r1, r1, 16448' &&
3 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'lwz r31, 20(r1)' &&
4 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
5 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'stwu r1, -16448(r1)' &&
6 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'addi r1, r1, 16448' &&
7 ; RUN: llvm-as < %s | llc -march=ppc32 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
8 ; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'std r31, 40(r1)' &&
9 ; RUN: llvm-as < %s | llc -march=ppc64 | grep 'stdu r1, -16496(r1)' &&
10 ; RUN: llvm-as < %s | llc -march=ppc64 | grep 'addi r1, r1, 16496' &&
11 ; RUN: llvm-as < %s | llc -march=ppc64 | not grep 'ld r31, 40(r1)' &&
12 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'std r31, 40(r1)' &&
13 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'stdu r1, -16496(r1)' &&
14 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'addi r1, r1, 16496' &&
15 ; RUN: llvm-as < %s | llc -march=ppc64 -disable-fp-elim | grep 'ld r31, 40(r1)'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'stw r31, 20(r1)' &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'stwu r1, -16448(r1)' &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'addi r1, r1, 16448' &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'lwz r31, 20(r1)' &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stw r31, 20(r1)' &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'stwu r1, -16448(r1)' &&
6 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'addi r1, r1, 16448' &&
7 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -disable-fp-elim | grep 'lwz r31, 20(r1)' &&
8 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'std r31, 40(r1)' &&
9 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'stdu r1, -16496(r1)' &&
10 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'addi r1, r1, 16496' &&
11 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep 'ld r31, 40(r1)' &&
12 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'std r31, 40(r1)' &&
13 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'stdu r1, -16496(r1)' &&
14 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'addi r1, r1, 16496' &&
15 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 -disable-fp-elim | grep 'ld r31, 40(r1)'
1616
1717
1818 implementation
0 ; All of these should be codegen'd without loading immediates
1 ; RUN: llvm-as < %s | llc -march=ppc32 | grep addc | wc -l | grep 1 &&
2 ; RUN: llvm-as < %s | llc -march=ppc32 | grep adde | wc -l | grep 1 &&
3 ; RUN: llvm-as < %s | llc -march=ppc32 | grep addze | wc -l | grep 1 &&
4 ; RUN: llvm-as < %s | llc -march=ppc32 | grep addme | wc -l | grep 1 &&
5 ; RUN: llvm-as < %s | llc -march=ppc32 | grep addic | wc -l | grep 2
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep addc | wc -l | grep 1 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep adde | wc -l | grep 1 &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep addze | wc -l | grep 1 &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep addme | wc -l | grep 1 &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep addic | wc -l | grep 2
66
77 implementation ; Functions:
88
None ; RUN: llvm-as < %s | llc -march=ppc32 &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep addi
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep addi
22
33 %struct.X = type { [5 x sbyte] }
44 implementation ; Functions:
None ; RUN: llvm-as < %s | llc -march=ppc32 | grep "align.4" | wc -l | grep 1 &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | grep "align.2" | wc -l | grep 1 &&
2 ; RUN: llvm-as < %s | llc -march=ppc32 | grep "align.3" | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep "align.4" | wc -l | grep 1 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep "align.2" | wc -l | grep 1 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep "align.3" | wc -l | grep 1
33
44
55 %A = global <4 x uint> < uint 10, uint 20, uint 30, uint 40 >
None ; RUN: llvm-as < %s | llc -march=ppc32 &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep mfcr
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep mfcr
22
33 void %foo(int %X, int %Y, int %Z) {
44 entry:
None ; RUN: llvm-as < %s | llc -march=ppc32 &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwin
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep rlwin
22
33 void %test(ubyte* %P) {
44 %W = load ubyte* %P
None ; RUN: llvm-as < %s | llc -march=ppc32 | not grep 'ori\|lis'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep 'ori\|lis'
11
22 int %test(int %X) {
33 %Y = and int %X, 32769 ; andi. r3, r3, 32769
None ; RUN: llvm-as < %s | llc -march=ppc32 | grep slwi &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep addi &&
2 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwinm
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep slwi &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep addi &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep rlwinm
33
44 int %test(int %A) {
55 %B = mul int %A, 8 ;; shift
0 ; These tests should not contain a sign extend.
1 ; RUN: llvm-as < %s | llc -march=ppc32 &&
2 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep extsh &&
3 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep extsb
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep extsh &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep extsb
44
55 int %test1(uint %mode.0.i.0) {
66 %tmp.79 = cast uint %mode.0.i.0 to short
0 ; Neither of these functions should contain algebraic right shifts
1 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep srawi
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep srawi
22
33 int %test1(uint %mode.0.i.0) {
44 %tmp.79 = cast uint %mode.0.i.0 to int ; [#uses=1]
None ; RUN: llvm-as < %s | llc -march=ppc32 &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'b LBB.*cond_next48.loopexit' | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'b LBB.*cond_next48.loopexit' | wc -l | grep 1
22
33 target endian = big
44 target pointersize = 32
None ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'stwbrx\|lwbrx\|sthbrx\|lhbrx' | wc -l | grep 4 &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwinm &&
2 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep rlwimi &&
3 ; RUN: llvm-as < %s | llc -march=ppc64 | grep 'stwbrx\|lwbrx\|sthbrx\|lhbrx' | wc -l | grep 4 &&
4 ; RUN: llvm-as < %s | llc -march=ppc64 | not grep rlwinm &&
5 ; RUN: llvm-as < %s | llc -march=ppc64 | not grep rlwimi
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'stwbrx\|lwbrx\|sthbrx\|lhbrx' | wc -l | grep 4 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep rlwinm &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep rlwimi &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | grep 'stwbrx\|lwbrx\|sthbrx\|lhbrx' | wc -l | grep 4 &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep rlwinm &&
5 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc64 | not grep rlwimi
66
77 void %STWBRX(uint %i, sbyte* %ptr, int %off) {
88 %tmp1 = getelementptr sbyte* %ptr, int %off
0 ; There should be exactly one vxor here.
1 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | grep vxor | wc -l | grep 1 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | grep vxor | wc -l | grep 1 &&
22
33 ; There should be exactly one vsplti here.
4 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | grep vsplti | wc -l | grep 1
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 --enable-unsafe-fp-math | grep vsplti | wc -l | grep 1
55
66
77 void %VXOR(<4 x float>* %P1, <4 x int>* %P2, <4 x float>* %P3) {
0 ; Test various forms of calls.
11
2 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'bl ' | wc -l | grep 2 &&
3 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'bctrl' | wc -l | grep 1 &&
4 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'bla ' | wc -l | grep 1
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'bl ' | wc -l | grep 2 &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'bctrl' | wc -l | grep 1 &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'bla ' | wc -l | grep 1
55
66 declare void %foo()
77
None ; RUN: llvm-as < %s | llc -march=ppc32 &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | not grep mfcr
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep mfcr
22
33 void %test(long %X) {
44 %tmp1 = and long %X, 3 ; [#uses=1]
0 ; All of these routines should be perform optimal load of constants.
1 ; RUN: llvm-as < %s | llc -march=ppc32 | grep lis | wc -l | grep 5 &&
2 ; RUN: llvm-as < %s | llc -march=ppc32 | grep ori | wc -l | grep 3 &&
3 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'li ' | wc -l | grep 4
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep lis | wc -l | grep 5 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep ori | wc -l | grep 3 &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep 'li ' | wc -l | grep 4
44
55 implementation ; Functions:
66
0 ; Make sure this testcase does not use ctpop
1 ; RUN: llvm-as < %s | llc -march=ppc32 | grep -i 'cntlzw'
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep -i 'cntlzw'
22
33 declare int %llvm.cttz(int)
44
None ; RUN: llvm-as < %s | llc | grep 'foo bar":'
0 ; RUN: llvm-upgrade < %s | llvm-as | llc | grep 'foo bar":'
11
22 target endian = big
33 target pointersize = 32
None ; RUN: llvm-as < %s | llc -march=ppc32 | not grep srawi &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 | grep blr
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep srawi &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep blr
22
33 int %test1(int %X) {
44 %Y = and int %X, 15
None ; RUN: llvm-as < %s | llc -march=ppc32 | grep eqv | wc -l | grep 3 &&
1 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep andc | wc -l | grep 3 &&
2 ; RUN: llvm-as < %s | llc -march=ppc32 | grep orc | wc -l | grep 2 &&
3 ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 | grep nor | wc -l | grep 3 &&
4 ; RUN: llvm-as < %s | llc -march=ppc32 | grep nand | wc -l | grep 1
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep eqv | wc -l | grep 3 &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep andc | wc -l | grep 3 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep orc | wc -l | grep 2 &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 -mcpu=g5 | grep nor | wc -l | grep 3 &&
4 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep nand | wc -l | grep 1
55
66 int %EQV1(int %X, int %Y) {
77 %A = xor int %X, %Y
0 ; This should turn into a single extsh
1 ; RUN: llvm-as < %s | llc -march=ppc32 | grep extsh | wc -l | grep 1
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep extsh | wc -l | grep 1
22 int %test(int %X) {
33 %tmp.81 = shl int %X, ubyte 16 ; [#uses=1]
44 %tmp.82 = shr int %tmp.81, ubyte 16 ; [#uses=1]
None ; RUN: llvm-as < %s | llc -march=ppc32 | egrep 'fn?madd|fn?msub' | wc -l | grep 8
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | egrep 'fn?madd|fn?msub' | wc -l | grep 8
11
22 double %test_FMADD1(double %A, double %B, double %C) {
33 %D = mul double %A, %B
None ; RUN: llvm-as < %s | llc -march=ppc32 | grep fnabs
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | grep fnabs
11
22 declare double %fabs(double)
33
None ; RUN: llvm-as < %s | llc -march=ppc32 | not grep fneg
0 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | not grep fneg
11
22 double %test_FNEG_sel(double %A, double %B, double %C) {
33 %D = sub double -0.0, %A