[all-commits] [llvm/llvm-project] 0a781d: [ConstraintElimination] Add initial signed support.

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Feb 4 06:03:19 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0a781d98fb0dcabdacf5f50e26dac748d57cd466
      https://github.com/llvm/llvm-project/commit/0a781d98fb0dcabdacf5f50e26dac748d57cd466
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-02-04 (Fri, 04 Feb 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
    M llvm/test/Transforms/ConstraintElimination/gep-arithmetic.ll
    M llvm/test/Transforms/ConstraintElimination/i128.ll
    M llvm/test/Transforms/ConstraintElimination/loops-header-tested-base.ll
    M llvm/test/Transforms/ConstraintElimination/mixed-signed-unsigned-predicates.ll
    M llvm/test/Transforms/ConstraintElimination/sge.ll
    M llvm/test/Transforms/ConstraintElimination/zext.ll

  Log Message:
  -----------
  [ConstraintElimination] Add initial signed support.

This patch adds initial support for signed conditions. To do so,
ConstraintElimination maintains two separate systems, one with facts
from signed and one for unsigned conditions.

To start with this means information from signed and unsigned conditions
is kept completely separate. When it is safe to do so, information from
signed conditions may be also transferred to the unsigned system and
vice versa. That's left for follow-ups.

In the initial version, de-composition of signed values just handles
constants and otherwise just uses the value, without trying to
decompose the operation. Again this can be extended in follow-up
changes.

The main benefit of this limited signed support is proving >=s 0
pre-conditions added in D118799. But even this initial version also
fixes PR53273.

Depends on D118799.

Reviewed By: reames

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




More information about the All-commits mailing list