public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/26128] New: Regression vs 4.1.0cvs20051015 - Trivial operation not vectorized
@ 2006-02-06 14:55 hurbain at cri dot ensmp dot fr
2006-02-06 15:00 ` [Bug tree-optimization/26128] Trivial operation not vectorized on char pinskia at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: hurbain at cri dot ensmp dot fr @ 2006-02-06 14:55 UTC (permalink / raw)
To: gcc-bugs
char a[16] __attribute__((aligned)) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16};
char b[16] __attribute__((aligned)) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16};
char c[16] __attribute__((aligned));
int i;
for(i = 0; i<16; i++)
{
c[i] = a[i] + b[i];
}
for(i = 0; i<16; i++)
{
printf("%i ", c[i]);
}
This code is not vectorized anymore in GCC 4.2.0 (svn checkout on Feb, 06
2006). The vectorizer tells that :
paddb4bugreport.c:14: note: vect_is_simple_use: operand (unsigned char)
D.1872_47
paddb4bugreport.c:14: note: not ssa-name.
paddb4bugreport.c:14: note: use not simple.
paddb4bugreport.c:14: note: not vectorized: relevant stmt not supported:
D.1873_48 = (unsigned char) D.1872_47
paddb4bugreport.c:14: note: bad operation or unsupported loop
bound.(get_loop_exit_condition
if (ivtmp.52_2 != 0) goto <L13>; else goto <L5>;)
Seems to be a problem before the autovectorizer as the (unsigned char) cast
should not happen IMHO.
--
Summary: Regression vs 4.1.0cvs20051015 - Trivial operation not
vectorized
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: regression
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hurbain at cri dot ensmp dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26128
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <bug-26128-4@http.gcc.gnu.org/bugzilla/>]
* [Bug tree-optimization/26128] Trivial operation not vectorized on char/short
[not found] <bug-26128-4@http.gcc.gnu.org/bugzilla/>
@ 2012-07-13 8:57 ` rguenth at gcc dot gnu.org
2012-07-13 14:06 ` rguenth at gcc dot gnu.org
1 sibling, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-13 8:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26128
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |53947
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-13 08:57:17 UTC ---
Link to vectorizer missed-optimization meta-bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/26128] Trivial operation not vectorized on char/short
[not found] <bug-26128-4@http.gcc.gnu.org/bugzilla/>
2012-07-13 8:57 ` rguenth at gcc dot gnu.org
@ 2012-07-13 14:06 ` rguenth at gcc dot gnu.org
1 sibling, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-13 14:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26128
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to work| |4.5.4, 4.8.0
Resolution| |FIXED
Target Milestone|--- |4.5.0
Known to fail| |4.4.6
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-13 14:05:50 UTC ---
Making the testcase actually compile like
char a[16] __attribute__((aligned(16))) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12,
13, 14, 15, 16};
char b[16] __attribute__((aligned(16))) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12,
13, 14, 15, 16};
char c[16] __attribute__((aligned(16)));
int main()
{
int i;
for(i = 0; i<16; i++)
{
c[i] = a[i] + b[i];
}
for(i = 0; i<16; i++)
{
printf("%i ", c[i]);
}
}
shows:
c> /space/rguenther/install/gcc-4.5.4/bin/gcc -O3 t.c
-ftree-vectorizer-verbose=1
t.c: In function 'main':
t.c:18:7: warning: incompatible implicit declaration of built-in function
'printf'
t.c:11: note: LOOP VECTORIZED.
t.c:7: note: vectorized 1 loops in function.
Thus fixed, in GCC 4.5.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-07-13 14:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-06 14:55 [Bug regression/26128] New: Regression vs 4.1.0cvs20051015 - Trivial operation not vectorized hurbain at cri dot ensmp dot fr
2006-02-06 15:00 ` [Bug tree-optimization/26128] Trivial operation not vectorized on char pinskia at gcc dot gnu dot org
2006-09-21 17:12 ` pinskia at gcc dot gnu dot org
2007-06-12 17:37 ` [Bug tree-optimization/26128] Trivial operation not vectorized on char/short pinskia at gcc dot gnu dot org
2009-02-06 1:45 ` pinskia at gcc dot gnu dot org
[not found] <bug-26128-4@http.gcc.gnu.org/bugzilla/>
2012-07-13 8:57 ` rguenth at gcc dot gnu.org
2012-07-13 14:06 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).