Skip to content
Commit 6357ccf5 authored by Sanjay Patel's avatar Sanjay Patel
Browse files

[InstCombine] reassociate min/max intrinsics with constant operands

Integer min/max operations are associative:
  max (max X, C0), C1 --> max X, (max C0, C1) --> max X, NewC

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

This would avoid a regression when we canonicalize to min/max intrinsics
(see D98152 ).

Differential Revision: https://reviews.llvm.org/D119754
parent 1cd6454a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment