diff options
author | Florian Hahn <flo@fhahn.com> | 2023-11-03 10:21:13 +0000 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2023-11-03 10:21:14 +0000 |
commit | fd82b5b2876b3885b0590ba4538c316fa0e33cf7 (patch) | |
tree | 11ef2bf6dffe21fc228adb07bae42b37744bc87a /llvm/lib | |
parent | ceb4dc44778f79bb1ddf2ca4b490c230ad08c10f (diff) | |
download | llvm-fd82b5b2876b3885b0590ba4538c316fa0e33cf7.zip llvm-fd82b5b2876b3885b0590ba4538c316fa0e33cf7.tar.gz llvm-fd82b5b2876b3885b0590ba4538c316fa0e33cf7.tar.bz2 |
[LV] Support recieps without underlying instr in collectPoisonGenRec.
Support recipes without underlying instruction in
collectPoisonGeneratingRecipes by directly trying to dyn_cast_or_null
the underlying value.
Fixes https://github.com/llvm/llvm-project/issues/70590.
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 4f54788..1c208f7 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -1103,7 +1103,8 @@ void InnerLoopVectorizer::collectPoisonGeneratingRecipes( if (auto *RecWithFlags = dyn_cast<VPRecipeWithIRFlags>(CurRec)) { RecWithFlags->dropPoisonGeneratingFlags(); } else { - Instruction *Instr = CurRec->getUnderlyingInstr(); + Instruction *Instr = dyn_cast_or_null<Instruction>( + CurRec->getVPSingleValue()->getUnderlyingValue()); (void)Instr; assert((!Instr || !Instr->hasPoisonGeneratingFlags()) && "found instruction with poison generating flags not covered by " |