[PATCH] D124997: [InstCombine] Fix scalable-vector bitwise select matching

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 5 07:49:55 PDT 2022


frasercrmck added a comment.

In D124997#3493954 <https://reviews.llvm.org/D124997#3493954>, @spatel wrote:

> In D124997#3493929 <https://reviews.llvm.org/D124997#3493929>, @spatel wrote:
>
>> Do we have a test for scalable vectors where the remaining part of the transform is valid?
>
> Ah, the 1st test covers that. But then couldn't we just make a one-line change to avoid the problematic part?
>
>   if (auto *VecTy = dyn_cast<FixedVectorType>(Cond->getType())) {

Aye, that's what the 1st test is for.

I was under the impression that if `Cond->getType()` is //any// vector type we must either be able to do the bitcast or bail. So wouldn't we just need the other checks I've added in an `else`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124997



More information about the llvm-commits mailing list