diff options
| author | Craig Topper <craig.topper@intel.com> | 2018-05-05 01:57:00 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@intel.com> | 2018-05-05 01:57:00 +0000 |
| commit | 781aa181abddaa26c9f9bb06340f314d30095e50 (patch) | |
| tree | e688ca627d6a38eb63f51d2ef61db02fc635866e /llvm/lib/Transforms/InstCombine | |
| parent | 00d83601b47dab3fb2893db2647964b568a045e3 (diff) | |
| download | bcm5719-llvm-781aa181abddaa26c9f9bb06340f314d30095e50.tar.gz bcm5719-llvm-781aa181abddaa26c9f9bb06340f314d30095e50.zip | |
Fix a bunch of places where operator-> was used directly on the return from dyn_cast.
Inspired by r331508, I did a grep and found these.
Mostly just change from dyn_cast to cast. Some cases also showed a dyn_cast result being converted to bool, so those I changed to isa.
llvm-svn: 331577
Diffstat (limited to 'llvm/lib/Transforms/InstCombine')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index 1ba46693f3e..8d6beba6feb 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -723,7 +723,7 @@ static Value *rewriteGEPAsOffset(Value *Start, Value *Base, } auto *Op = NewInsts[GEP->getOperand(0)]; - if (isa<ConstantInt>(Op) && dyn_cast<ConstantInt>(Op)->isZero()) + if (isa<ConstantInt>(Op) && cast<ConstantInt>(Op)->isZero()) NewInsts[GEP] = Index; else NewInsts[GEP] = Builder.CreateNSWAdd( |

