This is an archive of the discontinued LLVM Phabricator instance.

[MSP430] Do not use __mspabi_cmp[fd] for FP comparisons
Needs ReviewPublic

Authored by atrosinenko on Jul 23 2020, 8:01 AM.

Details

Reviewers
asl
awygle
pftbest
Summary

According to MSP430 EABI document, Section 6.2, the result of
__mspabi_cmp[fd] is undefined if either of its arguments is NaN.

See Sections 6.1 and 6.2 of MSP430 EABI document for details.

Diff Detail

Event Timeline

atrosinenko created this revision.Jul 23 2020, 8:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 23 2020, 8:01 AM
Herald added a subscriber: hiraditya. · View Herald Transcript

Revert automatic formatting change.

Hmm, this probably needs further investigations... On one hand, condition codes such as ISD::SETNE are explicit "Don't care operations: undefined if the input is a nan" - that is, exactly how the __mspabi_cmp[fd] are described in MSP430 EABI document. On the other hand, how a fully fledged comparison libcall can be specified then?