[all-commits] [llvm/llvm-project] 1470ce: [InstSimplify] fold min/max with matching min/max ...

RotateRight via All-commits all-commits at lists.llvm.org
Tue Aug 11 08:24:37 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1470ce4a76fc56729fb15dab0ca9877e25d26d58
      https://github.com/llvm/llvm-project/commit/1470ce4a76fc56729fb15dab0ca9877e25d26d58
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-08-11 (Tue, 11 Aug 2020)

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

  Log Message:
  -----------
  [InstSimplify] fold min/max with matching min/max operands

I think this is the last remaining translation of an existing
instcombine transform for the corresponding cmp+sel idiom.

This interpretation is more general though - we can remove
mismatched signed/unsigned combinations in addition to the
more obvious cases.

min/max(X, Y) must produce X or Y as the result, so this is
just another clause in the existing transform that was already
matching a min/max of min/max.




More information about the All-commits mailing list