------- Comment #4 from jh at suse dot cz 2008-08-07 14:30 ------- Subject: Re: [4.4 Regression] Revision 138835 breaks bootstrap
Hi, thanks for testcase, for some reason it does not reproduce on our testing setup, probably due to ancient glibc that still has memcpy/memset inlines. This patch should fix it, I am testing it right now but I am not sure I will be able to commit before tomorro wunforutnately. The problem is that we now use single stringops on optimize_size regions, but the patterns are disabled. It is not problem to enable them; we never produce them directly, only via the stringop expanders. (at least I am convinced combine won't produce this) Honza * i386.md (single stringop patterns): Enable unconditionally. Index: config/i386/i386.md =================================================================== *** config/i386/i386.md (revision 138835) --- config/i386/i386.md (working copy) *************** *** 18652,18658 **** (set (match_operand:DI 1 "register_operand" "=S") (plus:DI (match_dup 3) (const_int 8)))] ! "TARGET_64BIT && TARGET_SINGLE_STRINGOP" "movsq" [(set_attr "type" "str") (set_attr "mode" "DI") --- 18652,18658 ---- (set (match_operand:DI 1 "register_operand" "=S") (plus:DI (match_dup 3) (const_int 8)))] ! "TARGET_64BIT" "movsq" [(set_attr "type" "str") (set_attr "mode" "DI") *************** *** 18667,18673 **** (set (match_operand:SI 1 "register_operand" "=S") (plus:SI (match_dup 3) (const_int 4)))] ! "!TARGET_64BIT && TARGET_SINGLE_STRINGOP" "movs{l|d}" [(set_attr "type" "str") (set_attr "mode" "SI") --- 18667,18673 ---- (set (match_operand:SI 1 "register_operand" "=S") (plus:SI (match_dup 3) (const_int 4)))] ! "!TARGET_64BIT" "movs{l|d}" [(set_attr "type" "str") (set_attr "mode" "SI") *************** *** 18682,18688 **** (set (match_operand:DI 1 "register_operand" "=S") (plus:DI (match_dup 3) (const_int 4)))] ! "TARGET_64BIT && TARGET_SINGLE_STRINGOP" "movs{l|d}" [(set_attr "type" "str") (set_attr "mode" "SI") --- 18682,18688 ---- (set (match_operand:DI 1 "register_operand" "=S") (plus:DI (match_dup 3) (const_int 4)))] ! "TARGET_64BIT" "movs{l|d}" [(set_attr "type" "str") (set_attr "mode" "SI") *************** *** 18697,18703 **** (set (match_operand:SI 1 "register_operand" "=S") (plus:SI (match_dup 3) (const_int 2)))] ! "!TARGET_64BIT && TARGET_SINGLE_STRINGOP" "movsw" [(set_attr "type" "str") (set_attr "memory" "both") --- 18697,18703 ---- (set (match_operand:SI 1 "register_operand" "=S") (plus:SI (match_dup 3) (const_int 2)))] ! "!TARGET_64BIT" "movsw" [(set_attr "type" "str") (set_attr "memory" "both") *************** *** 18712,18718 **** (set (match_operand:DI 1 "register_operand" "=S") (plus:DI (match_dup 3) (const_int 2)))] ! "TARGET_64BIT && TARGET_SINGLE_STRINGOP" "movsw" [(set_attr "type" "str") (set_attr "memory" "both") --- 18712,18718 ---- (set (match_operand:DI 1 "register_operand" "=S") (plus:DI (match_dup 3) (const_int 2)))] ! "TARGET_64BIT" "movsw" [(set_attr "type" "str") (set_attr "memory" "both") *************** *** 18727,18733 **** (set (match_operand:SI 1 "register_operand" "=S") (plus:SI (match_dup 3) (const_int 1)))] ! "!TARGET_64BIT && TARGET_SINGLE_STRINGOP" "movsb" [(set_attr "type" "str") (set_attr "memory" "both") --- 18727,18733 ---- (set (match_operand:SI 1 "register_operand" "=S") (plus:SI (match_dup 3) (const_int 1)))] ! "!TARGET_64BIT" "movsb" [(set_attr "type" "str") (set_attr "memory" "both") *************** *** 18742,18748 **** (set (match_operand:DI 1 "register_operand" "=S") (plus:DI (match_dup 3) (const_int 1)))] ! "TARGET_64BIT && TARGET_SINGLE_STRINGOP" "movsb" [(set_attr "type" "str") (set_attr "memory" "both") --- 18742,18748 ---- (set (match_operand:DI 1 "register_operand" "=S") (plus:DI (match_dup 3) (const_int 1)))] ! "TARGET_64BIT" "movsb" [(set_attr "type" "str") (set_attr "memory" "both") *************** *** 18917,18923 **** (match_operand 2 "register_operand" "")) (set (match_operand 0 "register_operand" "") (match_operand 3 "" ""))])] ! "TARGET_SINGLE_STRINGOP" "ix86_current_function_needs_cld = 1;") (define_insn "*strsetdi_rex_1" --- 18917,18923 ---- (match_operand 2 "register_operand" "")) (set (match_operand 0 "register_operand" "") (match_operand 3 "" ""))])] ! "" "ix86_current_function_needs_cld = 1;") (define_insn "*strsetdi_rex_1" *************** *** 18926,18932 **** (set (match_operand:DI 0 "register_operand" "=D") (plus:DI (match_dup 1) (const_int 8)))] ! "TARGET_64BIT && TARGET_SINGLE_STRINGOP" "stosq" [(set_attr "type" "str") (set_attr "memory" "store") --- 18926,18932 ---- (set (match_operand:DI 0 "register_operand" "=D") (plus:DI (match_dup 1) (const_int 8)))] ! "TARGET_64BIT" "stosq" [(set_attr "type" "str") (set_attr "memory" "store") *************** *** 18938,18944 **** (set (match_operand:SI 0 "register_operand" "=D") (plus:SI (match_dup 1) (const_int 4)))] ! "!TARGET_64BIT && TARGET_SINGLE_STRINGOP" "stos{l|d}" [(set_attr "type" "str") (set_attr "memory" "store") --- 18938,18944 ---- (set (match_operand:SI 0 "register_operand" "=D") (plus:SI (match_dup 1) (const_int 4)))] ! "!TARGET_64BIT" "stos{l|d}" [(set_attr "type" "str") (set_attr "memory" "store") *************** *** 18950,18956 **** (set (match_operand:DI 0 "register_operand" "=D") (plus:DI (match_dup 1) (const_int 4)))] ! "TARGET_64BIT && TARGET_SINGLE_STRINGOP" "stos{l|d}" [(set_attr "type" "str") (set_attr "memory" "store") --- 18950,18956 ---- (set (match_operand:DI 0 "register_operand" "=D") (plus:DI (match_dup 1) (const_int 4)))] ! "TARGET_64BIT" "stos{l|d}" [(set_attr "type" "str") (set_attr "memory" "store") *************** *** 18962,18968 **** (set (match_operand:SI 0 "register_operand" "=D") (plus:SI (match_dup 1) (const_int 2)))] ! "!TARGET_64BIT && TARGET_SINGLE_STRINGOP" "stosw" [(set_attr "type" "str") (set_attr "memory" "store") --- 18962,18968 ---- (set (match_operand:SI 0 "register_operand" "=D") (plus:SI (match_dup 1) (const_int 2)))] ! "!TARGET_64BIT" "stosw" [(set_attr "type" "str") (set_attr "memory" "store") *************** *** 18974,18980 **** (set (match_operand:DI 0 "register_operand" "=D") (plus:DI (match_dup 1) (const_int 2)))] ! "TARGET_64BIT && TARGET_SINGLE_STRINGOP" "stosw" [(set_attr "type" "str") (set_attr "memory" "store") --- 18974,18980 ---- (set (match_operand:DI 0 "register_operand" "=D") (plus:DI (match_dup 1) (const_int 2)))] ! "TARGET_64BIT" "stosw" [(set_attr "type" "str") (set_attr "memory" "store") *************** *** 18986,18992 **** (set (match_operand:SI 0 "register_operand" "=D") (plus:SI (match_dup 1) (const_int 1)))] ! "!TARGET_64BIT && TARGET_SINGLE_STRINGOP" "stosb" [(set_attr "type" "str") (set_attr "memory" "store") --- 18986,18992 ---- (set (match_operand:SI 0 "register_operand" "=D") (plus:SI (match_dup 1) (const_int 1)))] ! "!TARGET_64BIT" "stosb" [(set_attr "type" "str") (set_attr "memory" "store") *************** *** 18998,19004 **** (set (match_operand:DI 0 "register_operand" "=D") (plus:DI (match_dup 1) (const_int 1)))] ! "TARGET_64BIT && TARGET_SINGLE_STRINGOP" "stosb" [(set_attr "type" "str") (set_attr "memory" "store") --- 18998,19004 ---- (set (match_operand:DI 0 "register_operand" "=D") (plus:DI (match_dup 1) (const_int 1)))] ! "TARGET_64BIT" "stosb" [(set_attr "type" "str") (set_attr "memory" "store") -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37048