summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/GVN.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index 45b44368a3d..6dcde958f0e 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -2421,14 +2421,14 @@ GVN::fillImplicitControlFlowInfo(BasicBlock *BB) {
// must be removed once isGuaranteedToTransferExecutionToSuccessor is fixed.
if (isGuaranteedToTransferExecutionToSuccessor(I))
return false;
- if (auto *LI = dyn_cast<LoadInst>(I)) {
- assert(LI->isVolatile() && "Non-volatile load should transfer execution"
- " to successor!");
+ if (isa<LoadInst>(I)) {
+ assert(cast<LoadInst>(I)->isVolatile() &&
+ "Non-volatile load should transfer execution to successor!");
return false;
}
- if (auto *SI = dyn_cast<StoreInst>(I)) {
- assert(SI->isVolatile() && "Non-volatile store should transfer execution"
- " to successor!");
+ if (isa<StoreInst>(I)) {
+ assert(cast<StoreInst>(I)->isVolatile() &&
+ "Non-volatile store should transfer execution to successor!");
return false;
}
return true;
OpenPOWER on IntegriCloud