[llvm-commits] [llvm] r122171 - in /llvm/trunk: lib/Transforms/Scalar/LICM.cpp test/Transforms/LICM/crash.ll
Chris Lattner
sabre at nondot.org
Sat Dec 18 21:51:54 PST 2010
Author: lattner
Date: Sat Dec 18 23:51:54 2010
New Revision: 122171
URL: http://llvm.org/viewvc/llvm-project?rev=122171&view=rev
Log:
fix PR8602, a bug in an assertion: a volatile store *of* a pointer
does not make the alias set for that pointer volatile, just stores
*to* the pointer.
Modified:
llvm/trunk/lib/Transforms/Scalar/LICM.cpp
llvm/trunk/test/Transforms/LICM/crash.ll
Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=122171&r1=122170&r2=122171&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LICM.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp Sat Dec 18 23:51:54 2010
@@ -691,8 +691,8 @@
if (isa<LoadInst>(Use))
assert(!cast<LoadInst>(Use)->isVolatile() && "AST broken");
else if (isa<StoreInst>(Use)) {
- assert(!cast<StoreInst>(Use)->isVolatile() && "AST broken");
if (Use->getOperand(0) == ASIV) return;
+ assert(!cast<StoreInst>(Use)->isVolatile() && "AST broken");
} else
return; // Not a load or store.
Modified: llvm/trunk/test/Transforms/LICM/crash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LICM/crash.ll?rev=122171&r1=122170&r2=122171&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LICM/crash.ll (original)
+++ llvm/trunk/test/Transforms/LICM/crash.ll Sat Dec 18 23:51:54 2010
@@ -59,3 +59,16 @@
}
declare i32* @test3helper(i32*)
+
+
+; PR8602
+ at g_47 = external global i32, align 4
+
+define void @test4() noreturn nounwind {
+ br label %1
+
+; <label>:1 ; preds = %1, %0
+ volatile store i32* @g_47, i32** undef, align 8
+ store i32 undef, i32* @g_47, align 4
+ br label %1
+}
More information about the llvm-commits
mailing list