From: Serguei Katkov Date: Wed, 13 Dec 2017 06:57:59 +0000 (+0000) Subject: [CGP] Enable select in complex addr mode X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=596e2d5bc42cabee23ad7e64160b4a0dc4e7a3dc;p=llvm [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320551 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenPrepare.cpp b/lib/CodeGen/CodeGenPrepare.cpp index 1b01f843036..18b3b4f28ed 100644 --- a/lib/CodeGen/CodeGenPrepare.cpp +++ b/lib/CodeGen/CodeGenPrepare.cpp @@ -196,7 +196,7 @@ AddrSinkNewPhis("addr-sink-new-phis", cl::Hidden, cl::init(false), cl::desc("Allow creation of Phis in Address sinking.")); static cl::opt -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 AddrSinkCombineBaseReg( diff --git a/test/CodeGen/X86/x86-cmov-converter.ll b/test/CodeGen/X86/x86-cmov-converter.ll index 5fec1380e14..62b491e2f3a 100644 --- a/test/CodeGen/X86/x86-cmov-converter.ll +++ b/test/CodeGen/X86/x86-cmov-converter.ll @@ -234,7 +234,7 @@ for.body: ; preds = %for.body.preheader, } ; CHECK-LABEL: BinarySearch -; CHECK: cmov +; CHECK: set define i32 @BinarySearch(i32 %Mask, %struct.Node* nocapture readonly %Curr, %struct.Node* nocapture readonly %Next) #0 { entry: