OSDN Git Service

[CGP] Enable extending scope of optimizeMemoryInst
authorSerguei Katkov <serguei.katkov@azul.com>
Wed, 8 Nov 2017 05:02:51 +0000 (05:02 +0000)
committerSerguei Katkov <serguei.katkov@azul.com>
Wed, 8 Nov 2017 05:02:51 +0000 (05:02 +0000)
This patch enables the folding of address computation in
memory instruction in case adress is represented by Phi node.

The inputs of Phi node might be different in base register.

Differential Revision: https://reviews.llvm.org/D36073

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317665 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenPrepare.cpp

index d6633a5..635036a 100644 (file)
@@ -190,7 +190,7 @@ EnableTypePromotionMerge("cgp-type-promotion-merge", cl::Hidden,
     " the other."), cl::init(true));
 
 static cl::opt<bool> DisableComplexAddrModes(
-    "disable-complex-addr-modes", cl::Hidden, cl::init(true),
+    "disable-complex-addr-modes", cl::Hidden, cl::init(false),
     cl::desc("Disables combining addressing modes with different parts "
              "in optimizeMemoryInst."));