On Thu, Dec 8, 2011 at 1:47 PM, Feng LI <nemoking...@gmail.com> wrote: > Hi, > > I'm extending the i386 instructions by using the builtins in the backend. > And generate the builtin functions in the middle end. And would like > the generated builtin functions will be transformed to ASM code. > > I tested the backend with a hand writing builtin functions, it *works* > well, but *not with* the middle end automatically generated functions.
have you looked into ix86_builtin_reciprocal and where it gets used in tree-ssa-math-opts.c ? I think you need a target hook which returns the decl and that decl is the same decl you created in the target. Thanks, Andrew Pinski