[PATCH] D24414: Conditionally eliminate library calls where the result value is not used

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 17:13:04 PDT 2016


mehdi_amini added inline comments.


================
Comment at: lib/Transforms/Utils/CondDeadCallElimination.cpp:129
+    if (!Arg->getType()->isFloatTy())
+      V = ConstantExpr::getFPExtend(V, Arg->getType());
+    return BBBuilder.CreateFCmp(Cmp, Arg, V);
----------------
xur wrote:
> mehdi_amini wrote:
> > xur wrote:
> > > mehdi_amini wrote:
> > > > What about FP16 here?
> > > Are there math lib calls using FP16 type?
> > > I only know the following types for the math lib calls: double, float and long double.
> > I don't know about what can we stuck into TLI? What would the Cuda target do for instance?
> the library calls I handled in this pass are white-listed. They should take either "float", "double", or "long double" as the argument. I don't think we will ever see a FP16 type here.  
> 
You're right!


https://reviews.llvm.org/D24414





More information about the llvm-commits mailing list