HomePhabricator

[IR] Add min/max/abs intrinsics

Authored by nikic on Sun, Jul 19, 8:06 AM.

Description

[IR] Add min/max/abs intrinsics

This adds the llvm.abs(), llvm.umin(), llvm.umax(), llvm.smin(),
and llvm.smax() intrinsics specified in D81829. For SelectionDAG,
the ISD opcodes and all the legalization and lowering already exist,
so this just wires them up to the intrinsic in the SDAG builder and
adds rudimentary tests. For GlobalISel only the min/max intrinsics
are wired up, as llvm.abs() will require the addition of a G_ABS op,
and corresponding legalization support.

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

Details

Committed
nikicThu, Jul 23, 11:56 AM
Differential Revision
D84125: [IR] Add integer min/max/abs intrinsics
Parents
rGfef0cf081076: [LangRef] Add integer min/max/abs intrinsics
Branches
Unknown
Tags
Unknown