summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-20 11:21:19 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-20 11:21:19 +0000
commit19fbdfaf94a14803457e31c6ef3c4bb0d6f131a8 (patch)
treec60b901039bd33fa1ae88c7bec5ea5466cb3f2e0 /gcc/config
parent3211fa0aac7a557f2fa98b17e52b25896b30b523 (diff)
downloadgcc-19fbdfaf94a14803457e31c6ef3c4bb0d6f131a8.tar.gz
Correct reduc_splus_v8sf and reduc_splus_v4df.
gcc/ 2010-10-20 H.J. Lu <hongjiu.lu@intel.com> PR target/46085 * config/i386/sse.md (reduc_splus_v8sf): Updated. (reduc_splus_v4df): Likewise. gcc/testsuite/ 2010-10-20 H.J. Lu <hongjiu.lu@intel.com> PR target/46085 * gcc.target/i386/pr46085-1.c: New. * gcc.target/i386/pr46085-2.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165719 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/sse.md9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 2402c705893..bff74d57de3 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -1388,8 +1388,9 @@
rtx tmp = gen_reg_rtx (V8SFmode);
rtx tmp2 = gen_reg_rtx (V8SFmode);
emit_insn (gen_avx_haddv8sf3 (tmp, operands[1], operands[1]));
- emit_insn (gen_avx_haddv8sf3 (tmp2, operands[1], operands[1]));
- emit_insn (gen_avx_haddv8sf3 (operands[0], tmp2, tmp2));
+ emit_insn (gen_avx_haddv8sf3 (tmp2, tmp, tmp));
+ emit_insn (gen_avx_vperm2f128v8sf3 (tmp, tmp2, tmp2, GEN_INT (1)));
+ emit_insn (gen_addv8sf3 (operands[0], tmp, tmp2));
DONE;
})
@@ -1415,8 +1416,10 @@
"TARGET_AVX"
{
rtx tmp = gen_reg_rtx (V4DFmode);
+ rtx tmp2 = gen_reg_rtx (V4DFmode);
emit_insn (gen_avx_haddv4df3 (tmp, operands[1], operands[1]));
- emit_insn (gen_avx_haddv4df3 (operands[0], tmp, tmp));
+ emit_insn (gen_avx_vperm2f128v4df3 (tmp2, tmp, tmp, GEN_INT (1)));
+ emit_insn (gen_addv4df3 (operands[0], tmp, tmp2));
DONE;
})