This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/31460] if(a) a[i] = xxx; else a[i] = yyy; is not converted to if (a) ddd= xxx; else ddd = yyy; a[i] = ddd;
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Apr 2007 16:49:38 -0000
- Subject: [Bug tree-optimization/31460] if(a) a[i] = xxx; else a[i] = yyy; is not converted to if (a) ddd= xxx; else ddd = yyy; a[i] = ddd;
- References: <bug-31460-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from pinskia at gcc dot gnu dot org 2007-04-03 17:49 -------
This is not the vectorizer's fault.
>tree level if-conversion for the vectorizer _should_ be able to recognize this
> case. It may be that it's just not set up to deal with x86* insns of this kind.
It cannot because there is a store there and no other pass sinks the store.
So basically
if(a) a[i] = xxx; else a[i] = yyy;
is not converted to
if (a) ddd= xxx; else ddd = yyy; a[i] = ddd;
Which means this is really a dup of another bug.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Summary|vectorizer failed to work on|if(a) a[i] = xxx; else a[i]
|simple loop |= yyy; is not converted to
| |if (a) ddd= xxx; else ddd =
| |yyy; a[i] = ddd;
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31460