[LLVMdev] llvm-gcc cannot emit @llvm.pow.* ?

Duncan Sands baldrick at free.fr
Thu Nov 22 06:31:00 PST 2007


> Yes, they do hit llvm-convert.  I  created  function EmitBuiltinPOW() in
> llvm-convert.cpp and
> add case BUILT_IN_POW to EmitBuiltinCall . Testcase result shows it will
> call EmitBuiltinCall and finally emit llvm.pow.*

Don't forget that pow(x,y) will set errno if x is negative and y is not an
integral value.  Thus it is only correct to convert to llvm.pow.* if
!flag_errno_math, like for the sqrt case.



More information about the llvm-dev mailing list