This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to get MIN_EXPR without using deprecated min operator
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: "Michael Cieslinski" <micis at gmx dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: 06 May 2005 16:10:24 +0200
- Subject: Re: How to get MIN_EXPR without using deprecated min operator
- References: <22931.1115373391@www25.gmx.net>
"Michael Cieslinski" <micis@gmx.de> writes:
| Consider the following short program:
|
| #include <algorithm>
|
| void Tst1(short* __restrict__ SrcP, short* __restrict__ MinP, int Len)
| {
| for (int x=0; x<Len; x++)
| MinP[x] = SrcP[x] <? MinP[x];
| }
|
| void Tst2(short* __restrict__ SrcP, short* __restrict__ MinP, int Len)
| {
| for (int x=0; x<Len; x++)
| MinP[x] = std::min(SrcP[x], MinP[x]);
| }
|
|
| If I compile it with
| gcc41 -O2 -ftree-vectorize -ftree-vectorizer-verbose=5
| function Tst1 gets vectorized but Tst2 not.
Please consider filling a proper PR at
http://gcc.gnu.org/bugzilla/
for missed optimization.
-- Gaby