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

Juneyoung Lee via llvm-dev llvm-dev at lists.llvm.org
Sat Dec 19 13:25:59 PST 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201220/d8580425/attachment.html>


More information about the llvm-dev mailing list