re PR target/37438 (ICE in extract_insn, at recog.c:2027 for i{4,5}86)

PR target/37438
	* config/i386/i386.md (zero_extendqihi2_movzbl): Enable when optimizing
	for size, not speed.

	* gcc.dg/pr37438.c: New test.

From-SVN: r140167
This commit is contained in:
Jakub Jelinek 2008-09-09 21:18:55 +02:00 committed by Jakub Jelinek
parent fd0a8853d0
commit 71aaa2ff33
4 changed files with 29 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2008-09-09 Jakub Jelinek <jakub@redhat.com>
PR target/37438
* config/i386/i386.md (zero_extendqihi2_movzbl): Enable when optimizing
for size, not speed.
PR rtl-optimization/37408
* function.c (assign_parm_find_stack_rtl): Set correct MEM_SIZE
if parm is promoted.

View File

@ -3713,7 +3713,7 @@
(define_insn "*zero_extendqihi2_movzbl"
[(set (match_operand:HI 0 "register_operand" "=r")
(zero_extend:HI (match_operand:QI 1 "nonimmediate_operand" "qm")))]
"(!TARGET_ZERO_EXTEND_WITH_AND || optimize_function_for_speed_p (cfun))
"(!TARGET_ZERO_EXTEND_WITH_AND || optimize_function_for_size_p (cfun))
&& reload_completed"
"movz{bl|x}\t{%1, %k0|%k0, %1}"
[(set_attr "type" "imovx")

View File

@ -1,5 +1,8 @@
2008-09-09 Jakub Jelinek <jakub@redhat.com>
PR target/37438
* gcc.dg/pr37438.c: New test.
PR c++/37389
* g++.dg/parse/enum4.C: New test.

View File

@ -0,0 +1,21 @@
/* PR target/37438 */
/* { dg-do compile } */
/* { dg-options "-Os" } */
/* { dg-options "-Os -march=i486" { target { { i686-*-* x86_64-*-* } && ilp32 } } } */
extern int bar (unsigned long long int);
extern int baz (const char *, unsigned int, unsigned short);
int
foo (unsigned long long int x)
{
return (x & 0xff) | ((unsigned int) (x >> 12) & ~0xff);
}
int
test (const char *v, unsigned int w, unsigned long long int x)
{
unsigned short k;
k = ((bar (x) & 0xff) << 8) | (foo (x) & 0xff);
return baz (v, w, k);
}