[llvm] r320551 - [CGP] Enable select in complex addr mode

Serguei Katkov via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 22:57:59 PST 2017


Author: skatkov
Date: Tue Dec 12 22:57:59 2017
New Revision: 320551

URL: http://llvm.org/viewvc/llvm-project?rev=320551&view=rev
Log:
[CGP] Enable select in complex addr mode

Enable select instruction handling in complex addr modes.

Reviewers: john.brawn, reames, aaboud
Reviewed By: reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40634

Modified:
    llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
    llvm/trunk/test/CodeGen/X86/x86-cmov-converter.ll

Modified: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp?rev=320551&r1=320550&r2=320551&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp Tue Dec 12 22:57:59 2017
@@ -196,7 +196,7 @@ AddrSinkNewPhis("addr-sink-new-phis", cl
                 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(

Modified: llvm/trunk/test/CodeGen/X86/x86-cmov-converter.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/x86-cmov-converter.ll?rev=320551&r1=320550&r2=320551&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/x86-cmov-converter.ll (original)
+++ llvm/trunk/test/CodeGen/X86/x86-cmov-converter.ll Tue Dec 12 22:57:59 2017
@@ -234,7 +234,7 @@ for.body:
 }
 
 ; CHECK-LABEL: BinarySearch
-; CHECK: cmov
+; CHECK: set
 
 define i32 @BinarySearch(i32 %Mask, %struct.Node* nocapture readonly %Curr, %struct.Node* nocapture readonly %Next) #0 {
 entry:




More information about the llvm-commits mailing list