[PATCH] D103180: [InstSimplify] Add constant fold for extractelement + splat for scalable vectors

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 2 10:53:16 PDT 2021


spatel added a comment.

In D103180#2793718 <https://reviews.llvm.org/D103180#2793718>, @CarolineConcatto wrote:

> In D103180#2782981 <https://reviews.llvm.org/D103180#2782981>, @spatel wrote:
>
>> For the test where the index is presumed invalid (i32 -1), is that enforced somehow? Is there a hard limit somewhere that says i32 0xffffffff must be invalid?
>
> I think the reason it says is invalid is because of the test:
> uge(ValSVTy->getMinNumElements() -> unsigned greater or equal

Hmm...but those are uint64_t types/compares, so I don't see how it would automatically be considered invalid to have a "i32 -1". I don't think it really matters to this patch. I was just curious if there's some implicit semantic difference being verified between the tests "extractconstant_shuffle_maybe_out_of_range" and "extractconstant_shuffle_invalid_index".

So no objection from me, but someone more directly involved with scalable vectors should probably give final approval.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103180



More information about the llvm-commits mailing list