summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/altivec.md
diff options
context:
space:
mode:
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-06 17:01:27 +0000
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-06 17:01:27 +0000
commit19155a13b9927963528e4dd44c3911680633871b (patch)
treeda37bb730304b618f9e7594aa00a76fcc99fbba5 /gcc/config/rs6000/altivec.md
parent7f90213f7474371d41b1b5bcab5239dd9ddfecd7 (diff)
downloadgcc-19155a13b9927963528e4dd44c3911680633871b.tar.gz
PR target/27842
* config/rs6000/altivec.md (UNSPEC_VSLW): Remove. ("altivec_vspltisw_v4sf", "altivec_vslw_v4sf"): Remove. ("mulv4sf3", "absv4sf3", "negv4sf3"): Adapt users to use V4SImode temporaries and operations instead. PR target/27842 * gcc.dg/vmx/pr27842.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114438 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000/altivec.md')
-rw-r--r--gcc/config/rs6000/altivec.md45
1 files changed, 14 insertions, 31 deletions
diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md
index d4bf08e228c..e0326856f1a 100644
--- a/gcc/config/rs6000/altivec.md
+++ b/gcc/config/rs6000/altivec.md
@@ -65,7 +65,6 @@
(UNSPEC_VPKSWUS 103)
(UNSPEC_VRL 104)
(UNSPEC_VSL 107)
- (UNSPEC_VSLW 109)
(UNSPEC_VSLV4SI 110)
(UNSPEC_VSLO 111)
(UNSPEC_VSR 118)
@@ -546,13 +545,13 @@
rtx neg0;
/* Generate [-0.0, -0.0, -0.0, -0.0]. */
- neg0 = gen_reg_rtx (V4SFmode);
- emit_insn (gen_altivec_vspltisw_v4sf (neg0, constm1_rtx));
- emit_insn (gen_altivec_vslw_v4sf (neg0, neg0, neg0));
+ neg0 = gen_reg_rtx (V4SImode);
+ emit_insn (gen_altivec_vspltisw (neg0, constm1_rtx));
+ emit_insn (gen_altivec_vslw (neg0, neg0, neg0));
/* Use the multiply-add. */
emit_insn (gen_altivec_vmaddfp (operands[0], operands[1], operands[2],
- neg0));
+ gen_lowpart (V4SFmode, neg0)));
DONE;
}")
@@ -1168,15 +1167,6 @@
"vsl<VI_char> %0,%1,%2"
[(set_attr "type" "vecsimple")])
-(define_insn "altivec_vslw_v4sf"
- [(set (match_operand:V4SF 0 "register_operand" "=v")
- (unspec:V4SF [(match_operand:V4SF 1 "register_operand" "v")
- (match_operand:V4SF 2 "register_operand" "v")]
- UNSPEC_VSLW))]
- "TARGET_ALTIVEC"
- "vslw %0,%1,%2"
- [(set_attr "type" "vecsimple")])
-
(define_insn "altivec_vsl"
[(set (match_operand:V4SI 0 "register_operand" "=v")
(unspec:V4SI [(match_operand:V4SI 1 "register_operand" "v")
@@ -1317,14 +1307,6 @@
"vspltis<VI_char> %0,%1"
[(set_attr "type" "vecperm")])
-(define_insn "altivec_vspltisw_v4sf"
- [(set (match_operand:V4SF 0 "register_operand" "=v")
- (vec_duplicate:V4SF
- (float:SF (match_operand:QI 1 "s5bit_cint_operand" "i"))))]
- "TARGET_ALTIVEC"
- "vspltisw %0,%1"
- [(set_attr "type" "vecperm")])
-
(define_insn "ftruncv4sf2"
[(set (match_operand:V4SF 0 "register_operand" "=v")
(fix:V4SF (match_operand:V4SF 1 "register_operand" "v")))]
@@ -1992,16 +1974,16 @@
;; vandc %0,%1,SCRATCH2
(define_expand "absv4sf2"
[(set (match_dup 2)
- (vec_duplicate:V4SF (float:SF (const_int -1))))
+ (vec_duplicate:V4SI (const_int -1)))
(set (match_dup 3)
- (unspec:V4SF [(match_dup 2) (match_dup 2)] UNSPEC_VSLW))
+ (unspec:V4SI [(match_dup 2) (match_dup 2)] UNSPEC_VSL))
(set (match_operand:V4SF 0 "register_operand" "=v")
- (and:V4SF (not:V4SF (match_dup 3))
+ (and:V4SF (not:V4SF (subreg:V4SF (match_dup 3) 0))
(match_operand:V4SF 1 "register_operand" "v")))]
"TARGET_ALTIVEC"
{
- operands[2] = gen_reg_rtx (V4SFmode);
- operands[3] = gen_reg_rtx (V4SFmode);
+ operands[2] = gen_reg_rtx (V4SImode);
+ operands[3] = gen_reg_rtx (V4SImode);
})
;; Generate
@@ -2230,12 +2212,13 @@
rtx neg0;
/* Generate [-0.0, -0.0, -0.0, -0.0]. */
- neg0 = gen_reg_rtx (V4SFmode);
- emit_insn (gen_altivec_vspltisw_v4sf (neg0, constm1_rtx));
- emit_insn (gen_altivec_vslw_v4sf (neg0, neg0, neg0));
+ neg0 = gen_reg_rtx (V4SImode);
+ emit_insn (gen_altivec_vspltisw (neg0, constm1_rtx));
+ emit_insn (gen_altivec_vslw (neg0, neg0, neg0));
/* XOR */
- emit_insn (gen_xorv4sf3 (operands[0], neg0, operands[1]));
+ emit_insn (gen_xorv4sf3 (operands[0],
+ gen_lowpart (V4SFmode, neg0), operands[1]));
DONE;
}")