[all-commits] [llvm/llvm-project] b73c5a: [InstSimplify] Add additional umax tests (NFC)

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Aug 26 13:03:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b73c5a0736fd6e42cf8ca7330cd4bb98aee6bcdc
      https://github.com/llvm/llvm-project/commit/b73c5a0736fd6e42cf8ca7330cd4bb98aee6bcdc
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-08-26 (Wed, 26 Aug 2020)

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

  Log Message:
  -----------
  [InstSimplify] Add additional umax tests (NFC)

A sample of some folds we get if we perform icmp simplification
on min/max intrinsics.


  Commit: d7c119d89c5f6d0789cfd0a139c80e23912c0bb0
      https://github.com/llvm/llvm-project/commit/d7c119d89c5f6d0789cfd0a139c80e23912c0bb0
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-08-26 (Wed, 26 Aug 2020)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/maxmin_intrinsics.ll

  Log Message:
  -----------
  [InstSimplify] Fold min/max intrinsic based on icmp of operands

This is a reboot of D84655, now performing the inner icmp
simplification query without undef folds.

It should be possible to handle the current foldMinMaxSharedOp()
fold based on this, by moving the logic into icmp of min/max instead,
making it more general. We can't drop the folds for constant operands,
because those also allow undef, which we exclude here.

The tests use assumes for exhaustive coverage, and have a few
more examples of misc folds we get based on icmp simplification.

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


Compare: https://github.com/llvm/llvm-project/compare/fd536eeed99e...d7c119d89c5f


More information about the All-commits mailing list