[all-commits] [llvm/llvm-project] d23b68: [InstCombine] add tests for min/max with extend an...

RotateRight via All-commits all-commits at lists.llvm.org
Mon Feb 1 10:55:30 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d23b68a8798913bda65db109e57029139197c587
      https://github.com/llvm/llvm-project/commit/d23b68a8798913bda65db109e57029139197c587
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-02-01 (Mon, 01 Feb 2021)

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

  Log Message:
  -----------
  [InstCombine] add tests for min/max with extend and constant operand; NFC


  Commit: 0ce2920f1707266c0d94dacc8719251b7b6a2c01
      https://github.com/llvm/llvm-project/commit/0ce2920f1707266c0d94dacc8719251b7b6a2c01
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-02-01 (Mon, 01 Feb 2021)

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

  Log Message:
  -----------
  [InstCombine] try to narrow min/max intrinsics with constant operand

The constant trunc/ext may not be the optimal pre-condition,
but I think that handles the common cases.

Example of Alive2 proof:
https://alive2.llvm.org/ce/z/sREeLC

This is another step towards canonicalizing to the intrinsics.
Narrowing was identified as source of potential regression for
abs(), so we need to handle this for min/max - see:
https://llvm.org/PR48816

If this is not enough, we could process intrinsics in
the trunc-driven matching in canEvaluateTruncated().


Compare: https://github.com/llvm/llvm-project/compare/cb2e2d506814...0ce2920f1707


More information about the All-commits mailing list