[GlobalISel] Add IRTranslator support for G_ISNAN
authorJessica Paquette <jpaquette@apple.com>
Tue, 17 Aug 2021 16:49:44 +0000 (09:49 -0700)
committerJessica Paquette <jpaquette@apple.com>
Wed, 18 Aug 2021 17:48:10 +0000 (10:48 -0700)
commitd9873711cb03ac7aedcaadcba42f82c66e962e6e
tree9629f55e8deda1c17db363b275d4fdb53ecf14eb
parent66e2772e4285588ccc3bcdb5f392c8326debbd7d
[GlobalISel] Add IRTranslator support for G_ISNAN

Translate the `@llvm.isnan` intrinsic to G_ISNAN when we see it.

This is pretty much the same as the associated SelectionDAGBuilder code. Main
difference is that we don't expand it here. It makes more sense to do that
during legalization in GlobalISel. GlobalISel will just legalize the generated
illegal types.

Differential Revision: https://reviews.llvm.org/D108226
llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-isnan.ll [new file with mode: 0644]