Re: Re: Loop vectorizer optimization questions

2024-01-09 Thread juzhe.zh...@rivai.ai
01-09 16:59 To: 钟居哲 CC: richard.guenther; rdapp.gcc; gcc Subject: Re: RE: Loop vectorizer optimization questions Hi, The 01/08/2024 22:46, 钟居哲 wrote: > Oh. It's nice to see you have support min/max index reduction. > > I knew your patch can handle this following: > > >

Re: RE: Loop vectorizer optimization questions

2024-01-09 Thread Tamar Christina via Gcc
Hi, The 01/08/2024 22:46, 钟居哲 wrote: > Oh. It's nice to see you have support min/max index reduction. > > I knew your patch can handle this following: > > > int idx = ii; > int max = mm; > for (int i = 0; i < n; ++i) { > int x = a[i]; > if (max < x) { > max = x; > idx = i; > } > }

Re: RE: Loop vectorizer optimization questions

2024-01-08 Thread 钟居哲
Oh. It's nice to see you have support min/max index reduction. I knew your patch can handle this following: int idx = ii; int max = mm; for (int i = 0; i < n; ++i) { int x = a[i]; if (max < x) { max = x; idx = i; } } But I wonder whether your patch can handle this: int idx = ii; in