[all-commits] [llvm/llvm-project] 397a9c: Recommit "[InstCombine] Expand `foldSelectICmpAndO...

goldsteinn via All-commits all-commits at lists.llvm.org
Thu Aug 24 17:43:34 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 397a9cc4d875712a648271ecbac05ac6382c5708
      https://github.com/llvm/llvm-project/commit/397a9cc4d875712a648271ecbac05ac6382c5708
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-08-24 (Thu, 24 Aug 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/select-with-bitwise-ops.ll

  Log Message:
  -----------
  Recommit "[InstCombine] Expand `foldSelectICmpAndOr` -> `foldSelectICmpAndBinOp` to work for more binops" (2nd Try)

Was missing a nullptr check before derefencing. Fixed + test case
included in the patch.

Re-Reviewed By: nikic

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


  Commit: d0b4ed9a2cf353eb9f59be344862595af2bd205d
      https://github.com/llvm/llvm-project/commit/d0b4ed9a2cf353eb9f59be344862595af2bd205d
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-08-24 (Thu, 24 Aug 2023)

  Changed paths:
    M llvm/test/Analysis/ValueTracking/known-non-zero.ll

  Log Message:
  -----------
  [ValueTracking] Add tests for knowing `sdiv` is non-zero; NFC

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


  Commit: 846ff921ffe8bf43eb2f66869475ad9a5ef0a02a
      https://github.com/llvm/llvm-project/commit/846ff921ffe8bf43eb2f66869475ad9a5ef0a02a
  Author: Noah Goldstein <goldstein.w.n at gmail.com>
  Date:   2023-08-24 (Thu, 24 Aug 2023)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Analysis/ValueTracking/known-non-zero.ll

  Log Message:
  -----------
  [ValueTracking] Compute `sdiv` as non-zero if `abs(num) u>= abs(denum)`

Just covering an additional case.

Proof: https://alive2.llvm.org/ce/z/MJz9fT

Reviewed By: nikic

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


Compare: https://github.com/llvm/llvm-project/compare/1896096002b7...846ff921ffe8


More information about the All-commits mailing list