Re: Simplification of combine patterns with subreg and zero_extract

2006-04-14 Thread Rask Ingemann Lambertsen
On Thu, Apr 13, 2006 at 01:29:13PM +0200, Paolo Bonzini wrote: > > What combine is doing is to expand compound operations such as > zero_extract, simplifying them, and try to make new compound operations. > Therefore you should first try to understand what's causing combine to > miss the simpl

Re: Simplification of combine patterns with subreg and zero_extract

2006-04-14 Thread Paolo Bonzini
I think it is simply because combine.c doesn't have any code to simplify this kind of expression. In theory it should have... However, if you add these simplifications to simplify-rtx.c, it will be picked up by combine. There is a lot of simplification code in combine.c too. Should I

Re: Simplification of combine patterns with subreg and zero_extract

2006-04-14 Thread Rask Ingemann Lambertsen
On Thu, 13 Apr 2006 13:29:13 +0200, Paolo Bonzini wrote > > Also, is there a function for simplifying a zero_extract? > > What combine is doing is to expand compound operations such as > zero_extract, simplifying them, and try to make new compound > operations. Therefore you should first try t

Re: Simplification of combine patterns with subreg and zero_extract

2006-04-13 Thread Paolo Bonzini
Also, is there a function for simplifying a zero_extract? What combine is doing is to expand compound operations such as zero_extract, simplifying them, and try to make new compound operations. Therefore you should first try to understand what's causing combine to miss the simplification.

Simplification of combine patterns with subreg and zero_extract

2006-04-13 Thread Rask Ingemann Lambertsen
Combine is trying to find this instruction (when compiling _popcountsi2 from libgcc2.c for my i8086 experiment): (set (subreg:QI (reg:HI 30) 0) (mem/s/u:QI (plus:HI (subreg:HI (zero_extract:SI (subreg:HI (reg/v:SI 22 [ x ]) 0) (const_int 8 [0x8]) (const