aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-07-28 01:20:19 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-07-28 01:20:19 +0000
commitb2e7c8250b30ceb502d1fa7776985d4434038960 (patch)
treedadaa31852893aa3b357d3beb8f8d7da03a931aa /lib/Transforms/Scalar
parent2bf84c15d24bb373987d9dbc6308092eac1b8324 (diff)
downloadexternal_llvm-b2e7c8250b30ceb502d1fa7776985d4434038960.zip
external_llvm-b2e7c8250b30ceb502d1fa7776985d4434038960.tar.gz
external_llvm-b2e7c8250b30ceb502d1fa7776985d4434038960.tar.bz2
Fix a use after free. An instruction can't be both an intrinsic call and a fence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136319 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r--lib/Transforms/Scalar/LowerAtomic.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LowerAtomic.cpp b/lib/Transforms/Scalar/LowerAtomic.cpp
index 7f4d9e9..0954f77 100644
--- a/lib/Transforms/Scalar/LowerAtomic.cpp
+++ b/lib/Transforms/Scalar/LowerAtomic.cpp
@@ -132,7 +132,7 @@ namespace {
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;