diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-06-02 17:52:33 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-02 17:52:33 +0000 |
commit | 009b1c42aa6266385f2c37e227516b24077e6dd7 (patch) | |
tree | 64ba909838c23261cace781ece27d106134ea451 /test/Transforms/Reassociate/basictest.ll | |
download | src-009b1c42aa6266385f2c37e227516b24077e6dd7.tar.gz src-009b1c42aa6266385f2c37e227516b24077e6dd7.zip |
Import LLVM, at r72732.vendor/llvm/llvm-r72732
Notes
Notes:
svn path=/vendor/llvm/dist/; revision=193323
svn path=/vendor/llvm/llvm-r72732/; revision=193324; tag=vendor/llvm/llvm-r72732
Diffstat (limited to 'test/Transforms/Reassociate/basictest.ll')
-rw-r--r-- | test/Transforms/Reassociate/basictest.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/Reassociate/basictest.ll b/test/Transforms/Reassociate/basictest.ll new file mode 100644 index 000000000000..09db47b1907c --- /dev/null +++ b/test/Transforms/Reassociate/basictest.ll @@ -0,0 +1,10 @@ +; With reassociation, constant folding can eliminate the 12 and -12 constants. +; +; RUN: llvm-as < %s | opt -reassociate -constprop -instcombine -die | llvm-dis | not grep add + +define i32 @test(i32 %arg) { + %tmp1 = sub i32 -12, %arg ; <i32> [#uses=1] + %tmp2 = add i32 %tmp1, 12 ; <i32> [#uses=1] + ret i32 %tmp2 +} + |