[PATCH] D12136: [X86] Emit more efficient >= comparisons against 0
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 12:51:07 PDT 2015
spatel added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:24089
@@ +24088,3 @@
+
+ // We should be performing an xor aginst a truncated shift.
+ if (N0.getOpcode() != ISD::TRUNCATE || !N0.hasOneUse())
----------------
typo: "aginst"
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:24107
@@ +24106,3 @@
+
+ // Make sure the shift ammount extracts the sign bit.
+ if (!isa<ConstantSDNode>(Shift.getOperand(1)) ||
----------------
typo: "ammount"
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:24121
@@ -24077,2 +24120,3 @@
+
// PerformXorCombine - Attempts to turn XOR nodes into BLSMSK nodes
static SDValue PerformXorCombine(SDNode *N, SelectionDAG &DAG,
----------------
This function description is too specific now.
================
Comment at: test/CodeGen/X86/cmp.ll:215
@@ +214,3 @@
+
+define i8 @test16(i8* %B, i32 %L) {
+ %lshr = lshr i32 %L, 31
----------------
B is not used in this test.
================
Comment at: test/CodeGen/X86/cmp.ll:215-224
@@ +214,11 @@
+
+define i8 @test16(i8* %B, i32 %L) {
+ %lshr = lshr i32 %L, 31
+ %trunc = trunc i32 %lshr to i8
+ %not = xor i8 %trunc, 1
+ ret i8 %not
+
+; CHECK-LABEL: test16:
+; CHECK: testl %esi, %esi
+; CHECK: setns %al
+}
----------------
spatel wrote:
> B is not used in this test.
Add tests for an i1 output, i16 input, and i64 input?
http://reviews.llvm.org/D12136
More information about the llvm-commits
mailing list