[llvm] [SelectionDAG]: Add more cases for UDIV, SDIV, SRA, and SRL (PR #89522)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 10 01:37:59 PDT 2024
================
@@ -1022,6 +1025,9 @@ KnownBits KnownBits::udiv(const KnownBits &LHS, const KnownBits &RHS,
Known.Zero.setHighBits(LeadZ);
Known = divComputeLowBit(Known, LHS, RHS, Exact);
+ std::optional<bool> uge = KnownBits::uge(LHS, RHS);
+ if (uge && *uge)
+ Known.makeGE(APInt(BitWidth, 1));
----------------
jayfoad wrote:
Split KnownBits changes into a separate patch, with a unit test that fails without this extra code.
https://github.com/llvm/llvm-project/pull/89522
More information about the llvm-commits
mailing list