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)
> >       (and:DI (subreg:DI (reg:SI 64) 0)
> >           (const_int 4294901775 [0xffff000f])))
> >   allowing combination of insns 7 and 12
> 
> >From the recorded nonzero_bits.

Understood so far.  Now combine tries to combine

  (parallel [
        (set (reg:SI 64)
            (and:SI (mem:SI (reg:DI 2 %r2 [ a ]) [1 *a_2(D)+0 S4 A32])
                (const_int -65521 [0xffffffffffff000f])))
        (clobber (reg:CC 33 %cc))
    ])

and

  (set (reg:DI 65)
        (zero_extend:DI (reg:SI 64)))

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 *a_2(D)+0 S4 A32]) 0)
          (const_int 4294901775 [0xffff000f])))

(Because all "and" instructions on s390 clobber the CC, this
pattern does not match anything without the clobber.)

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt
IBM Germany

Reply via email to