Skip to content

Commit 720015e

Browse files
committed
[x86] avoid build warning for enum mismatch; NFC
gcc may warn here because X86ISD::NodeType is specified as "unsigned", but ISD::NodeType is a naked C enum (although passed as an "unsigned" throughout SDAG).
1 parent e01ae15 commit 720015e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19198,8 +19198,10 @@ static SDValue lowerFPToIntToFP(SDValue CastToFP, SelectionDAG &DAG,
1919819198

1919919199
// We need target-specific opcodes if this is v2f64 -> v4i32 -> v2f64.
1920019200
bool NeedX86Opcodes = VT.getSizeInBits() != IntVT.getSizeInBits();
19201-
unsigned ToIntOpcode = NeedX86Opcodes ? X86ISD::CVTTP2SI : ISD::FP_TO_SINT;
19202-
unsigned ToFPOpcode = NeedX86Opcodes ? X86ISD::CVTSI2P : ISD::SINT_TO_FP;
19201+
unsigned ToIntOpcode =
19202+
NeedX86Opcodes ? X86ISD::CVTTP2SI : (unsigned)ISD::FP_TO_SINT;
19203+
unsigned ToFPOpcode =
19204+
NeedX86Opcodes ? X86ISD::CVTSI2P : (unsigned)ISD::SINT_TO_FP;
1920319205

1920419206
// sint_to_fp (fp_to_sint X) --> extelt (sint_to_fp (fp_to_sint (s2v X))), 0
1920519207
//

0 commit comments

Comments
 (0)