This is an archive of the discontinued LLVM Phabricator instance.

AArch64: implement canonical `!isnan(...)` with single compare.
ClosedPublic

Authored by t.p.northover on Nov 8 2022, 3:59 AM.

Details

Reviewers
paquette
Summary

LLVM canonicalizes a check for whether a number is NaN or not to fcmp ord %in, zeroinitializer. An ord check normally needs to be lowered to two separate comparisons on AArch64 but in this case it's equivalent to fcmp oeq %in, %in which we have a single fcmeq instruction for.

Diff Detail

Event Timeline

t.p.northover created this revision.Nov 8 2022, 3:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 8 2022, 3:59 AM
t.p.northover requested review of this revision.Nov 8 2022, 3:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 8 2022, 3:59 AM
This revision is now accepted and ready to land.Dec 6 2022, 10:08 AM
t.p.northover closed this revision.Dec 7 2022, 11:22 AM

Thanks. Committed as 6b98824a587a.