[llvm] fix a bug of PPCMIPeepholes which description in issue 71030 (PR #85451)

Amy Kwan via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 19 21:50:07 PDT 2024


================
@@ -5219,6 +5219,190 @@ bool PPCInstrInfo::isTOCSaveMI(const MachineInstr &MI) const {
 // We limit the max depth to track incoming values of PHIs or binary ops
 // (e.g. AND) to avoid excessive cost.
 const unsigned MAX_BINOP_DEPTH = 1;
+
+void PPCInstrInfo::replaceInstrAfterElimExt32To64(const Register &Reg,
+                                                  MachineRegisterInfo *MRI,
+                                                  unsigned BinOpDepth,
+                                                  LiveVariables *LV) const {
+  MachineInstr *MI = MRI->getVRegDef(Reg);
+  if (!MI)
+    return;
+
+  unsigned Opcode = MI->getOpcode();
+  bool IsRelplaceIntr = false;
----------------
amy-kwan wrote:

```suggestion
  bool IsReplaceInstr = false;
```
Do we mean this?

https://github.com/llvm/llvm-project/pull/85451


More information about the llvm-commits mailing list