On Jul 8, 2014, at 4:17 AM, Jakub Jelinek <ja...@redhat.com> wrote: > On Tue, Jul 08, 2014 at 03:14:04PM +0400, Kirill Yukhin wrote: >>>> On the over hand, updated in such a way intrinsic >>>> may actually generate different instruction then intended (e.g. FMA case). >>> >>> It is the same with scalars, we have -ffp-contract for that. >> Agreed. > > I don't think we actually always guarantee using the particular instructions > for the intrinsics even when they are implemented using builtins, at least > if they don't use UNSPECs, e.g. if combiner or peephole2 manage to combine > something into some other insn, we'll happily do that.
In a testcase, one is free to hide the inputs and the output from the optimizer using standard tricks and take one step closer to having a 1-1 mapping. Of course, wether or not the port even offers a 1-1 mapping for any particular builtin is completely dependent upon the port.