diff options
author | Nikita Popov <npopov@redhat.com> | 2023-12-01 15:52:06 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2023-12-01 16:09:54 +0100 |
commit | faebb1b2e6891687e4f608b74205985ec78ade40 (patch) | |
tree | 045c97321e0f55da79b7fb91ba0f5e29ef3da1be /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | 7007919cfde7c7515c0c2cc9b7d66616225d0b17 (diff) | |
download | llvm-faebb1b2e6891687e4f608b74205985ec78ade40.zip llvm-faebb1b2e6891687e4f608b74205985ec78ade40.tar.gz llvm-faebb1b2e6891687e4f608b74205985ec78ade40.tar.bz2 |
Reapply [InstCombine] Support inverting lshr with non-negative operand
My initial patch contained a typo, resulting in the wrong value
being checked for non-negativeness.
-----
If the lshr operand is non-negative, we can treat it the same
way as an ashr. Ideally we would represent this as "lshr nneg",
but for now just perform the necessary ValueTracking query.
Proof: https://alive2.llvm.org/ce/z/Ahg4ri
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions