[all-commits] [llvm/llvm-project] e9179a: [Support] improve known bits analysis for multiply...
RotateRight via All-commits
all-commits at lists.llvm.org
Wed Dec 8 08:50:19 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e9179a6a029a501524cf3f34434c9dc2be4d74cc
https://github.com/llvm/llvm-project/commit/e9179a6a029a501524cf3f34434c9dc2be4d74cc
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-12-08 (Wed, 08 Dec 2021)
Changed paths:
M llvm/lib/Support/KnownBits.cpp
M llvm/test/CodeGen/AMDGPU/sdiv64.ll
M llvm/test/CodeGen/AMDGPU/srem64.ll
M llvm/test/Transforms/InstCombine/icmp-mul.ll
Log Message:
-----------
[Support] improve known bits analysis for multiply by power-of-2 (1 set bit)
This can be viewed as recognizing that multiply-by-power-of-2 doesn't
have a carry into the top bit of an M-bit * N-bit number.
Enhancing canonicalization of mul -> select might also handle some of
these if we were ok with increasing instruction count with casts in
some cases.
This doesn't help https://llvm.org/PR49055 , but it's a simpler
pattern that we miss.
Note: "-sccp" already gets these examples using a constant
range analysis.
Differential Revision: https://reviews.llvm.org/D114962
More information about the All-commits
mailing list