[PATCH] D72722: [FPEnv] [SystemZ] Platform-specific builtin constrained FP enablement

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 16 14:34:14 PST 2020


craig.topper added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13347
   case SystemZ::BI__builtin_s390_vfnmadb: {
     llvm::Type *ResultType = ConvertType(E->getType());
     Value *X = EmitScalarExpr(E->getArg(0));
----------------
What are the semantics of vfnmadb with respect to when it rounds vs the negation? If the rounding mode is for ceil/floor and the negate is applied after, that would be different that if it was before.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:13369
+      Value *NegZ = Builder.CreateFNeg(Z, "sub");
+      return Builder.CreateFNeg(Builder.CreateConstrainedFPCall(F, {X, Y, NegZ}));
+    } else {
----------------
Same question as above.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72722/new/

https://reviews.llvm.org/D72722





More information about the cfe-commits mailing list