Skip to content

Commit 906d3ff

Browse files
authored
[AMDGPU] Remove legality checks from imm folding in shrink. NFCI. (#69539)
The immediate legality checks are now embedded into the isOperandLegal(). It is not needed to check it again.
1 parent c43ac32 commit 906d3ff

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ bool SIShrinkInstructions::foldImmediates(MachineInstr &MI,
104104
bool ConstantFolded = false;
105105

106106
if (TII->isOperandLegal(MI, Src0Idx, &MovSrc)) {
107-
if (MovSrc.isImm() &&
108-
(isInt<32>(MovSrc.getImm()) || isUInt<32>(MovSrc.getImm()))) {
107+
if (MovSrc.isImm()) {
109108
Src0.ChangeToImmediate(MovSrc.getImm());
110109
ConstantFolded = true;
111110
} else if (MovSrc.isFI()) {

0 commit comments

Comments
 (0)