[PATCH] D43090: GlobalISel: IRTranslate llvm.fmuladd.* intrinsic

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 11:58:58 PST 2018


aditya_nandakumar added inline comments.


================
Comment at: lib/CodeGen/GlobalISel/IRTranslator.cpp:765
+        TLI.isFMAFasterThanFMulAndFAdd(TLI.getValueType(*DL, CI.getType()))) {
+      MIRBuilder.buildInstr(TargetOpcode::G_FMA, Dst, Op0, Op1, Op2);
+    } else {
----------------
qcolombet wrote:
> So far we stayed away of "optimizations" in the IRTranslator.
> I wonder if this part of the lowering should be part of a combiner instead.
> 
> In particular, the language reference says:
> Fusion is not guaranteed, even if the target platform supports it.
> 
> What do you think?
That's also what I said when I spoke with him in person. Unfortunately, currently there's no other place to put it (to avoid duplicating across all targets).


https://reviews.llvm.org/D43090





More information about the llvm-commits mailing list