aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineCopyPropagation.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-01-25 20:44:53 -0800
committerKazu Hirata <kazu@google.com>2023-01-25 20:44:53 -0800
commit3b53c6020052215be97898a4312fc41ca626a0ad (patch)
tree1634b5c414d3a4f6eb45395346e1ca89dc9800fc /llvm/lib/CodeGen/MachineCopyPropagation.cpp
parentbce910242e7269446683cfcaffd3ebf5281a9125 (diff)
downloadllvm-3b53c6020052215be97898a4312fc41ca626a0ad.zip
llvm-3b53c6020052215be97898a4312fc41ca626a0ad.tar.gz
llvm-3b53c6020052215be97898a4312fc41ca626a0ad.tar.bz2
[Mips] Simplify isShiftedUIntAtAnyPosition (NFC)
isShiftedUIntAtAnyPosition never gets zero as the argument because the caller processes ImmValue satisfying isInt<16>(ImmValue), which includes zero, long before it calls isShiftedUIntAtAnyPosition. Given that the argument is always nonzero, findFirstSet is identical to llvm::countr_zero. Also, x == x >> BitNum << BitNum is always true, so we are left with: isUInt<N>(x >> llvm::countr_zero(x)) Just in case the caller changes its behavior and starts passing zero to us, we can protect the shift from undefined behavior "x << 64" by adding "x &&".
Diffstat (limited to 'llvm/lib/CodeGen/MachineCopyPropagation.cpp')
0 files changed, 0 insertions, 0 deletions