[llvm-commits] [llvm] r108639 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Chris Lattner
clattner at apple.com
Sun Jul 18 13:12:57 PDT 2010
On Jul 18, 2010, at 1:02 PM, Owen Anderson wrote:
On Jul 18, 2010, at 12:52 PM, Chris Lattner wrote:
>>
>> I would prefer for this to happen in InstCombiner::visitFPTrunc. Both because we already have the infrastructure to do this there, but also because your code only handles the -fno-math-errno case. Normal calls to libm sqrt should be transformed, not just llvm.sqrt.
>
> Do we really want InstCombine assigning semantic value to random functions named sqrt()? I understand SimplifyLibCalls doing this, since it implicitly assumes that we're using libc, but I'm wary of making InstCombine assume it.
Yes we do. When/if we support -fno-builtin-sqrt, we will do this by adding a "not a builtin" function attribute, which optimizations like this should listen to.
-Chris
More information about the llvm-commits
mailing list