[PATCH] Add __builtin_convertvector
Hal Finkel
hfinkel at anl.gov
Tue Sep 17 20:33:57 PDT 2013
----- Original Message -----
>
> On Tue, Sep 17, 2013 at 3:08 PM, Hal Finkel < hfinkel at anl.gov >
> wrote:
>
> ----- Original Message -----
> >
> > You're missing a testcase for template instantiation.
>
> I added this to the bottom of the test case, is that what you mean?
>
> +#ifdef __cplusplus
> +template<typename T>
> +T int_toT(vector8long x) {
> + return __builtin_convertvector(x, T);
> +}
> +
> +extern "C" {
> + vector8double int_toT_fp(vector8long x) {
> + // CHECK-LABEL: @int_toT_fp
> + // CHECK: sitofp <8 x i64> %{{[^ ]}} to <8 x double>
> + return int_toT<vector8double>(x);
> + }
> +}
> +#else
> +vector8double int_toT_fp(vector8long x) {
> + return __builtin_convertvector(x, vector8double);
> +}
> +#endif
>
>
>
>
> Oh, right, sorry, I didn't read the testcase carefully enough.
>
>
> This is a very high-quality patch; thanks. LGTM.
r190915, thanks!
-Hal
>
>
> -Eli
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the cfe-commits
mailing list