DAG: Fix broken lowering of is.fplcass fcZero with DAZ
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 31 Jan 2023 18:23:56 +0000 (14:23 -0400)
committerMatt Arsenault <arsenm2@gmail.com>
Sun, 5 Feb 2023 13:14:16 +0000 (09:14 -0400)
commitdb0e6591612b53910a1b366863348bdb9d7d2fb1
treec138e6d2a6044e5b25c38a106d6221b1754611e5
parent43b5008e85d349b28a93deb54a39d56f2f2f0878
DAG: Fix broken lowering of is.fplcass fcZero with DAZ

is.fpclass x, fcZero is not equivalent to fcmp with 0 if
denormals are treated as 0. It would be equivalent to fcZero|fcSubnormal
which can be done separately; this is the minimal correctness fix.

The same optimization was not ported to the GlobalISel version.
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/X86/is_fpclass.ll