diff options
| author | Vitaly Buka <vitalybuka@google.com> | 2024-09-12 11:01:01 -0700 |
|---|---|---|
| committer | Vitaly Buka <vitalybuka@google.com> | 2024-09-12 11:01:01 -0700 |
| commit | c74308f2b67c73c4989a1301d5f800eb61310fdd (patch) | |
| tree | 9b3dfe001546b221ea3a95d07f7ce4eb9edc8f89 /llvm/lib/Transforms/Vectorize/VectorCombine.cpp | |
| parent | 6711e8f505bb7786ffedd564f88e46eb71690eb1 (diff) | |
| parent | 885ac29910a23db923292fe3fc09d0ec105186dc (diff) | |
[𝘀𝗽𝗿] changes introduced through rebaseusers/vitalybuka/spr/main.test
Created using spr 1.3.4
[skip ci]
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/VectorCombine.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Vectorize/VectorCombine.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp index 3e7118091c8e..e993e5684f41 100644 --- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp +++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp @@ -2652,8 +2652,12 @@ bool VectorCombine::shrinkType(llvm::Instruction &I) { return false; Value *Op0 = ZExted; - if (auto *OI = dyn_cast<Instruction>(OtherOperand)) - Builder.SetInsertPoint(OI->getNextNode()); + if (auto *OI = dyn_cast<Instruction>(OtherOperand)) { + if (isa<PHINode>(OI)) + Builder.SetInsertPoint(OI->getParent()->getFirstInsertionPt()); + else + Builder.SetInsertPoint(OI->getNextNode()); + } Value *Op1 = Builder.CreateTrunc(OtherOperand, SmallTy); Builder.SetInsertPoint(&I); // Keep the order of operands the same |
