Skip to content

Commit e3f5332

Browse files
committed
[RISCV][GISel] Don't setType on PtrReg in RISCVInstructionSelector::replacePtrWithInt.
PtrReg is still a pointer. It's being passed to G_PTRTOINT as a pointer.
1 parent fd673e8 commit e3f5332

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ bool RISCVInstructionSelector::replacePtrWithInt(MachineOperand &Op,
210210
const LLT XLenLLT = LLT::scalar(STI.getXLen());
211211
auto PtrToInt = MIB.buildPtrToInt(XLenLLT, PtrReg);
212212
MRI.setRegBank(PtrToInt.getReg(0), RBI.getRegBank(RISCV::GPRRegBankID));
213-
MRI.setType(PtrReg, XLenLLT);
214213
Op.setReg(PtrToInt.getReg(0));
215214
return select(*PtrToInt);
216215
}

0 commit comments

Comments
 (0)