[PATCH] D40634: [CGP] Enable select in complex addr mode

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 21:31:20 PST 2017


skatkov created this revision.

Enable select instruction handling in complex addr modes.


https://reviews.llvm.org/D40634

Files:
  lib/CodeGen/CodeGenPrepare.cpp
  test/CodeGen/X86/x86-cmov-converter.ll


Index: test/CodeGen/X86/x86-cmov-converter.ll
===================================================================
--- test/CodeGen/X86/x86-cmov-converter.ll
+++ test/CodeGen/X86/x86-cmov-converter.ll
@@ -234,7 +234,7 @@
 }
 
 ; CHECK-LABEL: BinarySearch
-; CHECK: cmov
+; CHECK: set
 
 define i32 @BinarySearch(i32 %Mask, %struct.Node* nocapture readonly %Curr, %struct.Node* nocapture readonly %Next) #0 {
 entry:
Index: lib/CodeGen/CodeGenPrepare.cpp
===================================================================
--- lib/CodeGen/CodeGenPrepare.cpp
+++ lib/CodeGen/CodeGenPrepare.cpp
@@ -199,7 +199,7 @@
                 cl::desc("Allow creation of Phis in Address sinking."));
 
 static cl::opt<bool>
-AddrSinkNewSelects("addr-sink-new-select", cl::Hidden, cl::init(false),
+AddrSinkNewSelects("addr-sink-new-select", cl::Hidden, cl::init(true),
                    cl::desc("Allow creation of selects in Address sinking."));
 
 static cl::opt<bool> AddrSinkCombineBaseReg(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40634.124870.patch
Type: text/x-patch
Size: 982 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171130/cd3a6c23/attachment.bin>


More information about the llvm-commits mailing list