[all-commits] [llvm/llvm-project] f23b4f: [InstSimplify] Add tests for shl implied conditions

Joshua Cao via All-commits all-commits at lists.llvm.org
Tue Jun 6 21:08:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f23b4faaffb1172c3f090f5a28825240aa36969d
      https://github.com/llvm/llvm-project/commit/f23b4faaffb1172c3f090f5a28825240aa36969d
  Author: Joshua Cao <cao.joshua at yahoo.com>
  Date:   2023-06-06 (Tue, 06 Jun 2023)

  Changed paths:
    M llvm/test/Transforms/InstSimplify/implies.ll

  Log Message:
  -----------
  [InstSimplify] Add tests for shl implied conditions


  Commit: cb9f1aaddac0ce6bf9386309e33e104ba3f9359c
      https://github.com/llvm/llvm-project/commit/cb9f1aaddac0ce6bf9386309e33e104ba3f9359c
  Author: Joshua Cao <cao.joshua at yahoo.com>
  Date:   2023-06-06 (Tue, 06 Jun 2023)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Transforms/InstSimplify/implies.ll

  Log Message:
  -----------
  [ValueTracking] Implied conditions for lshr

`V1 >> V2 u<= V1` for any V1, V2

This works for lshr and any div's that are changed to lshr's

This fixes issues in clang and rustc:
https://github.com/llvm/llvm-project/issues/62441
https://github.com/rust-lang/rust/issues/110971

Reviewed By: goldstein.w.n

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


Compare: https://github.com/llvm/llvm-project/compare/c6a69446e152...cb9f1aaddac0


More information about the All-commits mailing list