Re: [PATCH 2/4] LoongArch: Add ftint{,rm,rp}.{w,l}.{s,d} instructions

2022-11-09 Thread Xi Ruoyao via Gcc-patches
On Wed, 2022-11-09 at 15:46 +0800, Lulu Cheng wrote: > There is a paragraph in the explanation information for the compile > parameter '-fno-fp-int-builtin-inexact' in the gcc.pdf document: > > "Do not allow the built-in functions ceil, floor, round and > trunc, > and their float and long d

Re: [PATCH 2/4] LoongArch: Add ftint{, rm, rp}.{w, l}.{s, d} instructions

2022-11-08 Thread Lulu Cheng
There is a paragraph in the explanation information for the compile parameter '-fno-fp-int-builtin-inexact' in the gcc.pdf document:     "Do not allow the built-in functions ceil, floor, round and trunc, and their float and long double variants,     to generate code that raises the “inexact” 

[PATCH 2/4] LoongArch: Add ftint{,rm,rp}.{w,l}.{s,d} instructions

2022-11-08 Thread Xi Ruoyao via Gcc-patches
This allows to optimize the following builtins if -fno-math-errno: - __builtin_lrint{,f} - __builtin_lfloor{,f} - __builtin_lceil{,f} Inspired by https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605287.html. ANYFI is added so the compiler won't try ftint.l.s if -mfpu=32. If we simply use