[llvm] ced41a1 - [InstCombine] Remove redundant urem demanded bits case
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 18 05:16:14 PDT 2024
Author: Nikita Popov
Date: 2024-06-18T14:16:03+02:00
New Revision: ced41a125c7efdb11087570850bac27a94891030
URL: https://github.com/llvm/llvm-project/commit/ced41a125c7efdb11087570850bac27a94891030
DIFF: https://github.com/llvm/llvm-project/commit/ced41a125c7efdb11087570850bac27a94891030.diff
LOG: [InstCombine] Remove redundant urem demanded bits case
This does the recursive simplification with all bits demanded,
which is not useful. Fall through to the fallback case instead.
Added:
Modified:
llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
index b3eebee0d0d8c..1b00ceec3bcce 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
@@ -893,15 +893,6 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
computeKnownBits(I, Known, Depth, CxtI);
break;
}
- case Instruction::URem: {
- APInt AllOnes = APInt::getAllOnes(BitWidth);
- if (SimplifyDemandedBits(I, 0, AllOnes, LHSKnown, Depth + 1) ||
- SimplifyDemandedBits(I, 1, AllOnes, RHSKnown, Depth + 1))
- return I;
-
- Known = KnownBits::urem(LHSKnown, RHSKnown);
- break;
- }
case Instruction::Call: {
bool KnownBitsComputed = false;
if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
More information about the llvm-commits
mailing list