This is an archive of the discontinued LLVM Phabricator instance.

[mips] abs.[ds], and neg.[ds] should be allowed regardless of -enable-no-nans-fp-math
ClosedPublic

Authored by dsanders on Apr 3 2014, 5:28 AM.

Details

Summary

They behave in accordance with the Has2008 and ABS2008 configuration bits of the
processor which are used to select between the 1985 and 2008 versions of IEEE

  1. In 1985 mode, these instructions are arithmetic (i.e. they raise invalid

operation exceptions when given NaN), in 2008 mode they are non-arithmetic
(i.e. they are copies).

nmadd.[ds], and nmsub.[ds] are still subject to -enable-no-nans-fp-math because
the ISA spec does not explicitly state that they obey Has2008 and ABS2008.

Diff Detail

Event Timeline

matheusalmeida accepted this revision.Apr 4 2014, 6:04 AM

LGTM.

test/CodeGen/Mips/fneg.ll
1

Shouldn't it be neg.[ds] ?

dsanders added inline comments.Apr 4 2014, 6:17 AM
test/CodeGen/Mips/fneg.ll
1

Well spotted. Thanks

dsanders closed this revision.Apr 4 2014, 8:00 AM