[RFC PR43721] Optimize a/b and a%b to single divmod call

2015-10-30 Thread Prathamesh Kulkarni
Hi, I have attached revamped version of Kugan's patch (https://gcc.gnu.org/ml/gcc/2013-06/msg00100.html) for PR43721. Test-case: http://pastebin.com/QMfpXLD9 divmod pass dump: http://pastebin.com/yMY1ikCp Assembly: http://pastebin.com/kk2HZpvA The approach I took is similar to sincos pass, which i

Re: _Fract types and conversion routines

2015-10-30 Thread Richard Biener
On Thu, Oct 29, 2015 at 6:49 PM, Steve Ellcey wrote: > > OK, I think I understand what is happening with the MIPS failure when > converting 'signed char' to '_Sat unsigned _Fract' after I removed > the TARGET_PROMOTE_PROTOTYPES macro. > > This bug is a combination of two factors, one is that calls

Re: [RFC PR43721] Optimize a/b and a%b to single divmod call

2015-10-30 Thread Richard Biener
On Fri, Oct 30, 2015 at 8:39 AM, Prathamesh Kulkarni wrote: > Hi, > I have attached revamped version of Kugan's patch > (https://gcc.gnu.org/ml/gcc/2013-06/msg00100.html) for PR43721. > Test-case: http://pastebin.com/QMfpXLD9 > divmod pass dump: http://pastebin.com/yMY1ikCp > Assembly: http://past

Re: Question about subregs on constants

2015-10-30 Thread Andreas Krebbel
On 10/27/2015 06:09 PM, Jakub Jelinek wrote: > On Tue, Oct 27, 2015 at 05:47:19PM +0100, Andreas Krebbel wrote: >> Hi, >> >> what does speak against folding SUBREGs on constants in fold_rtx? >> >> CSE does refuse to propagate constants into subreg expressions probably >> because fold_rtx does not

Re: _Fract types and conversion routines

2015-10-30 Thread Richard Henderson
On 10/30/2015 02:05 AM, Richard Biener wrote: > On Thu, Oct 29, 2015 at 6:49 PM, Steve Ellcey wrote: >> So should __satfractqiuhq be dealing with the fact that the argument 'a' >> may not have been sign extend in the correct way? > > No. GCC should ensure libcalls (yes, they are speical for some

Re: inline asm and multi-alternative constraints

2015-10-30 Thread David Wohlferd
On 10/29/2015 1:47 PM, Richard Henderson wrote: On 10/27/2015 02:05 PM, Jeff Law wrote: On 10/25/2015 09:41 PM, David Wohlferd wrote: Does gcc's inline asm support multi-alternative constraints? Or are they only supported for md? dw PS If it *is* supported, then the docs need some work. I t