@@ -74,9 +74,9 @@ def immshr: CGHelperFn<"MVEImmediateShr"> {
7474 let special_params = [IRBuilderIntParam<1, "unsigned">,
7575 IRBuilderIntParam<2, "bool">];
7676}
77- def fadd : IRBuilder<"CreateFAdd">;
78- def fmul : IRBuilder<"CreateFMul">;
79- def fsub : IRBuilder<"CreateFSub">;
77+ def fadd_node : IRBuilder<"CreateFAdd">;
78+ def fmul_node : IRBuilder<"CreateFMul">;
79+ def fsub_node : IRBuilder<"CreateFSub">;
8080def load: IRBuilder<"CreateLoad"> {
8181 let special_params = [IRBuilderAddrParam<0>];
8282}
@@ -212,6 +212,13 @@ def unsignedflag;
212212// constant giving its size in bits.
213213def bitsize;
214214
215+ // strictFPAlt allows a node to have different code generation under strict-fp.
216+ // TODO: The standard node can be IRBuilderBase or IRIntBase.
217+ class strictFPAlt<IRBuilderBase standard_, IRIntBase strictfp_> {
218+ IRBuilderBase standard = standard_;
219+ IRIntBase strictfp = strictfp_;
220+ }
221+
215222// If you put CustomCodegen<"foo"> in an intrinsic's codegen field, it
216223// indicates that the IR generation for that intrinsic is done by handwritten
217224// C++ and not autogenerated at all. The effect in the MVE builtin codegen
@@ -573,6 +580,14 @@ multiclass IntrinsicMXNameOverride<Type rettype, dag arguments, dag cg,
573580 }
574581}
575582
583+ // StrictFP nodes that choose between standard fadd and llvm.arm.mve.fadd nodes
584+ // depending on whether we are using strict-fp.
585+ def fadd: strictFPAlt<fadd_node,
586+ IRInt<"vadd", [Vector]>>;
587+ def fsub: strictFPAlt<fsub_node,
588+ IRInt<"vsub", [Vector]>>;
589+ def fmul: strictFPAlt<fmul_node,
590+ IRInt<"vmul", [Vector]>>;
576591
577592// -----------------------------------------------------------------------------
578593// Convenience lists of parameter types. 'T' is just a container record, so you
0 commit comments