[all-commits] [llvm/llvm-project] 8c7a7e: [InstCombine] allow more min/max with 'not' folds ...

RotateRight via All-commits all-commits at lists.llvm.org
Wed Sep 1 11:40:56 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8c7a7e1f67b12d250fbd6cbd3aed39dccacd53bf
      https://github.com/llvm/llvm-project/commit/8c7a7e1f67b12d250fbd6cbd3aed39dccacd53bf
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-09-01 (Wed, 01 Sep 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/minmax-intrinsics.ll

  Log Message:
  -----------
  [InstCombine] allow more min/max with 'not' folds for intrinsics

isFreeToInvert allows min/max with 'not' on both operands,
so easing the argument restriction catches the case where
that operand has one use.

We already handle the sub-patterns when there are less uses:
https://alive2.llvm.org/ce/z/8Jatm_

...but this is another step towards parity with the
equivalent icmp+select idioms ( D98152 ).

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




More information about the All-commits mailing list