[AArch64][GlobalISel] Legalize scalar G_FMINNUM + G_FMAXNUM
authorJessica Paquette <jpaquette@apple.com>
Wed, 18 Aug 2021 00:26:48 +0000 (17:26 -0700)
committerJessica Paquette <jpaquette@apple.com>
Wed, 18 Aug 2021 20:30:03 +0000 (13:30 -0700)
commit45e1a6bd2589469be526c2213598b9847a655fcb
treeb721ee68c53c943636c97ad017d28a0e2ad7f642
parent21d91a8ef319eec9c2c272e19beee726429524aa
[AArch64][GlobalISel] Legalize scalar G_FMINNUM + G_FMAXNUM

For subtargets with full FP16, this is legal for s16, s32, and s64. Without
full FP16, it's legal for s32 and s64.

For s128, this is a libcall.

We also support some vector types, but for now, let's just support scalars.

Differential Revision: https://reviews.llvm.org/D108259
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
llvm/test/CodeGen/AArch64/GlobalISel/legalize-fmaxnum.mir [new file with mode: 0644]
llvm/test/CodeGen/AArch64/GlobalISel/legalize-fminnum.mir [new file with mode: 0644]
llvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir