From: Ilya Enkovich Date: Wed, 30 Sep 2015 13:08:01 +0000 (+0000) Subject: i386.c (scalar_chain::analyze_register_chain): Ignore debug insns. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=21b820644d11c7a320421c532ed96cf3454ee16e;p=gcc.git i386.c (scalar_chain::analyze_register_chain): Ignore debug insns. gcc/ * config/i386/i386.c (scalar_chain::analyze_register_chain): Ignore debug insns. (scalar_chain::convert_reg): Likewise. gcc/testsuite/ * gcc.target/i386/pr67761.c: New test. From-SVN: r228292 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a4dfd3afe51..1a799c7af5d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-09-30 Ilya Enkovich + + * config/i386/i386.c (scalar_chain::analyze_register_chain): Ignore + debug insns. + (scalar_chain::convert_reg): Likewise. + 2015-09-30 Richard Biener * builtins.c: Add comment that no new simplifications shouldd diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index be639e075ad..fe9c756ba2f 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -2919,6 +2919,10 @@ scalar_chain::analyze_register_chain (bitmap candidates, df_ref ref) for (chain = DF_REF_CHAIN (ref); chain; chain = chain->next) { unsigned uid = DF_REF_INSN_UID (chain->ref); + + if (!NONDEBUG_INSN_P (DF_REF_INSN (chain->ref))) + continue; + if (!DF_REF_REG_MEM_P (chain->ref)) { if (bitmap_bit_p (insns, uid)) @@ -3279,7 +3283,7 @@ scalar_chain::convert_reg (unsigned regno) bitmap_clear_bit (conv, DF_REF_INSN_UID (ref)); } } - else + else if (NONDEBUG_INSN_P (DF_REF_INSN (ref))) { replace_rtx (DF_REF_INSN (ref), reg, scopy); df_insn_rescan (DF_REF_INSN (ref)); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8192f188083..afab76614d8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-09-30 Ilya Enkovich + + * gcc.target/i386/pr67761.c: New test. + 2015-09-30 Marek Polacek PR c/67730 diff --git a/gcc/testsuite/gcc.target/i386/pr67761.c b/gcc/testsuite/gcc.target/i386/pr67761.c new file mode 100644 index 00000000000..ff813f3f8b5 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr67761.c @@ -0,0 +1,13 @@ +/* PR target/pr67761 */ +/* { dg-do compile { target { ia32 } } } */ +/* { dg-options "-O2 -march=slm -g" } */ +/* { dg-final { scan-assembler "paddq" } } */ + +void +test (long long *values, long long val, long long delta) +{ + unsigned i; + + for (i = 0; i < 128; i++, val += delta) + values[i] = val; +}