[PATCH] D34507: [mips] Generate NMADD and NMSUB instructions when fneg node is present

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 03:24:02 PDT 2017


sdardis added a comment.

LGTM with the inline nits addressed.

For microMIPS, we need to change the predicates guarding various instructions.



================
Comment at: lib/Target/Mips/MicroMipsInstrFPU.td:273
+// To generate NMADD and NMSUB instructions when fneg node is present
+let AdditionalPredicates = [NoNaNsFPMath, HasMadd4, InMicroMips] in {
+  defm : NMADD_NMSUB<NMADD_S_MM, NMSUB_S_MM, FGR32Opnd>;
----------------
This also requires NotMips32r6, as the nmadd, nmsub are missing their relevant predicates.


================
Comment at: test/CodeGen/Mips/nmadd.ll:11
+; RUN: llc < %s -march=mips64el -mcpu=mips3    -target-abi=n64 -enable-no-nans-fp-math | FileCheck %s -check-prefixes=ALL,CHECK-NOT-NM-64
+; RUN-TODO: llc < %s -march=mipsel   -mcpu=mips32r6 -mattr=micromips -enable-no-nans-fp-math -asm-show-inst | FileCheck %s -check-prefixes=ALL,CHECK-NM,CHECK-MM
+
----------------
The check prefixes here are incorrect, they should match the mips32r6 ones.


https://reviews.llvm.org/D34507





More information about the llvm-commits mailing list