From b8cb5da28df4ee95e83605c2a4490878e39ab220 Mon Sep 17 00:00:00 2001 From: Serguei Katkov Date: Wed, 13 Dec 2017 06:57:59 +0000 Subject: [PATCH] [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 llvm-svn: 320551 --- llvm/lib/CodeGen/CodeGenPrepare.cpp | 2 +- llvm/test/CodeGen/X86/x86-cmov-converter.ll | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 1b01f8430366..18b3b4f28edd 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/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/llvm/test/CodeGen/X86/x86-cmov-converter.ll b/llvm/test/CodeGen/X86/x86-cmov-converter.ll index 5fec1380e14b..62b491e2f3a6 100644 --- a/llvm/test/CodeGen/X86/x86-cmov-converter.ll +++ b/llvm/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: