[llvm-commits] [llvm] r122730 - /llvm/trunk/test/Transforms/EarlyCSE/basic.ll
Chris Lattner
sabre at nondot.org
Sun Jan 2 19:33:47 PST 2011
Author: lattner
Date: Sun Jan 2 21:33:47 2011
New Revision: 122730
URL: http://llvm.org/viewvc/llvm-project?rev=122730&view=rev
Log:
add a testcase for readonly call CSE
Modified:
llvm/trunk/test/Transforms/EarlyCSE/basic.ll
Modified: llvm/trunk/test/Transforms/EarlyCSE/basic.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/EarlyCSE/basic.ll?rev=122730&r1=122729&r2=122730&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/EarlyCSE/basic.ll (original)
+++ llvm/trunk/test/Transforms/EarlyCSE/basic.ll Sun Jan 2 21:33:47 2011
@@ -75,3 +75,15 @@
; CHECK: F:
; CHECK: ret i32 %Diff
}
+
+declare i32 @func(i32 *%P) readonly
+
+;; Simple call CSE'ing.
+; CHECK: @test5
+define i32 @test5(i32 *%P) {
+ %V1 = call i32 @func(i32* %P)
+ %V2 = call i32 @func(i32* %P)
+ %Diff = sub i32 %V1, %V2
+ ret i32 %Diff
+ ; CHECK: ret i32 0
+}
More information about the llvm-commits
mailing list