InstCombine: Perform basic isnan combines on llvm.is.fpclass
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 11 Nov 2022 00:15:34 +0000 (16:15 -0800)
committerMatt Arsenault <arsenm2@gmail.com>
Sun, 5 Feb 2023 12:36:09 +0000 (08:36 -0400)
commite9f3034febc62d77caaa0746358332f4f4bead49
tree662d2ccf0f0bcbea944abb178e0ccdca20e93eca
parent893e331903ff8ab432da36a65cb8813c80d230a9
InstCombine: Perform basic isnan combines on llvm.is.fpclass

is.fpclass(x, qnan|snan) -> fcmp uno x, 0.0
is.fpclass(nnan x, qnan|snan|other) -> is.fpclass(x, other)

Start porting the existing combines from llvm.amdgcn.class to the
generic intrinsic. Start with the ones which aren't dependent on the
FP mode.
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
llvm/test/Transforms/InstCombine/combine-is.fpclass-and-fcmp.ll
llvm/test/Transforms/InstCombine/is_fpclass.ll