[all-commits] [llvm/llvm-project] fef0cf: [LangRef] Add integer min/max/abs intrinsics
Nikita Popov via All-commits
all-commits at lists.llvm.org
Thu Jul 23 11:56:48 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: fef0cf081076006887362d6bfcfc306522ce2bd3
https://github.com/llvm/llvm-project/commit/fef0cf081076006887362d6bfcfc306522ce2bd3
Author: Roman Lebedev <lebedev.ri at gmail.com>
Date: 2020-07-23 (Thu, 23 Jul 2020)
Changed paths:
M llvm/docs/LangRef.rst
Log Message:
-----------
[LangRef] Add integer min/max/abs intrinsics
Add LangRef specification for the llvm.abs, llvm.umin, llvm.umax,
llvm.smin, and llvm.smax integer intrinsics.
Link to RFC:
https://lists.llvm.org/pipermail/llvm-dev/2020-June/142257.html
Proposed alive2 implementation:
https://github.com/AliveToolkit/alive2/pull/353
Differential Revision: https://reviews.llvm.org/D81829
Commit: deb4bb2b3abd216aceaa109a5304f025a234540f
https://github.com/llvm/llvm-project/commit/deb4bb2b3abd216aceaa109a5304f025a234540f
Author: Nikita Popov <nikita.ppv at gmail.com>
Date: 2020-07-23 (Thu, 23 Jul 2020)
Changed paths:
M llvm/include/llvm/IR/Intrinsics.td
M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
A llvm/test/CodeGen/AMDGPU/GlobalISel/minmaxabs.ll
A llvm/test/CodeGen/X86/abs.ll
A llvm/test/CodeGen/X86/smax.ll
A llvm/test/CodeGen/X86/smin.ll
A llvm/test/CodeGen/X86/umax.ll
A llvm/test/CodeGen/X86/umin.ll
Log Message:
-----------
[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
Compare: https://github.com/llvm/llvm-project/compare/2f56046d7c66...deb4bb2b3abd
More information about the All-commits
mailing list