llvm-6502/test/Transforms/Reassociate/subtest2.ll
Dan Gohman b1e1e82c54 Change these tests to feed the assembly files to opt directly, instead
of using llvm-as, now that opt supports this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81226 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 16:50:01 +00:00

14 lines
369 B
LLVM

; With sub reassociation, constant folding can eliminate the uses of %a.
;
; RUN: opt %s -reassociate -instcombine | llvm-dis | grep %a | count 1
; PR2047
define i32 @test(i32 %a, i32 %b, i32 %c) nounwind {
entry:
%tmp3 = sub i32 %a, %b ; <i32> [#uses=1]
%tmp5 = sub i32 %tmp3, %c ; <i32> [#uses=1]
%tmp7 = sub i32 %tmp5, %a ; <i32> [#uses=1]
ret i32 %tmp7
}