diff options
author | Sanjay Patel <spatel@rotateright.com> | 2022-02-23 09:06:11 -0500 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2022-02-23 09:10:01 -0500 |
commit | fc3b34c50803274b8ba3b8a30df9177b7d29063c (patch) | |
tree | ea385dcec1d5e34742470d1fbfbdd9e646714c72 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 841355c1e4e35fc02b5b171419979f5f9af0ebc8 (diff) | |
download | llvm-fc3b34c50803274b8ba3b8a30df9177b7d29063c.zip llvm-fc3b34c50803274b8ba3b8a30df9177b7d29063c.tar.gz llvm-fc3b34c50803274b8ba3b8a30df9177b7d29063c.tar.bz2 |
[InstSimplify] remove shift that is redundant with part of funnel shift
In D111530, I suggested that we add some relatively basic pattern-matching
folds for shifts and funnel shifts and avoid a more specialized solution
if possible.
We can start by implementing at least one of these in IR because it's
easier to write the code and verify with Alive2:
https://alive2.llvm.org/ce/z/qHpmNn
This will need to be adapted/extended for SDAG to handle the motivating
bug ( #49541 ) because the patterns only appear later with that example
(added some tests: bb850d422b64)
This can be extended within InstSimplify to handle cases where we 'and'
with a shift too (in that case, kill the funnel shift).
We could also handle patterns where the shift and funnel shift directions
are inverted, but I think it's better to canonicalize that instead to
avoid pattern-match case explosion.
Differential Revision: https://reviews.llvm.org/D120253
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions