diff options
author | Sanjay Patel <spatel@rotateright.com> | 2020-01-28 17:06:22 -0500 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2020-01-29 08:34:29 -0500 |
commit | 87f6314f8cd1fd5bb0ce04eff6c5843529c6ab53 (patch) | |
tree | dee0a166e678e9fb0605453feb53be6715b1c814 /llvm/lib/Transforms/Utils/CodeMoverUtils.cpp | |
parent | 2939fc13c8f6a5dbd1be77c1d19dc2720253b8c5 (diff) | |
download | llvm-87f6314f8cd1fd5bb0ce04eff6c5843529c6ab53.zip llvm-87f6314f8cd1fd5bb0ce04eff6c5843529c6ab53.tar.gz llvm-87f6314f8cd1fd5bb0ce04eff6c5843529c6ab53.tar.bz2 |
[InstCombine] canonicalize splat shuffle after cmp
cmp (splat V1, M), SplatC --> splat (cmp V1, SplatC'), M
As discussed in PR44588:
https://bugs.llvm.org/show_bug.cgi?id=44588
...we try harder to push shuffles after binops than after compares.
This patch handles the special (but presumably most common case) of
splat shuffles. If both operands are splats, then we can do the
comparison on the non-splat inputs followed by splat of the compare.
That should take care of the regression noted in D73411.
There's another potential fold requested in PR37463 to scalarize the
compare, but that's another patch (and it's not clear if we can do
that without the ability to undo it later):
https://bugs.llvm.org/show_bug.cgi?id=37463
Differential Revision: https://reviews.llvm.org/D73575
Diffstat (limited to 'llvm/lib/Transforms/Utils/CodeMoverUtils.cpp')
0 files changed, 0 insertions, 0 deletions