[mips] Support for +abs2008 attribute
authorAleksandar Beserminji <abeserminji@wavecomp.com>
Mon, 28 Jan 2019 14:59:30 +0000 (14:59 +0000)
committerAleksandar Beserminji <abeserminji@wavecomp.com>
Mon, 28 Jan 2019 14:59:30 +0000 (14:59 +0000)
commit6c5dfcb89edf93eb50356dc39ea0ea2dcbba906f
treed36c2d32305d6a18db49a79cbe30bddc4bf9cb7d
parent9feaecf22c235e5b97bd56d657a90fe1736eba56
[mips] Support for +abs2008 attribute

Instruction abs.[ds] is not generating correct result when working
with NaNs for revisions prior mips32r6 and mips64r6.

To generate a sequence which always produce a correct result, but also
to allow user more control on how his code is compiled, attribute
+abs2008 is added, so user can choose legacy or 2008.

By default legacy mode is used on revisions prior R6. Mips32r6 and
mips64r6 use abs2008 mode by default.

Differential Revision: https://reviews.llvm.org/D35983

llvm-svn: 352370
llvm/lib/Target/Mips/MicroMipsInstrFPU.td
llvm/lib/Target/Mips/Mips.td
llvm/lib/Target/Mips/MipsISelLowering.cpp
llvm/lib/Target/Mips/MipsInstrFPU.td
llvm/lib/Target/Mips/MipsInstrInfo.td
llvm/lib/Target/Mips/MipsSubtarget.cpp
llvm/lib/Target/Mips/MipsSubtarget.h
llvm/test/CodeGen/Mips/fabs.ll
llvm/test/CodeGen/Mips/llvm-ir/abs.ll
llvm/test/CodeGen/Mips/msa/f16-llvm-ir.ll