diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-09-17 13:24:54 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-09-17 13:24:54 +0000 |
| commit | a2719f38c12d7208d2f931899e628d15562ee581 (patch) | |
| tree | 408278d785b9d2b0be5aaa30b20035de5a55196a /llvm/lib/Transforms | |
| parent | 1ff955305768b772be19ce8ee76246ab249bbe1c (diff) | |
| download | bcm5719-llvm-a2719f38c12d7208d2f931899e628d15562ee581.tar.gz bcm5719-llvm-a2719f38c12d7208d2f931899e628d15562ee581.zip | |
[LoopVectorize] Don't dereference a dyn_cast result. NFCI.
The static analyzer is warning about potential null dereferences of dyn_cast<> results, we can use cast<> directly as we know that these cases should all be CastInst, which is why its working atm and anyway cast<> will assert if they aren't.
llvm-svn: 372116
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 549a24cbdc3..9f583cacce2 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -4200,7 +4200,7 @@ void InnerLoopVectorizer::widenInstruction(Instruction &I) { case Instruction::Trunc: case Instruction::FPTrunc: case Instruction::BitCast: { - auto *CI = dyn_cast<CastInst>(&I); + auto *CI = cast<CastInst>(&I); setDebugLocFromInst(Builder, CI); /// Vectorize casts. |

