This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: LNO optimizing out operations it shouldn't?
- From: Dorit Naishlos <DORIT at il dot ibm dot com>
- To: "Timothy J.Wood" <tjw at omnigroup dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 21 Jun 2004 13:38:31 +0300
- Subject: Re: LNO optimizing out operations it shouldn't?
I found the problem - expect a fix today.
dorit
Dorit
Naishlos/Haifa/IB To: "Timothy J.Wood" <tjw@omnigroup.com>
M@IBMIL cc: gcc@gcc.gnu.org
Sent by: Subject: Re: LNO optimizing out operations it shouldn't?
gcc-owner@gcc.gnu
.org
18/06/2004 19:08
it's the problem raised in -
http://gcc.gnu.org/ml/gcc/2004-06/msg00961.html.
possibly a problem with setting the may_aliases of the new vector
loads/stores in vect_create_data_ref.
will try to debug it next week
(help is welcome :-)
dorit
|---------+---------------------------->
| | "Timothy J.Wood" |
| | <tjw@omnigroup.co|
| | m> |
| | Sent by: |
| | gcc-owner@gcc.gnu|
| | .org |
| | |
| | |
| | 18/06/2004 06:25 |
|---------+---------------------------->
>---------------------------------------------------------------------------------------------------------------------------------|
|
|
| To: gcc@gcc.gnu.org
|
| cc:
|
| Subject: LNO optimizing out operations it shouldn't?
|
>---------------------------------------------------------------------------------------------------------------------------------|
I just built up LNO for the first time last night and was surprised
at its behavior with a simple example (based on one of the
tree-ssa-vect tests):
#define VECTOR_SIZE 512
typedef float afloat __attribute__ ((__aligned__(16)));
extern void check(const afloat * __restrict__ x, const afloat *
__restrict__ y, const afloat * __restrict__ out);
void mul(const afloat * __restrict__ x, const afloat * __restrict__ y,
afloat * __restrict__ out)
{
unsigned int i;
for (i = 0; i < VECTOR_SIZE; i++)
out[i] = x[i] * y[i];
//check(x,y,out);
}
build with:
$PREFIX/bin/gcc -O2 -ftree-vectorize -fdump-tree-vect-stats -maltivec
-S test.c -o test.s
I get the following on Darwin:
.text
.align 2
.align 2
.globl _mul
_mul:
li r0,128
mtctr r0
L2:
bdnz L2
blr
If I remove the comment on the call to 'check', real code to do the
'*' gets emitted. This seems like a pretty obvious case, and in fact I
see that tree-ssa-vect-1.c has this same sort of 'call to non-existant'
function (and of course many of the other test have checking to verify
the results...).
This this seems obvious, but I don't see anything in bugzilla.
-tim