Re: Mysterious decision in combine

2016-03-22 Thread Segher Boessenkool
On Mon, Mar 21, 2016 at 02:31:51PM +0100, Dominik Vogt wrote: > On Thu, Mar 17, 2016 at 01:22:04PM -0700, Richard Henderson wrote: > > On 03/16/2016 11:35 PM, Dominik Vogt wrote: > Now combine tries to combine > > (parallel [ > (set (reg:SI 64) > (and:SI (mem:SI (reg:DI 2 %r2

Re: Mysterious decision in combine

2016-03-22 Thread Richard Henderson
On 03/21/2016 06:31 AM, Dominik Vogt wrote: > Why does it drop the "parallel" and "clobber" in the combination; > is there a way to force combine to keep that? > > Trying 6 -> 7: > Failed to match this instruction: > (set (reg:DI 65) > (and:DI (subreg:DI (mem:SI (reg:DI 2 %r2 [ a ]) [1

Re: Mysterious decision in combine

2016-03-21 Thread Dominik Vogt
On Thu, Mar 17, 2016 at 01:22:04PM -0700, Richard Henderson wrote: > On 03/16/2016 11:35 PM, Dominik Vogt wrote: > > How does combine get this idea (it's the only match in the > > function)? > > > > Trying 7 -> 12: > > Successfully matched this instruction: > > (set (reg/i:DI 2 %r2) > >

Re: Mysterious decision in combine

2016-03-19 Thread Richard Henderson
On 03/16/2016 11:35 PM, Dominik Vogt wrote: > How does combine get this idea (it's the only match in the > function)? > > Trying 7 -> 12: > Successfully matched this instruction: > (set (reg/i:DI 2 %r2) > (and:DI (subreg:DI (reg:SI 64) 0) > (const_int 4294901775 [0x000f])

Mysterious decision in combine

2016-03-19 Thread Dominik Vogt
Well, at least what combine does here is a mystery to me (s390x with -O3 in case it matters). Rtl before combine: -- snip -- (insn 6 3 7 2 (parallel [ (set (reg:SI 64) (and:SI (mem:SI (reg/v/f:DI 63 [ a ]) [1 *a_2(D)+0 S4 A32]) (const_int -65521 [0x