[X86] Use isUInt<32> to simplify some code. NFC

llvm-svn: 313112
This commit is contained in:
Craig Topper 2017-09-13 02:29:59 +00:00
parent 50bc565f3f
commit 0a3bcebcc2
1 changed files with 1 additions and 1 deletions

View File

@ -1632,7 +1632,7 @@ bool X86DAGToDAGISel::selectScalarSSELoad(SDNode *Root,
bool X86DAGToDAGISel::selectMOV64Imm32(SDValue N, SDValue &Imm) { bool X86DAGToDAGISel::selectMOV64Imm32(SDValue N, SDValue &Imm) {
if (const ConstantSDNode *CN = dyn_cast<ConstantSDNode>(N)) { if (const ConstantSDNode *CN = dyn_cast<ConstantSDNode>(N)) {
uint64_t ImmVal = CN->getZExtValue(); uint64_t ImmVal = CN->getZExtValue();
if ((uint32_t)ImmVal != (uint64_t)ImmVal) if (!isUInt<32>(ImmVal))
return false; return false;
Imm = CurDAG->getTargetConstant(ImmVal, SDLoc(N), MVT::i64); Imm = CurDAG->getTargetConstant(ImmVal, SDLoc(N), MVT::i64);