Hello Jakub, Uroš, Jakub
On 04 Oct 21:35, Jakub Jelinek wrote:
> Hi!
> 
> The following patch tweaks the TImode vector shifts similarly
> to the earlier vector shift patch, so that for shifts by immediate
> we can accept a memory input.  Additionally, it removes the vec_shl_*
> expander, because the middle-end has dropped that a few years ago,
> and merges the left and right shift patterns using code iterators.
> Appart from the code/names that can be handled by mode attributes,
> the only difference was that one of the insns had
> (set_attr "atom_unit" "sishuf")
> and the other didn't.  I hope that is just an error, I'd really expect
> both vpslldq and vpsrldq to use the same atom unit, isn't that the case?
This was introduced back in 2010. So, I have no info.
What I can see from config/atom.md:
;; if palignr or psrldq
(define_insn_reservation  "atom_sseishft_2" 1
  (and (eq_attr "cpu" "atom")
       (and (eq_attr "type" "sseishft")
            (and (eq_attr "atom_unit" "sishuf")
                 (match_operand 2 "immediate_operand"))))
  "atom-simple-0")

This leads back to initial commit of atom.md.
So, discrimination of psrldq and pslldq looks intentional.

On the over hand, I see in Software Optimization Guide, Table 14-2 that
PSRLDQ and PSLLDQ occupy same line which directs both insns to port-0 (p 14-18).
So, looking from that point, definition for PSLLDQ which allow either of port-0
and port-1 looks wrong (atom-simple-either reservation).

In absence of other information, I'd play on safe side and leave things as they
occur right now.

Maybe Uroš or HJ could shed a light?

--
Thanks, K

Reply via email to