[PATCH] D97731: [AArch64][GlobalISel] Lower G_BUILD_VECTOR -> G_DUP

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 3 13:34:42 PST 2021


aemerson added a comment.

In D97731#2601251 <https://reviews.llvm.org/D97731#2601251>, @paquette wrote:

> Looks like this blocks selecting vector neg since we miss some imported patterns. E.g.
>
>   // (sub:{ *:[v2i32] } immAllZerosV:{ *:[v2i32] }, V64:{ *:[v2i32] }:$Rn)  =>  (NEGv2i32:{ *:[v2i32] } V64:{ *:[v2i32] }:$Rn)
>
> Is there any way to get a G_DUP with 0 to match here?

:(

I don't see any easy way. You could maybe replicate the patterns that use immAllZeroesV to have a variant that uses AArch64dup but that doesn't seem like the right approach. I guess we have to avoid using this for constants in the absence of a better idea.


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

https://reviews.llvm.org/D97731



More information about the llvm-commits mailing list