[PATCH] D70246: [InstCombine] remove identity shuffle simplification for mask with undefs
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 17 16:36:58 PST 2019
aqjune added a comment.
In D70246#1747526 <https://reviews.llvm.org/D70246#1747526>, @spatel wrote:
> This is correct based on my understanding of poison (and what we've implemented so far), but we do not explicitly state that poison can occur per-element of a vector. Should we add a LangRef edit here or in a separate patch to address that?
Converting poison to undef is okay, but undef to poison is not. undef & 0 == undef, but poison & 0 == poison. If undef can be optimized to poison, this can cause miscompilation. See here: https://rise4fun.com/Alive/DFYf , https://rise4fun.com/Alive/OZU
Yes, it will be great to have a separate patch that states poison can occur per-element of a vector. This can explain vectorization of operations, e.g. add nsw.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70246/new/
https://reviews.llvm.org/D70246
More information about the llvm-commits
mailing list