[llvm-commits] [llvm] r146171 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/PowerPC/PPCISelLowering.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/Thumb2/thumb2-cbnz.ll

Owen Anderson resistor at mac.com
Thu Dec 8 12:13:10 PST 2011


On Dec 8, 2011, at 11:55 AM, Duncan Sands wrote:

> Hi Owen,
> 
>> Teach SelectionDAG to match more calls to libm functions onto existing SDNodes.  Mark these nodes as illegal by default, unless the target declares otherwise.
> 
> shouldn't this logic query TargetLibraryInfo before turning things into
> SDNodes?  By making such a node you are assuming that a certain function
> name like "floor" actually refers to the standard floor library function.
> This is not always correct which is why TargetLibraryInfo exists…

Probably. :-)

This whole section of SelectionDAGBuilder probably needs to be guarded against -fno-builtins.  It matches pow(), sin(), cos() etc. too, which also shouldn't become SDNodes with -fno-builtins.

--Owen



More information about the llvm-commits mailing list