Skip to content

Commit 69ff0dd

Browse files
committed
use getEffectiveImmVal instead of adding a new API function
1 parent f47cb39 commit 69ff0dd

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

llvm/lib/Target/AMDGPU/SIFoldOperands.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,6 @@ struct FoldableDef {
8989

9090
bool isImm() const { return Kind == MachineOperand::MO_Immediate; }
9191

92-
uint64_t getImm() const {
93-
assert(isImm());
94-
return ImmToFold;
95-
}
96-
9792
bool isFI() const {
9893
return Kind == MachineOperand::MO_FrameIndex;
9994
}
@@ -795,7 +790,7 @@ isPKF32InstrReplicatingLow32BitsOfScalarInput(const GCNSubtarget *ST,
795790
// lo are not same, we can't fold it.
796791
static bool checkImmOpForPKF32Instr(const FoldableDef &OpToFold) {
797792
assert(OpToFold.isImm() && "Expected immediate operand");
798-
uint64_t ImmVal = OpToFold.getImm();
793+
uint64_t ImmVal = OpToFold.getEffectiveImmVal().value();
799794
uint32_t Lo = Lo_32(ImmVal);
800795
uint32_t Hi = Hi_32(ImmVal);
801796
return Lo == Hi;

0 commit comments

Comments
 (0)