[llvm-commits] [llvm] r90520 - /llvm/trunk/test/Transforms/GVN/rle.ll
Chris Lattner
sabre at nondot.org
Thu Dec 3 18:12:12 PST 2009
Author: lattner
Date: Thu Dec 3 20:12:12 2009
New Revision: 90520
URL: http://llvm.org/viewvc/llvm-project?rev=90520&view=rev
Log:
Small and carefully crafted testcase showing a miscompilation by GVN
that I'm working on. This is manifesting as a miscompile of 255.vortex
on some targets. No check lines yet because it fails.
Modified:
llvm/trunk/test/Transforms/GVN/rle.ll
Modified: llvm/trunk/test/Transforms/GVN/rle.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/rle.ll?rev=90520&r1=90519&r2=90520&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/GVN/rle.ll (original)
+++ llvm/trunk/test/Transforms/GVN/rle.ll Thu Dec 3 20:12:12 2009
@@ -280,3 +280,36 @@
}
+declare i1 @cond() readonly
+declare i1 @cond2() readonly
+
+define i32 @phi_trans2() {
+entry:
+ %P = alloca i32, i32 400
+ br label %F1
+
+F1:
+ %A = phi i32 [1, %entry], [2, %F]
+ %cond2 = call i1 @cond()
+ br i1 %cond2, label %T1, label %TY
+
+T1:
+ %P2 = getelementptr i32* %P, i32 %A
+ %x = load i32* %P2
+ %cond = call i1 @cond2()
+ br i1 %cond, label %TX, label %F
+
+F:
+ %P3 = getelementptr i32* %P, i32 2
+ store i32 17, i32* %P3
+
+ store i32 42, i32* %P2 ; Provides "P[A]".
+ br label %F1
+
+TX:
+ ret i32 %x ;; SHOULD NOT BE COMPILED TO 'ret i32 42'.
+TY:
+ ret i32 0
+}
+
+
More information about the llvm-commits
mailing list