leonardchan added inline comments.

================
Comment at: llvm/include/llvm/IR/FixedPointBuilder.h:171-172
+    // lossless, except for overflow to infinity which is unlikely.
+    return B.CreateFMul(Result,
+        ConstantFP::get(DstTy, std::pow(2, -(int)SrcSema.getScale())));
+  }
----------------
Was there a reason for preferring multiplying by the reciprocal instead of 
dividing by a power of 2?

I think this was discussed before, but can't seem to remember/find the 
conversation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86632

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

Reply via email to