Use counter_mode on count_exp to get mode

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.

From-SVN: r209648
This commit is contained in:
H.J. Lu 2014-04-22 16:31:41 +00:00 committed by H.J. Lu
parent e162a13486
commit e54c2dd3e2
4 changed files with 23 additions and 1 deletions

View 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):

View 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);

View 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

View file

@ -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);
}