[PATCH] D14496: X86: More efficient codegen for 64-bit compares on 32-bit target
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 19 07:40:32 PST 2015
hans added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:14593
@@ +14592,3 @@
+ assert(LHS.getSimpleValueType().isInteger() && "SETCCE is integer only.");
+ unsigned CC = TranslateX86CC(cast<CondCodeSDNode>(Cond)->get(), DL, false,
+ LHS, RHS, DAG);
----------------
DavidKreitzer wrote:
> I like the idea of leveraging TranslateX86CC, but I believe these two optimizations at the beginning of TranslateX86CC are invalid for SETCCE and somehow need to be avoided for it:
>
> // X > -1 -> X == 0, jump !sign.
> // X < 0 -> X == 0, jump on sign.
>
> They are invalid in the one special case where X is 0x80000000 and the carry is true. FWIW, this optimization *is* valid:
>
> // X < 1 -> X <= 0
>
>
Thanks for catching that!
http://reviews.llvm.org/D14496
More information about the llvm-commits
mailing list