Skip to content

Commit 1be3b1e

Browse files
authored
[RISCV] Remove FrameIndex case in lui+addi MacroFusion (#68701)
If the first operand of ADDI is a frame index, then it won't have data dependency of predecessor LUI. So it is impossible to do the DAG mutation in these two instructions.
1 parent f4231bf commit 1be3b1e

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

llvm/lib/Target/RISCV/RISCVMacroFusion.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ static bool isLUIADDI(const MachineInstr *FirstMI,
3535
if (FirstMI->getOpcode() != RISCV::LUI)
3636
return false;
3737

38-
// The first operand of ADDI might be a frame index.
39-
if (!SecondMI.getOperand(1).isReg())
40-
return false;
41-
4238
Register FirstDest = FirstMI->getOperand(0).getReg();
4339

4440
// Destination of LUI should be the ADDI(W) source register.

0 commit comments

Comments
 (0)