On Fri, Nov 9, 2012 at 4:39 AM, Gopalasubramanian, Ganesh <ganesh.gopalasubraman...@amd.com> wrote:
> Changes done with respect to the review comments. > Conditionally setting "sseshuf" type attribute has been removed. > Instead new attribute is added and is included for other attribute > calculations. > > The patch is attached as (difflog.txt). > The new file (bdver3.md) describing the pipelines is also attached. > > Bootstrapping and "make -k check" passes. > > OK for upstream? > > 2012-11-09 Ganesh Gopalasubramanian <ganesh.gopalasubraman...@amd.com> > > bdver3 Enablement > * gcc/doc/extend.texi: Add details about bdver3. > * gcc/doc/invoke.texi: Add details about bdver3. > * config.gcc (i[34567]86-*-linux* | ...): Add bdver3. > (case ${target}): Add bdver3. > * config/i386/i386.h (TARGET_BDVER3): New definition. > * config/i386/i386.md (define_attr "cpu"): Add bdver3. > * config/i386/sse.md (sseshuf): New type attribute. > * config/i386/athlon.md (sseshuf):Likewise. > * config/i386/atom.md (sseshuf):Likewise. > * config/i386/ppro.md (sseshuf):Likewise. Index: gcc/config/i386/atom.md =================================================================== --- gcc/config/i386/atom.md (revision 193132) +++ gcc/config/i386/atom.md (working copy) @@ -455,6 +455,30 @@ (eq_attr "memory" "!none"))) "atom-simple-0") +(define_insn_reservation "atom_sseshuf" 1 + (and (eq_attr "cpu" "atom") + (and (eq_attr "type" "sseshuf") + (eq_attr "memory" "none"))) + "atom-simple-either") + +(define_insn_reservation "atom_sseshuf_mem" 1 + (and (eq_attr "cpu" "atom") + (and (eq_attr "type" "sseshuf") + (eq_attr "memory" "!none"))) + "atom-simple-either") + +(define_insn_reservation "atom_sseshuf1" 1 + (and (eq_attr "cpu" "atom") + (and (eq_attr "type" "sseshuf1") + (eq_attr "memory" "none"))) + "atom-simple-0") + +(define_insn_reservation "atom_sseshuf1_mem" 1 + (and (eq_attr "cpu" "atom") + (and (eq_attr "type" "sseshuf1") + (eq_attr "memory" "!none"))) + "atom-simple-0") + ;; not pmad, not psad (define_insn_reservation "atom_sseiadd" 1 (and (eq_attr "cpu" "atom") This was not what I had in mind for changes in existing .md files. Just change them in this way: Index: atom.md =================================================================== --- atom.md (revision 193407) +++ atom.md (working copy) @@ -594,7 +594,7 @@ ;; no memory simple (define_insn_reservation "atom_sseadd" 5 (and (eq_attr "cpu" "atom") - (and (eq_attr "type" "sseadd,sseadd1") + (and (eq_attr "type" "sseadd,sseshuf,sseadd1,sseshuf1") (and (eq_attr "memory" "none") (and (eq_attr "mode" "!V2DF") (eq_attr "atom_unit" "!complex"))))) @@ -603,7 +603,7 @@ ;; memory simple (define_insn_reservation "atom_sseadd_mem" 5 (and (eq_attr "cpu" "atom") - (and (eq_attr "type" "sseadd,sseadd1") + (and (eq_attr "type" "sseadd,sseshuf,sseadd1,sseshuf1") (and (eq_attr "memory" "!none") (and (eq_attr "mode" "!V2DF") (eq_attr "atom_unit" "!complex"))))) @@ -612,7 +612,7 @@ ;; maxps, minps, *pd, hadd, hsub (define_insn_reservation "atom_sseadd_3" 8 (and (eq_attr "cpu" "atom") - (and (eq_attr "type" "sseadd,sseadd1") + (and (eq_attr "type" "sseadd,sseshuf,sseadd1,sseshuf1") (ior (eq_attr "mode" "V2DF") (eq_attr "atom_unit" "complex")))) "atom-complex, atom-all-eu*7") You can see from the changes of sse.md that this is functionally a no-op change. Uros.