[all-commits] [llvm/llvm-project] fe1f3c: [SCCP] convert signed div/rem to unsigned for non-...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Tue Sep 6 06:00:47 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fe1f3cfc2669aca387a45c8ce615b45c1db50fc6
      https://github.com/llvm/llvm-project/commit/fe1f3cfc2669aca387a45c8ce615b45c1db50fc6
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-09-06 (Tue, 06 Sep 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SCCP.cpp
    M llvm/test/Transforms/PhaseOrdering/srem.ll
    M llvm/test/Transforms/SCCP/binaryops-range-special-cases.ll
    M llvm/test/Transforms/SCCP/divrem.ll

  Log Message:
  -----------
  [SCCP] convert signed div/rem to unsigned for non-negative operands

This extends the transform added with D81756 to handle div/rem opcodes.
For example:
https://alive2.llvm.org/ce/z/cX6za6

This replicates part of what CVP already does, but the motivating example
from issue #57472 demonstrates a phase ordering problem - we convert
branches to select before CVP runs and miss the transform.

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




More information about the All-commits mailing list