[all-commits] [llvm/llvm-project] 03a4f1: [ConstantRange] Sign-flipping of signedness-invari...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Sun Oct 31 12:54:09 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03a4f1f3b8a0e3acc6ac1f786446c9abcffe1f89
      https://github.com/llvm/llvm-project/commit/03a4f1f3b8a0e3acc6ac1f786446c9abcffe1f89
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-10-31 (Sun, 31 Oct 2021)

  Changed paths:
    M llvm/include/llvm/IR/ConstantRange.h
    M llvm/lib/IR/ConstantRange.cpp
    M llvm/unittests/IR/ConstantRangeTest.cpp

  Log Message:
  -----------
  [ConstantRange] Sign-flipping of signedness-invariant comparisons

For certain combination of LHS and RHS constant ranges,
the signedness of the relational comparison predicate is irrelevant.

This implements complete and precise model for all predicates,
as confirmed by the brute-force tests. I'm not sure if there are
some more cases that we can handle here.

In a follow-up, CVP will make use of this.

Reviewed By: nikic

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




More information about the All-commits mailing list