[PATCH] D80140: [x86] Propagate memory operands during ISel DAG postprocessing

Jean-Michel Gorius via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 18 10:13:26 PDT 2020


Kayjukh created this revision.
Kayjukh added reviewers: craig.topper, rnk, lebedev.ri.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Propagate memory operands when folding test instructions.

This was split from D80062 <https://reviews.llvm.org/D80062>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80140

Files:
  llvm/lib/Target/X86/X86ISelDAGToDAG.cpp


Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
===================================================================
--- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -1388,6 +1388,8 @@
                           And.getOperand(6)  /* Chain */ };
         MachineSDNode *Test = CurDAG->getMachineNode(NewOpc, SDLoc(N),
                                                      MVT::i32, MVT::Other, Ops);
+        CurDAG->setNodeMemRefs(
+            Test, cast<MachineSDNode>(And.getNode())->memoperands());
         ReplaceUses(N, Test);
         MadeChange = true;
         continue;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80140.264664.patch
Type: text/x-patch
Size: 622 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200518/f049012d/attachment.bin>


More information about the llvm-commits mailing list