[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)
commitdc404fff1299b317741836479d59f8971dd38ccf
tree264122593442051c846f6bd0035eed3c5b42f8fb
parent659e09e3729b903ee299300e4d29a482ce986bab
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205628 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MipsISelLowering.cpp
lib/Target/Mips/MipsInstrFPU.td
lib/Target/Mips/MipsInstrInfo.td
test/CodeGen/Mips/fabs.ll
test/CodeGen/Mips/fmadd1.ll
test/CodeGen/Mips/fneg.ll