This is an archive of the discontinued LLVM Phabricator instance.

DAG: Fix broken lowering of is.fplcass fcZero with DAZ
ClosedPublic

Authored by arsenm on Jan 31 2023, 10:30 AM.

Details

Summary

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.

Diff Detail

Event Timeline

arsenm created this revision.Jan 31 2023, 10:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2023, 10:30 AM
arsenm requested review of this revision.Jan 31 2023, 10:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2023, 10:30 AM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm updated this revision to Diff 493669.Jan 31 2023, 10:33 AM

Add another test for dynamic mode

sepavloff accepted this revision.Jan 31 2023, 9:14 PM

LGTM.

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
8059

Extra empty line.

This revision is now accepted and ready to land.Jan 31 2023, 9:14 PM
jcranmer-intel accepted this revision.Feb 3 2023, 1:41 PM
arsenm closed this revision.Feb 5 2023, 5:15 AM

db0e6591612b53910a1b366863348bdb9d7d2fb1

Turns out the test I added for dynamic accidentally works even if it parses as Invalid