This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/50596] Problems in vectorization of condition expression
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 07 Oct 2011 10:31:13 +0000
- Subject: [Bug tree-optimization/50596] Problems in vectorization of condition expression
- Auto-submitted: auto-generated
- References: <bug-50596-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50596
--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-07 10:31:13 UTC ---
float a[1024], b[1024], c[1024], d[1024];
int j[1024];
void
f1 (void)
{
int i;
for (i = 0; i < 1024; ++i)
{
unsigned int x = a[i] < b[i] ? -1 : 0;
unsigned int y = c[i] < d[i] ? -1 : 0;
j[i] = (x & y) >> 31;
}
}
vectorizes fine and generates quite good code IMHO. Something similar I'd like
to achieve with the vect_recog_bool_pattern I'm working on even for some of
your testcases.