[PATCH] D60314: [DAGCombiner] Add missing flag to addressing mode check

Luís Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 08:08:43 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL358502: [DAGCombiner] Add missing flag to addressing mode check (authored by luismarques, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D60314?vs=193851&id=195387#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D60314

Files:
  llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp


Index: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -12897,6 +12897,7 @@
 
   TargetLowering::AddrMode AM;
   if (N->getOpcode() == ISD::ADD) {
+    AM.HasBaseReg = true;
     ConstantSDNode *Offset = dyn_cast<ConstantSDNode>(N->getOperand(1));
     if (Offset)
       // [reg +/- imm]
@@ -12905,6 +12906,7 @@
       // [reg +/- reg]
       AM.Scale = 1;
   } else if (N->getOpcode() == ISD::SUB) {
+    AM.HasBaseReg = true;
     ConstantSDNode *Offset = dyn_cast<ConstantSDNode>(N->getOperand(1));
     if (Offset)
       // [reg +/- imm]


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60314.195387.patch
Type: text/x-patch
Size: 731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190416/ac16cc32/attachment.bin>


More information about the llvm-commits mailing list