[PATCH] D132206: [DAGCombiner] Fold vecreduce_xor/or/and(splat_vector(val)) to constant

WangLian via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 19 00:24:06 PDT 2022


Jimerlife added a comment.

In D132206#3734343 <https://reviews.llvm.org/D132206#3734343>, @craig.topper wrote:

> Do you have real world examples of C code where this occurs?
>
> Would this be better to do in InstCombine?
>
> Where are the test deltas?

I have no real world examples of C code, just think could fold this. I am not sure if this is better to do in InstCombine. I create precommit tests D132207 <https://reviews.llvm.org/D132207>, but this test does't consider vector element count. Element count should also be consider.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132206



More information about the llvm-commits mailing list