[all-commits] [llvm/llvm-project] 14411a: [InstCombine] add tests for disguised smin/smax; NFC

Sanjay Patel via All-commits all-commits at lists.llvm.org
Sun Feb 12 04:55:04 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 14411adc3dced93c536628ee985f5eea2ffe73ab
      https://github.com/llvm/llvm-project/commit/14411adc3dced93c536628ee985f5eea2ffe73ab
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2023-02-12 (Sun, 12 Feb 2023)

  Changed paths:
    M llvm/test/Transforms/InstCombine/select.ll

  Log Message:
  -----------
  [InstCombine] add tests for disguised smin/smax; NFC

Adapted from the existing umin/umax tests.


  Commit: f48f178717927e77c42ef17de42688b8a60733e3
      https://github.com/llvm/llvm-project/commit/f48f178717927e77c42ef17de42688b8a60733e3
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2023-02-12 (Sun, 12 Feb 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/select.ll

  Log Message:
  -----------
  [InstCombine] canonicalize cmp+select as smin/smax

(V == SMIN) ? SMIN+1 : V --> smax(V, SMIN+1)
(V == SMAX) ? SMAX-1 : V --> smin(V, SMAX-1)

https://alive2.llvm.org/ce/z/d5bqjy

Follow-up for the unsigned variants added with:
86b4d8645fc1b866

issue #60374


Compare: https://github.com/llvm/llvm-project/compare/c697119dafce...f48f17871792


More information about the All-commits mailing list