Unverified Commit 1be3b1ef authored by Pengcheng Wang's avatar Pengcheng Wang Committed by GitHub
Browse files

[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.
parent f4231bf4
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -35,10 +35,6 @@ static bool isLUIADDI(const MachineInstr *FirstMI,
  if (FirstMI->getOpcode() != RISCV::LUI)
    return false;

  // The first operand of ADDI might be a frame index.
  if (!SecondMI.getOperand(1).isReg())
    return false;

  Register FirstDest = FirstMI->getOperand(0).getReg();

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