[all-commits] [llvm/llvm-project] 611a02: [ConstantRanges] Use APInt for constant case for u...

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed Jun 30 03:21:40 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 611a02cce509d304ebf66054b7816f1e0b5a792c
      https://github.com/llvm/llvm-project/commit/611a02cce509d304ebf66054b7816f1e0b5a792c
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2021-06-30 (Wed, 30 Jun 2021)

  Changed paths:
    M llvm/lib/IR/ConstantRange.cpp
    M llvm/test/Transforms/SCCP/binaryops-range-special-cases.ll

  Log Message:
  -----------
  [ConstantRanges] Use APInt for constant case for urem/srem.

Currently UREM & SREM on constant ranges produces overly pessimistic
results for single element constant ranges.

Delegate to APInt's implementation if both operands are single element
constant ranges. We already do something similar for other binary
operators, like binary AND.

Fixes PR49731.

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D105115




More information about the All-commits mailing list