diff options
author | Sanjay Patel <spatel@rotateright.com> | 2021-12-14 15:18:10 -0500 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2021-12-14 16:00:42 -0500 |
commit | 1a60ae02c65d26981017f59bc5918d3c2e363bfd (patch) | |
tree | b49161c553cdb13ac710858db0f48c34b682887d /llvm/lib/ExecutionEngine/Orc/ObjectFileInterface.cpp | |
parent | 96130b5dc7f600e0c8f5e850ddddfaba952bba34 (diff) | |
download | llvm-1a60ae02c65d26981017f59bc5918d3c2e363bfd.zip llvm-1a60ae02c65d26981017f59bc5918d3c2e363bfd.tar.gz llvm-1a60ae02c65d26981017f59bc5918d3c2e363bfd.tar.bz2 |
[InstCombine] fold mask-with-signbit-splat to icmp+select
~(iN X s>> (N-1)) & Y --> (X s< 0) ? 0 : Y
https://alive2.llvm.org/ce/z/JKlQ9x
This is similar to D111410 / 727e642e970d028049d ,
but it includes a 'not' of the signbit and so it
saves an instruction in the basic pattern.
DAGCombiner or target-specific folds can expand
this back into bit-hacks.
The diffs in the logical-select tests are not true
regressions - running early-cse and another round
of instcombine is expected in a normal opt pipeline,
and that reduces back to a minimal form as shown
in the duplicated PhaseOrdering test.
I have no understanding of the SystemZ diffs, so
I made the minimal edits suggested by FileCheck to
make that test pass again. That whole test file is
wrong though. It is running the entire optimizer (-O2)
to check IR, and then topping that by even running
codegen and checking asm. It needs to be split up.
Fixes #52631
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/ObjectFileInterface.cpp')
0 files changed, 0 insertions, 0 deletions