[llvm-commits] [llvm] r37871 - in /llvm/trunk: lib/Transforms/Scalar/GVNPRE.cpp test/Transforms/GVNPRE/2007-07-04-CleanSelect.ll
Owen Anderson
resistor at mac.com
Wed Jul 4 11:26:19 PDT 2007
Author: resistor
Date: Wed Jul 4 13:26:18 2007
New Revision: 37871
URL: http://llvm.org/viewvc/llvm-project?rev=37871&view=rev
Log:
Fix a typo that was killing GVNPRE of select instructions.
Added:
llvm/trunk/test/Transforms/GVNPRE/2007-07-04-CleanSelect.ll
Modified:
llvm/trunk/lib/Transforms/Scalar/GVNPRE.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/GVNPRE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVNPRE.cpp?rev=37871&r1=37870&r2=37871&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVNPRE.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVNPRE.cpp Wed Jul 4 13:26:18 2007
@@ -1040,7 +1040,7 @@
stack.push_back(r);
else if (m != 0 && isa<Instruction>(m) &&
visited.count(m) == 0)
- stack.push_back(r);
+ stack.push_back(m);
else {
vec.push_back(e);
visited.insert(e);
Added: llvm/trunk/test/Transforms/GVNPRE/2007-07-04-CleanSelect.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVNPRE/2007-07-04-CleanSelect.ll?rev=37871&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/GVNPRE/2007-07-04-CleanSelect.ll (added)
+++ llvm/trunk/test/Transforms/GVNPRE/2007-07-04-CleanSelect.ll Wed Jul 4 13:26:18 2007
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | opt -gvnpre | llvm-dis
+
+define i32* @_ZN6Solver9propagateEv(i32* %this) {
+entry:
+ %tmp15.i48 = load i8* null ; <i8> [#uses=2]
+ %tmp64.i.i51 = sub i8 0, %tmp15.i48 ; <i8> [#uses=1]
+ %tmp231.i52 = select i1 false, i8 %tmp15.i48, i8 %tmp64.i.i51 ; <i8> [#uses=0]
+ ret i32* null
+}
More information about the llvm-commits
mailing list