Re: The conditions when convert from double to float is permitted?

2020-12-10 Thread Xionghu Luo via Gcc
+cc. On 2020/12/11 14:25, Xionghu Luo via Gcc wrote: Thanks, On 2020/12/10 17:12, Richard Biener wrote: 2) From PR90070: double temp1 = (double)r->red; double temp2 = (double)aggregate.red; double temp3 = temp2 + (temp1 * 5.0); temp1 * 5 could be not representable in float but t

Re: The conditions when convert from double to float is permitted?

2020-12-10 Thread Richard Biener via Gcc
On Fri, Dec 11, 2020 at 7:26 AM Xionghu Luo wrote: > > Thanks, > > On 2020/12/10 17:12, Richard Biener wrote: > >> 2) From PR90070: > >> > >>double temp1 = (double)r->red; > >>double temp2 = (double)aggregate.red; > >>double temp3 = temp2 + (temp1 * 5.0); > > temp1 * 5 could be not rep

Re: Integer division on x86 -m32

2020-12-10 Thread Marc Glisse
On Thu, 10 Dec 2020, Lucas de Almeida via Gcc wrote: when performing (int64_t) foo / (int32_t) bar in gcc under x86, a call to __divdi3 is always output, even though it seems the use of the idiv instruction could be faster. IIRC, idiv requires that the quotient fit in 32 bits, while your C cod

Re: Integer division on x86 -m32

2020-12-10 Thread Alexander Monakov via Gcc
On Thu, 10 Dec 2020, Lucas de Almeida via Gcc wrote: > Hello, > when performing (int64_t) foo / (int32_t) bar in gcc under x86, a call to > __divdi3 is always output, even though it seems the use of the idiv > instruction could be faster. > This seems to remain even under -Ofast and other availa

Re: The conditions when convert from double to float is permitted?

2020-12-10 Thread Xionghu Luo via Gcc
Thanks, On 2020/12/10 17:12, Richard Biener wrote: >> 2) From PR90070: >> >>double temp1 = (double)r->red; >>double temp2 = (double)aggregate.red; >>double temp3 = temp2 + (temp1 * 5.0); > temp1 * 5 could be not representable in float but the > result of the add could so the transform

Looking for a Minecraft Server?

2020-12-10 Thread PUSCraft via Gcc
Minecraft Server List [http://pub.linuxman.co:3004/mosaico/img?src=http%3A%2F%2Fpub.linuxman.co%3A3004%2Ffiles%2Ftemplate%2Ffile%2F1%2F99a51e72c1e6f787e2748c2e943571d6&method=resizeĀ¶ms=258,null] [http://pub.linuxman.co:3004/links/jCNSyLKswp/UMVFQKTHWY/MGgeKgXsYc/RZoOyKlpNm] Looking for a Minecraf

Integer division on x86 -m32

2020-12-10 Thread Lucas de Almeida via Gcc
Hello, when performing (int64_t) foo / (int32_t) bar in gcc under x86, a call to __divdi3 is always output, even though it seems the use of the idiv instruction could be faster. This seems to remain even under -Ofast and other available options. To illustrate, this godbolt link: https://godbolt.or

gcc-8-20201210 is now available

2020-12-10 Thread GCC Administrator via Gcc
Snapshot gcc-8-20201210 is now available on https://gcc.gnu.org/pub/gcc/snapshots/8-20201210/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 8 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

RFC v2: Re: cacheflush.2

2020-12-10 Thread Alejandro Colomar (man-pages) via Gcc
Hi all, v2: [ NOTES Unless you need the finer grained control that this system call provides, you probably want to use the GCC built-in function __builtin___clear_cache(), which provides a more portable interface: void __builtin___clear_cache(vo

Re: No warning for module global variable which is set but never used

2020-12-10 Thread webmaster
Ahhh, ok. Good too know. I think also it is not of high priority ;-) Greets Patrick Am 10.12.2020 um 16:26 schrieb David Brown: > On 10/12/2020 16:10, webmaster wrote: > > (As a general rule, you'll get more useful responses if you use your > name in your posts. It's common courtesy.) > > >

Re: No warning for module global variable which is set but never used

2020-12-10 Thread David Brown
On 10/12/2020 16:10, webmaster wrote: (As a general rule, you'll get more useful responses if you use your name in your posts. It's common courtesy.) > Is it possible to request such feature? > Of course you can file a request for it. Go to the gcc bugzilla site:

Re: No warning for module global variable which is set but never used

2020-12-10 Thread webmaster
Is it possible to request such feature? Am 09.12.2020 um 16:45 schrieb webmaster: > I have the following Code C\C++: > > static int foo = 0; > > static void bar(void) > { > foo = 1; > } > > Here it is clear for the compiler that the variable foo can only be > accessed from the same modul an

Re: Help with PR97872

2020-12-10 Thread Prathamesh Kulkarni via Gcc
On Thu, 10 Dec 2020 at 17:11, Richard Biener wrote: > > On Wed, 9 Dec 2020, Prathamesh Kulkarni wrote: > > > On Tue, 8 Dec 2020 at 14:36, Prathamesh Kulkarni > > wrote: > > > > > > On Mon, 7 Dec 2020 at 17:37, Hongtao Liu wrote: > > > > > > > > On Mon, Dec 7, 2020 at 7:11 PM Prathamesh Kulkarni

Re: Help with PR97872

2020-12-10 Thread Richard Biener
On Wed, 9 Dec 2020, Prathamesh Kulkarni wrote: > On Tue, 8 Dec 2020 at 14:36, Prathamesh Kulkarni > wrote: > > > > On Mon, 7 Dec 2020 at 17:37, Hongtao Liu wrote: > > > > > > On Mon, Dec 7, 2020 at 7:11 PM Prathamesh Kulkarni > > > wrote: > > > > > > > > On Mon, 7 Dec 2020 at 16:15, Hongtao Liu

Re: Move STV(scalars_to_vector) RTL pass from i386 to target independent

2020-12-10 Thread Richard Biener
On Thu, 10 Dec 2020, Dinar Temirbulatov wrote: > Hi, > I have observed that STV2 pass added ~20% on CPU2006 456.hmmer with mostly > by transforming V4SI operations. Looking at the pass itself, it looks like > it might be transformed into RTL architecture-independent, and the pass > deals only not

Re: The conditions when convert from double to float is permitted?

2020-12-10 Thread Marc Glisse
On Thu, 10 Dec 2020, Xionghu Luo via Gcc wrote: I have a maybe silly question about whether there is any *standard* or *options* (like -ffast-math) for GCC that allow double to float demotion optimization? For example, 1) from PR22326: #include float foo(float f, float x, float y) { return

Re: The conditions when convert from double to float is permitted?

2020-12-10 Thread Richard Biener via Gcc
On Thu, Dec 10, 2020 at 9:47 AM Xionghu Luo via Gcc wrote: > > Hi, > > I have a maybe silly question about whether there is any *standard* > or *options* (like -ffast-math) for GCC that allow double to float > demotion optimization? For example, The only option we have to this effect would be -f

The conditions when convert from double to float is permitted?

2020-12-10 Thread Xionghu Luo via Gcc
Hi, I have a maybe silly question about whether there is any *standard* or *options* (like -ffast-math) for GCC that allow double to float demotion optimization? For example, 1) from PR22326: #include float foo(float f, float x, float y) { return (fabs(f)*x+y); } The fabs will return double