Use counter_mode on count_exp to get mode
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Apr 2014 16:31:41 +0000 (16:31 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Apr 2014 16:31:41 +0000 (16:31 +0000)
gcc/

PR target/60868
* config/i386/i386.c (ix86_expand_set_or_movmem): Call counter_mode
on count_exp to get mode.

gcc/testsuite/

PR target/60868
* gcc.target/i386/pr60868.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209648 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr60868.c [new file with mode: 0644]

index 85ec0ed..11efb18 100644 (file)
@@ -1,3 +1,9 @@
+2014-04-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/60868
+       * config/i386/i386.c (ix86_expand_set_or_movmem): Call counter_mode 
+       on count_exp to get mode.
+
 2014-04-22  Andrew Pinski  <apinski@cavium.com>
 
        * config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
index 859e71a..895ebbb 100644 (file)
@@ -24384,7 +24384,8 @@ ix86_expand_set_or_movmem (rtx dst, rtx src, rtx count_exp, rtx val_exp,
          if (jump_around_label == NULL_RTX)
            jump_around_label = gen_label_rtx ();
          emit_cmp_and_jump_insns (count_exp, GEN_INT (dynamic_check - 1),
-                                  LEU, 0, GET_MODE (count_exp), 1, hot_label);
+                                  LEU, 0, counter_mode (count_exp),
+                                  1, hot_label);
          predict_jump (REG_BR_PROB_BASE * 90 / 100);
          if (issetmem)
            set_storage_via_libcall (dst, count_exp, val_exp, false);
index 389ac5d..3578470 100644 (file)
@@ -1,3 +1,8 @@
+2014-04-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/60868
+       * gcc.target/i386/pr60868.c: New testcase.
+
 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/59073
diff --git a/gcc/testsuite/gcc.target/i386/pr60868.c b/gcc/testsuite/gcc.target/i386/pr60868.c
new file mode 100644 (file)
index 0000000..c30bbfc
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -minline-all-stringops -minline-stringops-dynamically -march=core2" } */
+
+void bar (float *);
+
+void foo (void)
+{
+  float b[256] = {0};
+  bar(b);
+}