[PATCH] D156119: [GlobalISel] Fix GIM_CheckIsSameOperandIgnoreCopies

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 06:27:27 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb5254300b4bc: [GlobalISel] Fix GIM_CheckIsSameOperandIgnoreCopies (authored by Pierre-vh).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156119/new/

https://reviews.llvm.org/D156119

Files:
  llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h


Index: llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h
===================================================================
--- llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h
+++ llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h
@@ -847,9 +847,8 @@
 
       if (MatcherOpcode == GIM_CheckIsSameOperandIgnoreCopies) {
         if (Op.isReg() && OtherOp.isReg()) {
-          MachineInstr *MI = getDefIgnoringCopies(Op.getReg(), MRI);
-          MachineInstr *OtherMI = getDefIgnoringCopies(OtherOp.getReg(), MRI);
-          if (MI && MI == OtherMI)
+          if (getSrcRegIgnoringCopies(Op.getReg(), MRI) ==
+              getSrcRegIgnoringCopies(OtherOp.getReg(), MRI))
             break;
         }
       }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156119.543516.patch
Type: text/x-patch
Size: 758 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230724/c08af3b2/attachment.bin>


More information about the llvm-commits mailing list