blob: 2d6dd75d0583babba5b1b1f76ae10faad4043843 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
/* { dg-options "-O2 -mcpu=power7" } */
/* { dg-final { scan-assembler "xxlxor" } } */
/* Test that we generate xxlor to clear a SFmode register. */
float sum (float *p, unsigned long n)
{
float sum = 0.0f; /* generate xxlxor instead of load */
while (n-- > 0)
sum += *p++;
return sum;
}
|