[AArch64] Remove redundant f{min,max}nm intrinsics.
authorFlorian Hahn <flo@fhahn.com>
Tue, 10 May 2022 18:57:43 +0000 (19:57 +0100)
committerFlorian Hahn <flo@fhahn.com>
Tue, 10 May 2022 18:57:43 +0000 (19:57 +0100)
commit17a73992dd8ba831e47b29b41d5c20292992a810
treece6930a9f0bf818edc3980a7e9299868431aab77
parent180a8536cec8e5e13e86863b17982daf95f2038a
[AArch64] Remove redundant f{min,max}nm intrinsics.

The patch extends AArch64TTIImpl::instCombineIntrinsic to simplify
llvm.aarch64.neon.f{min,max}nm(a, a) -> a.

This helps with simplifying code written using the ACLE, e.g.
see https://godbolt.org/z/jYxsoc89c

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D125234
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/test/Transforms/InstCombine/AArch64/neon-min-max-intrinsics.ll