[PATCH] D118317: [InstCombine] Fold and-reduce idiom
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 27 07:41:12 PST 2022
mkazantsev added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:5910
+ if (!DL.isLegalInteger(NumBits))
+ return nullptr;
+
----------------
RKSimon wrote:
> Why not just use NumBits < getMinVectorRegisterBitWidth() ?
And what if some platform has scalar types wider than vector types? Theoretically, it's possible I think. Or, say,`i66` is less than `i128`, should be be allowed?
I suggest to leave this thing alone for now. We can have a separate discussion on what is the less restrictive check here. I really don't want this to be blocked by this particular thing.
================
Comment at: llvm/test/Transforms/InstCombine/icmp-vec.ll:431
define i1 @eq_cast_ne-1(<2 x i7> %x, <2 x i7> %y) {
; CHECK-LABEL: @eq_cast_ne-1(
----------------
spatel wrote:
> If this had a power-of-2 type with this pattern, would we handle it? Would be good to add a few more test comments, so the intent is clear.
> https://alive2.llvm.org/ce/z/rDeaif
>
>
Yup. It was going to make this as 2nd step of this activity and support or-base `ne` pattern.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118317/new/
https://reviews.llvm.org/D118317
More information about the llvm-commits
mailing list