[llvm-branch-commits] [llvm-branch] r113152 - in /llvm/branches/release_28: ./ lib/Transforms/Scalar/LICM.cpp test/Transforms/LICM/crash.ll
Bill Wendling
isanbard at gmail.com
Mon Sep 6 02:15:29 PDT 2010
Author: void
Date: Mon Sep 6 04:15:29 2010
New Revision: 113152
URL: http://llvm.org/viewvc/llvm-project?rev=113152&view=rev
Log:
Approved by Chris:
$ svn merge -c 113146 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r113146 into '.':
U test/Transforms/LICM/crash.ll
U lib/Transforms/Scalar/LICM.cpp
Log:
fix PR8067, an over-aggressive assertion in LICM.
Modified:
llvm/branches/release_28/ (props changed)
llvm/branches/release_28/lib/Transforms/Scalar/LICM.cpp
llvm/branches/release_28/test/Transforms/LICM/crash.ll
Propchange: llvm/branches/release_28/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Sep 6 04:15:29 2010
@@ -1,2 +1,2 @@
/llvm/branches/Apple/Pertwee:110850,110961
-/llvm/trunk:113109,113123
+/llvm/trunk:113109,113123,113146
Modified: llvm/branches/release_28/lib/Transforms/Scalar/LICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_28/lib/Transforms/Scalar/LICM.cpp?rev=113152&r1=113151&r2=113152&view=diff
==============================================================================
--- llvm/branches/release_28/lib/Transforms/Scalar/LICM.cpp (original)
+++ llvm/branches/release_28/lib/Transforms/Scalar/LICM.cpp Mon Sep 6 04:15:29 2010
@@ -696,10 +696,10 @@
// it.
if (isa<LoadInst>(Use))
assert(!cast<LoadInst>(Use)->isVolatile() && "AST broken");
- else if (isa<StoreInst>(Use))
- assert(!cast<StoreInst>(Use)->isVolatile() &&
- Use->getOperand(0) != ASIV && "AST broken");
- else
+ else if (isa<StoreInst>(Use)) {
+ assert(!cast<StoreInst>(Use)->isVolatile() && "AST broken");
+ if (Use->getOperand(0) == ASIV) return;
+ } else
return; // Not a load or store.
if (!GuaranteedToExecute)
Modified: llvm/branches/release_28/test/Transforms/LICM/crash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_28/test/Transforms/LICM/crash.ll?rev=113152&r1=113151&r2=113152&view=diff
==============================================================================
--- llvm/branches/release_28/test/Transforms/LICM/crash.ll (original)
+++ llvm/branches/release_28/test/Transforms/LICM/crash.ll Mon Sep 6 04:15:29 2010
@@ -25,3 +25,17 @@
for.end10: ; preds = %for.cond.for.end10_crit_edge, %entry
ret void
}
+
+; PR8067
+ at g_8 = external global i32, align 4
+
+define void @test2() noreturn nounwind ssp {
+entry:
+ br label %for.body
+
+for.body: ; preds = %for.body, %entry
+ %tmp7 = load i32* @g_8, align 4
+ store i32* @g_8, i32** undef, align 16
+ store i32 undef, i32* @g_8, align 4
+ br label %for.body
+}
More information about the llvm-branch-commits
mailing list