Skip to content

Commit 7b90a67

Browse files
committed
[X86] Assert that the supportedVectorShift* helpers are only called with generic shift opcodes. NFC.
1 parent 483c336 commit 7b90a67

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28926,6 +28926,9 @@ SDValue X86TargetLowering::LowerWin64_INT128_TO_FP(SDValue Op,
2892628926
// supported by the Subtarget
2892728927
static bool supportedVectorShiftWithImm(EVT VT, const X86Subtarget &Subtarget,
2892828928
unsigned Opcode) {
28929+
assert((Opcode == ISD::SHL || Opcode == ISD::SRA || Opcode == ISD::SRL) &&
28930+
"Unexpected shift opcode");
28931+
2892928932
if (!VT.isSimple())
2893028933
return false;
2893128934

@@ -28959,6 +28962,9 @@ bool supportedVectorShiftWithBaseAmnt(EVT VT, const X86Subtarget &Subtarget,
2895928962
// natively supported by the Subtarget
2896028963
static bool supportedVectorVarShift(EVT VT, const X86Subtarget &Subtarget,
2896128964
unsigned Opcode) {
28965+
assert((Opcode == ISD::SHL || Opcode == ISD::SRA || Opcode == ISD::SRL) &&
28966+
"Unexpected shift opcode");
28967+
2896228968
if (!VT.isSimple())
2896328969
return false;
2896428970

0 commit comments

Comments
 (0)