Skip to content

Commit 3d5783a

Browse files
author
git apple-llvm automerger
committed
Merge commit '1672f7db87a5' from llvm.org/release/21.x into stable/21.x
2 parents 6e6a7e8 + 1672f7d commit 3d5783a

File tree

2 files changed

+269
-6
lines changed

2 files changed

+269
-6
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15403,18 +15403,18 @@ static SDValue lowerShuffleAsLanePermuteAndPermute(
1540315403
return SDValue();
1540415404
}
1540515405

15406-
// Avoid returning the same shuffle operation. For example,
15407-
// t7: v16i16 = vector_shuffle<8,9,10,11,4,5,6,7,0,1,2,3,12,13,14,15> t5,
15408-
// undef:v16i16
15409-
if (CrossLaneMask == Mask || InLaneMask == Mask)
15410-
return SDValue();
15411-
1541215406
// Simplify CrossLaneMask based on the actual demanded elements.
1541315407
if (V1.hasOneUse())
1541415408
for (int i = 0; i != NumElts; ++i)
1541515409
if (!DemandedCrossLane[i])
1541615410
CrossLaneMask[i] = SM_SentinelUndef;
1541715411

15412+
// Avoid returning the same shuffle operation. For example,
15413+
// t7: v16i16 = vector_shuffle<8,9,10,11,4,5,6,7,0,1,2,3,12,13,14,15> t5,
15414+
// undef:v16i16
15415+
if (CrossLaneMask == Mask || InLaneMask == Mask)
15416+
return SDValue();
15417+
1541815418
SDValue CrossLane = DAG.getVectorShuffle(VT, DL, V1, V2, CrossLaneMask);
1541915419
return DAG.getVectorShuffle(VT, DL, CrossLane, DAG.getUNDEF(VT),
1542015420
InLaneMask);

0 commit comments

Comments
 (0)