[PATCH] D70246: [InstCombine] remove identity shuffle simplification for mask with undefs
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 11:30:05 PST 2019
aqjune added a comment.
The optimization can be kept live by adding freeze (`shufflevector <4 x float> %arg, ...` -> `freeze %arg`), but existing analyzers are not aware of freeze yet (which will block following optimizations) and the underlying problem is more related with interaction of undef/poison (which disappears if undef is removed), so I'm fine with this patch's direction.
BTW, does the current semantics of shufflevector imply that
%shuf = shufflevector <4 x float> %arg, <4 x float> undef, <4 x i32> <i32 undef, i32 1, i32 2, i32 3>
->
%shuf = shufflevector <4 x float> %arg, <4 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
is incorrect?
If the reason why shufflevector returns undef is simply there was no poison constant, why don't we move toward adding poison constant?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70246/new/
https://reviews.llvm.org/D70246
More information about the llvm-commits
mailing list