From: Uros Bizjak Date: Sat, 27 Aug 2011 07:46:35 +0000 (+0200) Subject: re PR target/50202 (ICE: in final_scan_insn, at final.c:2709 (could not split insn... X-Git-Tag: releases/gcc-4.7.0~4240 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b807694e275968b94ea4363e032c057ada5a5da9;p=thirdparty%2Fgcc.git re PR target/50202 (ICE: in final_scan_insn, at final.c:2709 (could not split insn) with __builtin_ia32_pcmpistri128) PR target/50202 * config/i386/sse.md (sse4_2_pcmpestr): Emit NOTE_INSN_DELETED note when all outputs are unused. (sse4_2_pcmpestr): Ditto. testsuite/ChangeLog: PR target/50202 * gcc.target/i386/pr50202.c: New test. From-SVN: r178130 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 14aaee747110..659bb0ec5ea4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-08-27 Uros Bizjak + + PR target/50202 + * config/i386/sse.md (sse4_2_pcmpestr): Emit NOTE_INSN_DELETED note + when all outputs are unused. + (sse4_2_pcmpestr): Ditto. + 2011-08-26 Uros Bizjak * config/i386/i386.md (round2): New expander. diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index e1c70eb21e03..0c7daf257ad2 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -9734,6 +9734,9 @@ operands[2], operands[3], operands[4], operands[5], operands[6])); + if (!(flags || ecx || xmm0)) + emit_note (NOTE_INSN_DELETED); + DONE; } [(set_attr "type" "sselog") @@ -9861,6 +9864,9 @@ emit_insn (gen_sse4_2_pcmpistr_cconly (NULL, NULL, operands[2], operands[3], operands[4])); + if (!(flags || ecx || xmm0)) + emit_note (NOTE_INSN_DELETED); + DONE; } [(set_attr "type" "sselog") diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8974d2eb5f20..34816571d37c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-08-27 Uros Bizjak + + PR target/50202 + * gcc.target/i386/pr50202.c: New test. + 2011-08-26 Uros Bizjak * gcc.target/i386/sse_4_1-round-vec.c: New test. diff --git a/gcc/testsuite/gcc.target/i386/pr50202.c b/gcc/testsuite/gcc.target/i386/pr50202.c new file mode 100644 index 000000000000..2023ec86d8d4 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr50202.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fno-tree-dse -fno-dce -msse4" } */ +/* { dg-require-effective-target sse4 } */ + +typedef char __v16qi __attribute__ ((__vector_size__ (16))); + +__v16qi v; +int i; + +void +foo (void) +{ + i = __builtin_ia32_pcmpistri128 (v, v, 255); + i = 255; +}