[PATCH] D55515: [x86] increment/decrement constant vector with min/max in vsetcc lowering (PR39859)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 10 09:44:58 PST 2018


spatel marked an inline comment as done.
spatel added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:19394
+    // TODO: This could be extended to handle a non-splat constant by checking
+    // that each element of the constant is not the max/null value.
+    APInt C;
----------------
RKSimon wrote:
> Can you use ISD::matchUnaryPredicate and get this TODO done straightaway?
I didn't think about using matchUnaryPredicate, but that is a possibility. We have this already:
rL348776
I was planning to generalize that (doesn't seem to handle undef elements either) and lift it out of x86. We have things like that in InstCombine called "AddOne" and "SubOne".

But I think it's best to make it a follow-up either way to avoid bug risk in that conversion.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55515/new/

https://reviews.llvm.org/D55515





More information about the llvm-commits mailing list