diff options
author | Max Kazantsev <max.kazantsev@azul.com> | 2017-10-11 10:31:49 +0000 |
---|---|---|
committer | Max Kazantsev <max.kazantsev@azul.com> | 2017-10-11 10:31:49 +0000 |
commit | fecaff1bd929be85eab52ca3cbc44778cb3b21d2 (patch) | |
tree | a7e5302bbdcb73c8f758758495e13a20900aa5f5 /llvm/lib/Transforms | |
parent | 75f9ae2b8bc8d9366983c6d1d7d5630496cffab6 (diff) | |
download | bcm5719-llvm-fecaff1bd929be85eab52ca3cbc44778cb3b21d2.tar.gz bcm5719-llvm-fecaff1bd929be85eab52ca3cbc44778cb3b21d2.zip |
[NFC] Fix variables used only for assert in GVN
llvm-svn: 315448
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/GVN.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp index 135b33d84be..3b689b03d47 100644 --- a/llvm/lib/Transforms/Scalar/GVN.cpp +++ b/llvm/lib/Transforms/Scalar/GVN.cpp @@ -2398,14 +2398,14 @@ GVN::fillImplicitControlFlowInfo(ReversePostOrderTraversal<Function *> &RPOT) { // 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; |