Skip to content

Commit 7327f35

Browse files
committed
Move Type equivalence earlier (cheap checks first)
1 parent 4a1f1e1 commit 7327f35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1753,9 +1753,9 @@ bool VectorCombine::foldShuffleOfBinops(Instruction &I) {
17531753
ArrayRef<int> InnerMask;
17541754
if (match(Op, m_OneUse(m_Shuffle(m_Value(InnerOp), m_Undef(),
17551755
m_Mask(InnerMask)))) &&
1756+
InnerOp->getType() == Op->getType() &&
17561757
all_of(InnerMask,
1757-
[NumSrcElts](int M) { return M < (int)NumSrcElts; }) &&
1758-
InnerOp->getType() == Op->getType()) {
1758+
[NumSrcElts](int M) { return M < (int)NumSrcElts; })) {
17591759
for (int &M : Mask)
17601760
if (Offset <= M && M < (int)(Offset + NumSrcElts)) {
17611761
M = InnerMask[M - Offset];

0 commit comments

Comments
 (0)