diff options
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/torture/pr41680.C | 23 |
4 files changed, 37 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 14a918b..b79f323 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2009-10-12 Jakub Jelinek <jakub@redhat.com> + + PR target/41680 + * config/i386/i386.md (split after *testqi_ext_3_rex64): Only narrow + paradoxical subregs to prevent partial register stalls if the inner + mode is integer mode. + 2009-10-12 Uros Bizjak <ubizjak@gmail.com> * config/i386/i386.md (*setcc_<mode>_2): Do not use ix86_expand_clear diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 43873c5..22ea39c 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -8571,7 +8571,8 @@ else if (GET_CODE (val) == SUBREG && (submode = GET_MODE (SUBREG_REG (val)), GET_MODE_BITSIZE (mode) > GET_MODE_BITSIZE (submode)) - && pos + len <= GET_MODE_BITSIZE (submode)) + && pos + len <= GET_MODE_BITSIZE (submode) + && GET_MODE_CLASS (submode) == MODE_INT) { /* Narrow a paradoxical subreg to prevent partial register stalls. */ mode = submode; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 36d90f3..11da3e7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-10-12 Jakub Jelinek <jakub@redhat.com> + + PR target/41680 + * g++.dg/torture/pr41680.C: New test. + 2009-10-12 Dodji Seketeli <dodji@redhat.com> PR c++/41570 diff --git a/gcc/testsuite/g++.dg/torture/pr41680.C b/gcc/testsuite/g++.dg/torture/pr41680.C new file mode 100644 index 0000000..7faab0d --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr41680.C @@ -0,0 +1,23 @@ +// PR target/41680 +// { dg-do compile } + +extern void baz (float); + +inline bool +bar (float x) +{ + union { float f; int i; } u; + u.f = x; + return (u.i & 1); +} + +void +foo (float *x) +{ + for (int i = 0; i < 10; i++) + { + float f = x[i]; + if (!bar (f)) + baz (f); + } +} |