Re-commit: [mips] abs.[ds], and neg.[ds] should be allowed regardless of -enable...
authorDaniel Sanders <daniel.sanders@imgtec.com>
Wed, 9 Apr 2014 09:56:43 +0000 (09:56 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Wed, 9 Apr 2014 09:56:43 +0000 (09:56 +0000)
commite777fb4725996ce84833c1f519393bf6490abb3a
treeac506b280a791eefadf4a1059ade1e670fa086b7
parent7184f49f400fea6d3f57566ba0749d6de53310cf
Re-commit: [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.

Fixed the issue with the previous version of this patch (r205628). A pre-existing 'let Predicate =' statement was removing some predicates that were necessary for FP64 to behave correctly.

Reviewers: matheusalmeida

Reviewed By: matheusalmeida

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205844 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