hfinkel added inline comments.

================
Comment at: lib/CodeGen/CGExprComplex.cpp:773
     // supported imaginary types in addition to complex types.
-    if (RHSi) {
+    if (RHSi && !FMF.isFast()) {
       BinOpInfo LibCallOp = Op;
----------------
fhahn wrote:
> Would the following structure be slightly easier to read?
> 
> if (RHSi) {
>   if (FMF.isFast()) { simplify } else {libcall}
> }
I'd use CGF.getLangOpts().FastMath (instead of interrogating the implicit state 
stored in the IR builder).


================
Comment at: test/CodeGen/complex-math.c:134
+  // FASTMATH-NOT: @__divsc3
+  // FASTMATH: fdiv
+  // FASTMATH: fdiv
----------------
Please check the actual expansion here and below.


https://reviews.llvm.org/D40299



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

Reply via email to