aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SplitKit.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2021-02-21 14:48:27 -0800
committerCraig Topper <craig.topper@sifive.com>2021-02-21 14:48:29 -0800
commit183bbad1d78a4bf445ec4db1ce01673f6a7feb37 (patch)
tree931fc3087d975d0492d100c4c1d7f29d2f0cd6d6 /llvm/lib/CodeGen/SplitKit.cpp
parent6c9541d4ddfdab0dcb11436485b466a759c3126c (diff)
downloadllvm-183bbad1d78a4bf445ec4db1ce01673f6a7feb37.zip
llvm-183bbad1d78a4bf445ec4db1ce01673f6a7feb37.tar.gz
llvm-183bbad1d78a4bf445ec4db1ce01673f6a7feb37.tar.bz2
[KnownBits][RISCV] Improve known bits for srem.
The result must be less than or equal to the LHS side, so any leading zeros in the left hand side must also exist in the result. This is stronger than the previous behavior where we only considered the sign bit being 0. The affected test case used the sign bit being known 0 to change a sign extend to a zero extend pre type legalization. After type legalization the types were promoted to i64, but we no longer knew bit 31 was zero. This shifts are are the equivalent of an AND with 0xffffffff or zext_inreg X, i32. This patch allows us to see that bit 31 is zero and remove the shifts. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D97124
Diffstat (limited to 'llvm/lib/CodeGen/SplitKit.cpp')
0 files changed, 0 insertions, 0 deletions