Skip to content

Commit de4aee2

Browse files
committed
move IsCmpOp out of lambda
1 parent 1362815 commit de4aee2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -930,9 +930,7 @@ static InstructionsState getSameOpcode(ArrayRef<Value *> VL,
930930
unsigned AltOpcode = Opcode;
931931
unsigned AltIndex = std::distance(VL.begin(), It);
932932

933-
bool SwappedPredsCompatible = [&]() {
934-
if (!IsCmpOp)
935-
return false;
933+
bool SwappedPredsCompatible = IsCmpOp && [&]() {
936934
SetVector<unsigned> UniquePreds, UniqueNonSwappedPreds;
937935
UniquePreds.insert(BasePred);
938936
UniqueNonSwappedPreds.insert(BasePred);

0 commit comments

Comments
 (0)