https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127055

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Matthias Kretz (Vir) from comment #3)
> Right, for round I understand. But why is using the packed vround/vrndscale
> instruction (rather than the scalar one) gated on -fno-trapping-math? There
> is no observable difference between e.g.
> 
> "test_v2df_ceil(double __vector(2))":
>         vrndscalesd     xmm1, xmm0, xmm0, 10
>         vunpckhpd       xmm0, xmm0, xmm0
>         vrndscalesd     xmm0, xmm0, xmm0, 10
>         vunpcklpd       xmm0, xmm1, xmm0
>         ret
> 
> and
> 
> "test_v2df_ceil(double __vector(2))":
>         vrndscalepd     xmm0, xmm0, 10
>         ret

t.C:15:188: note:   ==> examining statement: _5 = __builtin_ceil (_4);
t.C:15:188: missed:   function is not vectorizable.
t.C:15:177: missed:   not vectorized: relevant stmt not supported: _5 =
__builtin_ceil (_4);

it's vectorized with -fno-trapping-math to

  vect__5.116_9 = .CEIL (x_2(D));

and

        vrndscalepd     $10, %xmm0, %xmm0
        ret

Reply via email to