CodeGen: Optimize lowering of is.fpclass fcZero|fcSubnormal
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 2 Feb 2023 14:28:05 +0000 (10:28 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 6 Jul 2023 17:03:57 +0000 (13:03 -0400)
commit61820f8b5dac779d136a342d22f5e66f99c7b648
tree97653237a42963a7997546b9787e1745577386bc
parent5e763d35e46ec5ce3b9d506ecf8690d44a98a3d7
CodeGen: Optimize lowering of is.fpclass fcZero|fcSubnormal

Combine the two checks into a check if the exponent bits are 0. The
inverted case isn't reachable until a future change, and GlobalISel
currently doesn't attempt the inversion optimization.

https://reviews.llvm.org/D143182
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/AMDGPU/llvm.is.fpclass.f16.ll
llvm/test/CodeGen/X86/is_fpclass.ll