[PATCH] D46057: [mips] Fix how compiler fuse instructions to fmadd/fmsub

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 25 07:00:15 PDT 2018


sdardis added inline comments.


================
Comment at: lib/Target/Mips/MipsInstrInfo.td:252-254
+// TODO: Add support for FPOpFusion::Standard
+def AllowFPOpFusion : Predicate<"(TM.Options.AllowFPOpFusion =="
+                                " FPOpFusion::Fast)">;
----------------
Add an adjective like 'FPOP_FUSION_FAST' which uses this predicate in the AdditionalPredicates field of PredicateControl.


================
Comment at: lib/Target/Mips/MipsMSAInstrInfo.td:3138
+              (FMSUB_W MSA128WOpnd:$wd, MSA128WOpnd:$ws, MSA128WOpnd:$wt)>,
+              Requires<[AllowFPOpFusion]>;
+def : MipsPat<(fsub MSA128DOpnd:$wd, (fmul MSA128DOpnd:$ws, MSA128DOpnd:$wt)),
----------------
Use the new adjective here instead of Requires<[..]>.


================
Comment at: test/CodeGen/Mips/fp-contract.ll:9
+
+define dso_local void @try_fuse_A(<4 x float>* noalias nocapture sret %agg.result, <4 x float>* nocapture readonly dereferenceable(16) %acc, <4 x float>* nocapture readonly dereferenceable(16) %a, <4 x float>* nocapture readonly dereferenceable(16) %b) local_unnamed_addr {
+entry:
----------------
Can you try simplifiying the test case here? There's a lot of meta data that shouldn't have an effect.

Also, add a short comment explaining the test case's purpose.


Repository:
  rL LLVM

https://reviews.llvm.org/D46057





More information about the llvm-commits mailing list