In patch D3274 using abs.[ds] instruction is forced, as they should behave in accordance with flags Has2008 and ABS2008. Unfortunately for revisions prior mips32r6 and mips64r6, abs.[ds] is not generating correct result when working with NaNs. To generate a sequence which always produce a correct result but also to allow user more control on how his code is compiled, option -mabs is added where user can choose legacy or 2008. By default legacy mode is used on revisions prior R6. Mips32r6 and mips64r6 use abs2008 mode by default.
This is Clang part of patch. LLVM part can be found here: D35983
Depends on D36824.
These require tests. You should test that abs2008 is ignored pre-r2, legacy and abs2008 is accepted up to r5 and legacy is ignored for R6.