HomePhabricator

[InstSimplify] simplify abs if operand is known non-negative

Authored by spatel on Sat, Aug 1, 4:46 AM.

Description

[InstSimplify] simplify abs if operand is known non-negative

abs() should be rare enough that using value tracking is not going
to be a compile-time cost burden, so use it to reduce a variety of
potential patterns. We do this in DAGCombiner too.

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

Details

Committed
spatelSat, Aug 1, 4:47 AM
Differential Revision
D85043: [InstSimplify] simplify abs if operand is known non-negative
Parents
rG1aa52d67d1c1: [InstSimplify] add abs test with assume; NFC
Branches
Unknown
Tags
Unknown