Re: Complex numbers support: discussions summary

2023-10-17 Thread Toon Moene
Sylvain, Is this on a branch in your github repository https://github.com/kalray/gcc somewhere ? That would make it easier to test it for me (and probably others). See for instance my mail here (d.d. Thu Oct 5 14:45:05 GMT 2023): https://gcc.gnu.org/pipermail/gcc/2023-October/242643.

Re: Anyone interesting to submit a GCC devroom request proposal at FOSDEM? (was Re: After Cauldron - online mini BoFs and Fosdem)

2023-10-17 Thread Thomas Schwinge
Hi! Sorry for the late reply; I'm still working through email accumulated during (mostly offline) vacations after the GNU Tools Cauldron... ;-) On 2023-10-16T14:31:53-0400, David Malcolm wrote: > On Tue, 2023-10-03 at 14:37 +0200, Dodji Seketeli wrote: >> Mark Wielaard a écrit: >> > Also Dodji

Re: the elimination of if blocks in GCC during if-conversion and vectorization

2023-10-17 Thread Hanke Zhang via Gcc
Hi Richard I get it, thank you again. And I got another problem, so I'd like ask it by the way. Can the left shift of the induction variable in a loop be optimized as a constant? Like the code below: int ans = 0; int width = rand() % 16; for (int j = 0; j < width; j++) ans += 1 << (j + width)

RE: Vectorizer for types with different size

2023-10-17 Thread Li, Pan2 via Gcc
Hi Richard Biener, Just have a try for the suggestion, remove the size check of vectorizable_call is able to generate the .LRINT standard name from SF to DI, with below sample code. I will run a x86 bootstrap and regression test for this change. void test_lrintf (long *out, float *in, unsigned

Re: the elimination of if blocks in GCC during if-conversion and vectorization

2023-10-17 Thread Hanke Zhang via Gcc
Richard Biener 于2023年10月17日周二 17:26写道: > > On Thu, Oct 12, 2023 at 2:18 PM Hanke Zhang via Gcc wrote: > > > > Hi, I'm recently working on vectorization of GCC. I'm stuck in a small > > problem and would like to ask for advice. > > > > For example, for the following code: > > > > int main() { > >

Re: the elimination of if blocks in GCC during if-conversion and vectorization

2023-10-17 Thread Richard Biener via Gcc
On Tue, Oct 17, 2023 at 1:54 PM Hanke Zhang wrote: > > Richard Biener 于2023年10月17日周二 17:26写道: > > > > On Thu, Oct 12, 2023 at 2:18 PM Hanke Zhang via Gcc wrote: > > > > > > Hi, I'm recently working on vectorization of GCC. I'm stuck in a small > > > problem and would like to ask for advice. > >

Re: Check whether a function is a pure function

2023-10-17 Thread Richard Biener via Gcc
On Tue, Oct 17, 2023 at 11:21 AM Hanke Zhang via Gcc wrote: > > Hi, I'm trying to write a pass to erase some useless functions or to > put it another way, detect whether a function is pure or not. (Of > course I know some passes can do the clean after inline) > > Here is the problem I got, If a fu

Re: the elimination of if blocks in GCC during if-conversion and vectorization

2023-10-17 Thread Richard Biener via Gcc
On Thu, Oct 12, 2023 at 2:18 PM Hanke Zhang via Gcc wrote: > > Hi, I'm recently working on vectorization of GCC. I'm stuck in a small > problem and would like to ask for advice. > > For example, for the following code: > > int main() { > int size = 1000; > int *foo = malloc(sizeof(int) * size)

Check whether a function is a pure function

2023-10-17 Thread Hanke Zhang via Gcc
Hi, I'm trying to write a pass to erase some useless functions or to put it another way, detect whether a function is pure or not. (Of course I know some passes can do the clean after inline) Here is the problem I got, If a function satisfy the following points, can it be considered safe to delete

RE: Vectorizer for types with different size

2023-10-17 Thread Li, Pan2 via Gcc
Thanks Richard Biener, will have a try and keep you posted. Pan -Original Message- From: Richard Biener Sent: Tuesday, October 17, 2023 4:23 PM To: Li, Pan2 Cc: gcc@gcc.gnu.org; richard.sandif...@arm.com; juzhe.zh...@rivai.ai; kito.ch...@gmail.com Subject: Re: Vectorizer for types wit

Re: Vectorizer for types with different size

2023-10-17 Thread Richard Biener via Gcc
On Mon, Oct 16, 2023 at 4:05 PM Li, Pan2 wrote: > > Hi Richard Biener, > > Recently I am try to enable the RISC-V auto-vec for the lrint family, which > is trying to convert the HF/SF/DF to long type. > > Then I found the vectorizer can only act on the types with the same data > size. For exampl