Commit 90a15807 by Segher Boessenkool Committed by Segher Boessenkool

rs6000: Implement [u]avg<mode>3_ceil

We already had those in fact, just under other names.  Use the standard
names so that the vectorizer can use it.


	* config/rs6000/altivec.md (altivec_vavgu<VI_char>): Rename to...
	(uavg<mode>3_ceil): ... This.
	(altivec_vavgs<VI_char>): Rename to...
	(avg<mode>3_ceil): ... This.
	* config/rs6000/rs6000-builtin.def (VAVGUB, VAVGSB, VAVGUH, VAVGSH,
	VAVGUW, VAVGSW): Adjust.

From-SVN: r277421
parent 1c95aee0
2019-10-24 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/altivec.md (altivec_vavgu<VI_char>): Rename to...
(uavg<mode>3_ceil): ... This.
(altivec_vavgs<VI_char>): Rename to...
(avg<mode>3_ceil): ... This.
* config/rs6000/rs6000-builtin.def (VAVGUB, VAVGSB, VAVGUH, VAVGSH,
VAVGUW, VAVGSW): Adjust.
2019-10-24 Nathan Sidwell <nathan@acm.org> 2019-10-24 Nathan Sidwell <nathan@acm.org>
* dumpfile.c (dump_begin): Reorder decls to use RAII. * dumpfile.c (dump_begin): Reorder decls to use RAII.
...@@ -560,7 +560,7 @@ ...@@ -560,7 +560,7 @@
[(set_attr "type" "vecsimple")]) [(set_attr "type" "vecsimple")])
;; ;;
(define_insn "altivec_vavgu<VI_char>" (define_insn "uavg<mode>3_ceil"
[(set (match_operand:VI 0 "register_operand" "=v") [(set (match_operand:VI 0 "register_operand" "=v")
(unspec:VI [(match_operand:VI 1 "register_operand" "v") (unspec:VI [(match_operand:VI 1 "register_operand" "v")
(match_operand:VI 2 "register_operand" "v")] (match_operand:VI 2 "register_operand" "v")]
...@@ -569,7 +569,7 @@ ...@@ -569,7 +569,7 @@
"vavgu<VI_char> %0,%1,%2" "vavgu<VI_char> %0,%1,%2"
[(set_attr "type" "vecsimple")]) [(set_attr "type" "vecsimple")])
(define_insn "altivec_vavgs<VI_char>" (define_insn "avg<mode>3_ceil"
[(set (match_operand:VI 0 "register_operand" "=v") [(set (match_operand:VI 0 "register_operand" "=v")
(unspec:VI [(match_operand:VI 1 "register_operand" "v") (unspec:VI [(match_operand:VI 1 "register_operand" "v")
(match_operand:VI 2 "register_operand" "v")] (match_operand:VI 2 "register_operand" "v")]
......
...@@ -1002,12 +1002,12 @@ BU_ALTIVEC_2 (VADDUWS, "vadduws", CONST, altivec_vadduws) ...@@ -1002,12 +1002,12 @@ BU_ALTIVEC_2 (VADDUWS, "vadduws", CONST, altivec_vadduws)
BU_ALTIVEC_2 (VADDSWS, "vaddsws", CONST, altivec_vaddsws) BU_ALTIVEC_2 (VADDSWS, "vaddsws", CONST, altivec_vaddsws)
BU_ALTIVEC_2 (VAND, "vand", CONST, andv4si3) BU_ALTIVEC_2 (VAND, "vand", CONST, andv4si3)
BU_ALTIVEC_2 (VANDC, "vandc", CONST, andcv4si3) BU_ALTIVEC_2 (VANDC, "vandc", CONST, andcv4si3)
BU_ALTIVEC_2 (VAVGUB, "vavgub", CONST, altivec_vavgub) BU_ALTIVEC_2 (VAVGUB, "vavgub", CONST, uavgv16qi3_ceil)
BU_ALTIVEC_2 (VAVGSB, "vavgsb", CONST, altivec_vavgsb) BU_ALTIVEC_2 (VAVGSB, "vavgsb", CONST, avgv16qi3_ceil)
BU_ALTIVEC_2 (VAVGUH, "vavguh", CONST, altivec_vavguh) BU_ALTIVEC_2 (VAVGUH, "vavguh", CONST, uavgv8hi3_ceil)
BU_ALTIVEC_2 (VAVGSH, "vavgsh", CONST, altivec_vavgsh) BU_ALTIVEC_2 (VAVGSH, "vavgsh", CONST, avgv8hi3_ceil)
BU_ALTIVEC_2 (VAVGUW, "vavguw", CONST, altivec_vavguw) BU_ALTIVEC_2 (VAVGUW, "vavguw", CONST, uavgv4si3_ceil)
BU_ALTIVEC_2 (VAVGSW, "vavgsw", CONST, altivec_vavgsw) BU_ALTIVEC_2 (VAVGSW, "vavgsw", CONST, avgv4si3_ceil)
BU_ALTIVEC_2 (VCFUX, "vcfux", CONST, altivec_vcfux) BU_ALTIVEC_2 (VCFUX, "vcfux", CONST, altivec_vcfux)
BU_ALTIVEC_2 (VCFSX, "vcfsx", CONST, altivec_vcfsx) BU_ALTIVEC_2 (VCFSX, "vcfsx", CONST, altivec_vcfsx)
BU_ALTIVEC_2 (VCMPBFP, "vcmpbfp", CONST, altivec_vcmpbfp) BU_ALTIVEC_2 (VCMPBFP, "vcmpbfp", CONST, altivec_vcmpbfp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment