rjmccall added inline comments.

================
Comment at: include/llvm/IR/IRBuilder.h:259
+    return DefaultConstrainedRounding.getValue();
+  }
+
----------------
Okay, so what are the invariants here now?  It looks like, in order to enable 
constrained floating point, I need to also have set the default exception 
behavior and rounding mode.  That should at least be documented, but maybe a 
better approach would be to require these to be passed in when enabling 
constrained FP.


================
Comment at: include/llvm/IR/IRBuilder.h:1324
+      return CreateConstrainedFPBinOp(Intrinsic::experimental_constrained_fadd,
+                                      L, R, nullptr, Name);
+
----------------
`FPMD` is dropped in this case; I don't know if that's intentional.


================
Comment at: include/llvm/IR/IRBuilder.h:1459
+      Optional<ConstrainedFPIntrinsic::RoundingMode> Rounding = None,
+      Optional<ConstrainedFPIntrinsic::ExceptionBehavior> Except = None) {
+    Value *RoundingV = getConstrainedFPRounding(Rounding);
----------------
It looks like nothing in `IRBuilder` ever passes these arguments.  Are you just 
anticipating that someone might want to call this directly?


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

https://reviews.llvm.org/D53157



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to