[llvm-commits] [llvm] r50432 - in /llvm/branches/Apple/Tak: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2008-04-28-VolatileStore.ll
Bill Wendling
isanbard at gmail.com
Tue Apr 29 10:53:49 PDT 2008
Author: void
Date: Tue Apr 29 12:53:49 2008
New Revision: 50432
URL: http://llvm.org/viewvc/llvm-project?rev=50432&view=rev
Log:
Ported r50390 to Tak.
Added:
llvm/branches/Apple/Tak/test/Transforms/InstCombine/2008-04-28-VolatileStore.ll
Modified:
llvm/branches/Apple/Tak/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/branches/Apple/Tak/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Tak/lib/Transforms/Scalar/InstructionCombining.cpp?rev=50432&r1=50431&r2=50432&view=diff
==============================================================================
--- llvm/branches/Apple/Tak/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/branches/Apple/Tak/lib/Transforms/Scalar/InstructionCombining.cpp Tue Apr 29 12:53:49 2008
@@ -10256,7 +10256,7 @@
// If the RHS is an alloca with a single use, zapify the store, making the
// alloca dead.
- if (Ptr->hasOneUse()) {
+ if (Ptr->hasOneUse() && !SI.isVolatile()) {
if (isa<AllocaInst>(Ptr)) {
EraseInstFromFunction(SI);
++NumCombined;
Added: llvm/branches/Apple/Tak/test/Transforms/InstCombine/2008-04-28-VolatileStore.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Tak/test/Transforms/InstCombine/2008-04-28-VolatileStore.ll?rev=50432&view=auto
==============================================================================
--- llvm/branches/Apple/Tak/test/Transforms/InstCombine/2008-04-28-VolatileStore.ll (added)
+++ llvm/branches/Apple/Tak/test/Transforms/InstCombine/2008-04-28-VolatileStore.ll Tue Apr 29 12:53:49 2008
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {volatile store}
+
+define void @test() {
+ %votf = alloca <4 x float> ; <<4 x float>*> [#uses=1]
+ volatile store <4 x float> zeroinitializer, <4 x float>* %votf, align 16
+ ret void
+}
+
More information about the llvm-commits
mailing list