From a2040d55d7886236077ca43f540586199826167a Mon Sep 17 00:00:00 2001 From: Nemanja Ivanovic Date: Fri, 1 Dec 2017 12:02:59 +0000 Subject: [PATCH] Follow-up to r319434 to turn the pass on by default Now that the patch has gone through the buildbot cycle, turn it on by default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319535 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 2 +- test/CodeGen/PowerPC/memcmp.ll | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index c53549d8e03..2fff50b3e79 100644 --- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -106,7 +106,7 @@ enum ICmpInGPRType { ICGPR_All, ICGPR_None, ICGPR_I32, ICGPR_I64, ICGPR_SextI32, ICGPR_ZextI64, ICGPR_SextI64 }; static cl::opt CmpInGPR( - "ppc-gpr-icmps", cl::Hidden, cl::init(ICGPR_None), + "ppc-gpr-icmps", cl::Hidden, cl::init(ICGPR_All), cl::desc("Specify the types of comparisons to emit GPR-only code for."), cl::values(clEnumValN(ICGPR_None, "none", "Do not modify integer comparisons."), clEnumValN(ICGPR_All, "all", "All possible int comparisons in GPRs."), diff --git a/test/CodeGen/PowerPC/memcmp.ll b/test/CodeGen/PowerPC/memcmp.ll index 36ba5256bec..392be4d712c 100644 --- a/test/CodeGen/PowerPC/memcmp.ll +++ b/test/CodeGen/PowerPC/memcmp.ll @@ -6,11 +6,12 @@ define signext i32 @memcmp8(i32* nocapture readonly %buffer1, i32* nocapture rea ; CHECK: # BB#0: ; CHECK-NEXT: ldbrx 3, 0, 3 ; CHECK-NEXT: ldbrx 4, 0, 4 -; CHECK-NEXT: li 5, 0 -; CHECK-NEXT: cmpld 3, 4 -; CHECK-NEXT: li 3, 1 -; CHECK-NEXT: isel 4, 3, 5, 1 -; CHECK-NEXT: isel 3, 3, 5, 0 +; CHECK-NEXT: subfc 5, 3, 4 +; CHECK-NEXT: subfe 5, 4, 4 +; CHECK-NEXT: subfc 4, 4, 3 +; CHECK-NEXT: subfe 3, 3, 3 +; CHECK-NEXT: neg 4, 5 +; CHECK-NEXT: neg 3, 3 ; CHECK-NEXT: subf 3, 3, 4 ; CHECK-NEXT: extsw 3, 3 ; CHECK-NEXT: blr -- 2.11.0