[mips] abs.[ds], and neg.[ds] should be allowed regardless of -enable-no-nans-fp...
authorDaniel Sanders <daniel.sanders@imgtec.com>
Fri, 4 Apr 2014 14:52:54 +0000 (14:52 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Fri, 4 Apr 2014 14:52:54 +0000 (14:52 +0000)
commitd4341a0ad731bc05d90c0dfae9526a1ffce7dd0c
tree32d3388c33d6e316dfa74262339327bb81e5dc99
parent24c8d92fec12b2c508e100be82d942044118d52e
[mips] abs.[ds], and neg.[ds] should be allowed regardless of -enable-no-nans-fp-math

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
754. 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.

Reviewers: matheusalmeida

Reviewed By: matheusalmeida

Differential Revision: http://llvm-reviews.chandlerc.com/D3274

llvm-svn: 205628
llvm/lib/Target/Mips/MipsISelLowering.cpp
llvm/lib/Target/Mips/MipsInstrFPU.td
llvm/lib/Target/Mips/MipsInstrInfo.td
llvm/test/CodeGen/Mips/fabs.ll
llvm/test/CodeGen/Mips/fmadd1.ll
llvm/test/CodeGen/Mips/fneg.ll