Skip to content

Commit 0ceb3ce

Browse files
committed
Apply suggestions
1 parent aae4aea commit 0ceb3ce

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5312,18 +5312,13 @@ bool AMDGPUTargetLowering::isInt64ImmLegal(SDNode *N, SelectionDAG &DAG) const {
53125312
if (ST.has64BitLiterals())
53135313
return true;
53145314

5315-
uint64_t Val = 0;
53165315
if (SDConstant) {
53175316
const APInt &APVal = SDConstant->getAPIntValue();
5318-
isInlineable = TII->isInlineConstant(APVal);
5319-
Val = APVal.getZExtValue();
5320-
} else if (SDFPConstant) {
5321-
const APFloat &APVal = SDFPConstant->getValueAPF();
5322-
isInlineable = TII->isInlineConstant(APVal);
5323-
Val = APVal.bitcastToAPInt().getZExtValue();
5317+
return isUInt<32>(APVal.getZExtValue()) || TII->isInlineConstant(APVal);
53245318
}
53255319

5326-
return (isInlineable || isUInt<32>(Val));
5320+
APInt Val = SDFPConstant->getValueAPF().bitcastToAPInt();
5321+
return isUInt<32>(Val.getZExtValue()) || TII->isInlineConstant(Val);
53275322
}
53285323

53295324
SDValue AMDGPUTargetLowering::PerformDAGCombine(SDNode *N,

0 commit comments

Comments
 (0)