[llvm-commits] [llvm] r136319 - /llvm/trunk/lib/Transforms/Scalar/LowerAtomic.cpp
Benjamin Kramer
benny.kra at googlemail.com
Wed Jul 27 18:20:19 PDT 2011
Author: d0k
Date: Wed Jul 27 20:20:19 2011
New Revision: 136319
URL: http://llvm.org/viewvc/llvm-project?rev=136319&view=rev
Log:
Fix a use after free. An instruction can't be both an intrinsic call and a fence.
Modified:
llvm/trunk/lib/Transforms/Scalar/LowerAtomic.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LowerAtomic.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LowerAtomic.cpp?rev=136319&r1=136318&r2=136319&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LowerAtomic.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LowerAtomic.cpp Wed Jul 27 20:20:19 2011
@@ -132,7 +132,7 @@
Instruction *Inst = DI++;
if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst))
Changed |= LowerAtomicIntrinsic(II);
- if (FenceInst *FI = dyn_cast<FenceInst>(Inst))
+ else if (FenceInst *FI = dyn_cast<FenceInst>(Inst))
Changed |= LowerFenceInst(FI);
}
return Changed;
More information about the llvm-commits
mailing list