OSDN Git Service

Follow-up to r319434 to turn the pass on by default
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Fri, 1 Dec 2017 12:02:59 +0000 (12:02 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Fri, 1 Dec 2017 12:02:59 +0000 (12:02 +0000)
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
test/CodeGen/PowerPC/memcmp.ll

index c53549d..2fff50b 100644 (file)
@@ -106,7 +106,7 @@ enum ICmpInGPRType { ICGPR_All, ICGPR_None, ICGPR_I32, ICGPR_I64,
   ICGPR_SextI32, ICGPR_ZextI64, ICGPR_SextI64 };
 
 static cl::opt<ICmpInGPRType> 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."),
index 36ba525..392be4d 100644 (file)
@@ -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