[llvm-dev] Using poison constant as a don't-care value when emitting/optimizing vector operations

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] Using poison constant as a don't-care value when emitting/optimizing vector operations

David Blaikie via llvm-dev
Hello all,

Currently, undef is used as a don't-care value for vector operations, which causes hard problems.
For example, a shufflevector sometimes cannot be optimized away (https://bugs.llvm.org/show_bug.cgi?id=44185). The reason is that undef is not undefined enough.

To avoid such problem, I'd like to suggest using poison constant for vector operations' placeholder instead.
I made a patch that updates InstCombine's SimplifyDemandedVectorElts here, with a detailed description: https://reviews.llvm.org/D93586

Thanks,
Juneyoung

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Using poison constant as a don't-care value when emitting/optimizing vector operations

David Blaikie via llvm-dev
Thank you for doing this, it seems the right thing to me.

Cheers,
Nicolai

On Sat, Dec 19, 2020 at 10:26 PM Juneyoung Lee via llvm-dev <[hidden email]> wrote:
Hello all,

Currently, undef is used as a don't-care value for vector operations, which causes hard problems.
For example, a shufflevector sometimes cannot be optimized away (https://bugs.llvm.org/show_bug.cgi?id=44185). The reason is that undef is not undefined enough.

To avoid such problem, I'd like to suggest using poison constant for vector operations' placeholder instead.
I made a patch that updates InstCombine's SimplifyDemandedVectorElts here, with a detailed description: https://reviews.llvm.org/D93586

Thanks,
Juneyoung
_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


--
Lerne, wie die Welt wirklich ist,
aber vergiss niemals, wie sie sein sollte.

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev