Loop vectorizer optimization questions

2024-01-08 Thread 钟居哲
Hi, Richard.

I saw this following code:

  if (LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo))
{
  if (direct_internal_fn_supported_p (IFN_VCOND_MASK_LEN, vectype,
  OPTIMIZE_FOR_SPEED))
return false;
  else
vect_record_loop_mask (loop_vinfo, masks, ncopies, vectype, NULL);
}

for early break, current early break is not sufficient to support target with 
length partial vector so that we are not able to enable early break for RVV.

I wonder if I want to support this in middle-end, is it allowed in GCC-14 ? Or 
should I defer to GCC-15.

Also, another question is that I am working on min/max reduction with index, I 
believe it should be in GCC-15, but I wonder
whether I can pre-post for review in stage 4, or I should post patch (min/max 
reduction with index) when GCC-15 is open.

Thanks.


juzhe.zh...@rivai.ai


Get Help for Your Accurate Project Estimation Requirement

2024-01-08 Thread Cody Cox via Gcc
Hi,

If you are bidding any construction project and need estimation administration, 
we are able to assist you with all estimation work.

We are an estimation providing company. We give cost estimation and amounts of 
take-off administration. At this moment we are giving 40% discount on our 
services.

You'll be able to expect:

- All-inclusive Take-offs of all trades as you need
- Customizable stand out Spreadsheet with quantities and descriptions
- Working Drawings with Colored Markups
- Client bound format for estimates, doing what you specifically mean

All you need to do is send over the plans/drawings for our review; we will get 
back to you with a firm quote in which our charges and turnaround time will be 
mentioned. If you agreed on that quote then we will proceed with your 
estimation.

Feel free to contact me if you have any questions or just want to know more 
about our services.


Thanks.



Cody cox
Senior Estimator
P: 240.766.5006
1775 I St NW Washington, DC 20006, USA
Estimation LLC




To opt out please reply back


RE: Loop vectorizer optimization questions

2024-01-08 Thread Tamar Christina via Gcc
> 
> Also, another question is that I am working on min/max reduction with index, I
> believe it should be in GCC-15, but I wonder
> whether I can pre-post for review in stage 4, or I should post patch (min/max
> reduction with index) when GCC-15 is open.
> 

FWIW, We tried to implement this 5 years ago 
https://gcc.gnu.org/pipermail/gcc-patches/2019-November/534518.html
and you'll likely get the same feedback if you aren't already doing so.

I think Richard would prefer to have a general framework these kinds of 
operations.  We never got around to doing so
and it's still on my list but if you're taking care of it 😊

Just though I'd point out the previous feedback.

Cheers,
Tamar

> Thanks.
> 
> 
> juzhe.zh...@rivai.ai


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;
int max = mm;
for (int i = 0; i < n; ++i) {
  int x = a[i];
  if (max <= x) {
max = x;
idx = i;
  }
}

Will you continue to work on min/max with index ?
Or you want me to continue this work base on your patch ?

I have an initial patch which roughly implemented LLVM's approach but turns out 
Richi doesn't want me to apply LLVM's approach so your patch may be more 
reasonable than LLVM's approach.

Thanks.


juzhe.zh...@rivai.ai
 
From: Tamar Christina
Date: 2024-01-09 01:50
To: 钟居哲; gcc
CC: rdapp.gcc; richard.guenther
Subject: RE: Loop vectorizer optimization questions
> 
> Also, another question is that I am working on min/max reduction with index, I
> believe it should be in GCC-15, but I wonder
> whether I can pre-post for review in stage 4, or I should post patch (min/max
> reduction with index) when GCC-15 is open.
> 
 
FWIW, We tried to implement this 5 years ago 
https://gcc.gnu.org/pipermail/gcc-patches/2019-November/534518.html
and you'll likely get the same feedback if you aren't already doing so.
 
I think Richard would prefer to have a general framework these kinds of 
operations.  We never got around to doing so
and it's still on my list but if you're taking care of it 
 
Just though I'd point out the previous feedback.
 
Cheers,
Tamar
 
> Thanks.
> 
> 
> juzhe.zh...@rivai.ai