We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ae9816 commit 8c27278Copy full SHA for 8c27278
llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -2499,6 +2499,12 @@ bool VectorCombine::foldShuffleOfCastops(Instruction &I) {
2499
2500
Instruction::CastOps Opcode = C0->getOpcode();
2501
2502
+ // If this is allowed, foldShuffleOfCastops can get stuck in a loop
2503
+ // with foldBitcastOfShuffle. Reject in favor of foldBitcastOfShuffle.
2504
+ if (!IsBinaryShuffle && Opcode == Instruction::BitCast) {
2505
+ return false;
2506
+ }
2507
+
2508
if (IsBinaryShuffle) {
2509
if (C0->getSrcTy() != C1->getSrcTy())
2510
return false;
0 commit comments