From b807694e275968b94ea4363e032c057ada5a5da9 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Sat, 27 Aug 2011 09:46:35 +0200 Subject: [PATCH] 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 --- gcc/ChangeLog | 7 +++++++ gcc/config/i386/sse.md | 6 ++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr50202.c | 15 +++++++++++++++ 4 files changed, 33 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/pr50202.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 14aaee74711..659bb0ec5ea 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 e1c70eb21e0..0c7daf257ad 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 8974d2eb5f2..34816571d37 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 00000000000..2023ec86d8d --- /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; +} -- 2.30.2