Commit ea9d5cc8 by Mihailo Stojanovic Committed by Jeff Law

mips.c (DIRECT_BUILTIN_PURE): New macro.

        * config/mips/mips.c (DIRECT_BUILTIN_PURE): New macro. Add a
        pure qualifier to the built-in.
        (MSA_BUILTIN_PURE): New macro. Add a pure qualifier to the MSA
        built-ins.
        (struct mips_builtin_description): Add is_pure flag.
        (mips_init_builtins): Mark built-in as pure if the flag in the
        corresponding mips_builtin_description struct is set.

        * gcc.target/mips/mips-builtins-pure.c: New test.

From-SVN: r277534
parent 18e2ca55
2019-10-28 Mihailo Stojanovic <mistojanovic@wavecomp.com>
* config/mips/mips.c (DIRECT_BUILTIN_PURE): New macro. Add a
pure qualifier to the built-in.
(MSA_BUILTIN_PURE): New macro. Add a pure qualifier to the MSA
built-ins.
(struct mips_builtin_description): Add is_pure flag.
(mips_init_builtins): Mark built-in as pure if the flag in the
corresponding mips_builtin_description struct is set.
* config/mips/mips-msa.md (msa_insert_<msaftm_f>): Add an
alternative which covers the floating-point input value. Also
forbid the split of insert.d pattern for floating-point values.
2019-10-28 Mihailo Stojanovic <mistojanovic@wavecomp.com>
* gcc.target/mips/mips-builtins-pure.c: New test.
* gcc.target/mips/msa-insert-split.c: New test.
2019-10-28 Andrew Burgess <andrew.burgess@embecosm.com>
......
/* { dg-do compile } */
/* { dg-options "-mfp64 -mhard-float -mmsa" } */
/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
typedef double v2f64 __attribute__ ((vector_size (16)));
typedef long long v2i64 __attribute__ ((vector_size (16)));
typedef int v4i32 __attribute__ ((vector_size (16)));
long long foo(const v2f64* a)
{
v2f64 x;
v2i64 y;
x = (v2f64)__builtin_msa_shf_w((v4i32)*a, 0xff);
y = __builtin_msa_fcun_d(*a, x);
return y[0];
}
/* { dg-final { scan-assembler-times "ld" 1 } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment