[all-commits] [llvm/llvm-project] 2ebfda: [InstCombine] Improve folding of mul + icmp

Alexander Shaposhnikov via All-commits all-commits at lists.llvm.org
Fri Jul 22 15:09:41 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2ebfda2417e9cead344b020c1b1b7d3344893291
      https://github.com/llvm/llvm-project/commit/2ebfda2417e9cead344b020c1b1b7d3344893291
  Author: Alexander Shaposhnikov <ashaposhnikov at google.com>
  Date:   2022-07-22 (Fri, 22 Jul 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/test/Analysis/ValueTracking/known-power-of-two-urem.ll
    M llvm/test/Transforms/InstCombine/icmp-mul.ll

  Log Message:
  -----------
  [InstCombine] Improve folding of mul + icmp

This diff adds folds for patterns like X * A < B
where A, B are constants and "mul" has either "nsw" or "nuw".
(to address https://github.com/llvm/llvm-project/issues/56563).

Test plan:
1/ ninja check-llvm check-clang
2/ Bootstrapped LLVM/Clang pass tests

Differential revision: https://reviews.llvm.org/D130039




More information about the All-commits mailing list