Skip to content

Commit 4f00083

Browse files
committed
reduce opcodeToMask(Opcode) usage
1 parent b5ae180 commit 4f00083

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,8 @@ class InterchangeableBinOp {
910910
return trySet(MainOp_BIT);
911911
return false;
912912
}
913-
SeenBefore |= opcodeToMask(Opcode);
913+
MaskType opcodeMask = opcodeToMask(Opcode);
914+
SeenBefore |= opcodeMask;
914915
ConstantInt *CI = isBinOpWithConstantInt(I).first;
915916
if (CI) {
916917
constexpr MaskType CanBeAll = Xor_BIT | Or_BIT | And_BIT | Sub_BIT |
@@ -937,7 +938,7 @@ class InterchangeableBinOp {
937938
break;
938939
}
939940
}
940-
return trySet(opcodeToMask(Opcode));
941+
return trySet(opcodeMask);
941942
}
942943
unsigned getOpcode() const {
943944
if (Mask & MainOp_BIT)

0 commit comments

Comments
 (0)