Message ID | 20170119121712.GR32333@bubble.grove.modra.org |
---|---|
State | New |
Headers | show |
On Thu, Jan 19, 2017 at 10:47:12PM +1030, Alan Modra wrote: > --- a/gcc/config/rs6000/rs6000.md > +++ b/gcc/config/rs6000/rs6000.md > @@ -9102,7 +9102,8 @@ (define_expand "cmpstrnsi" > (use (match_operand:SI 4))])] > "TARGET_CMPB && (BYTES_BIG_ENDIAN || TARGET_LDBRX)" > { > - if (expand_strn_compare (operands, 0)) > + if (!optimize_insn_for_size_p () > + && expand_strn_compare (operands, 0)) > DONE; > else > FAIL; Please do either { if (optimize_insn_for_speed_p () && expand_strn_compare (operands, 0)) DONE; else FAIL; } or { if (optimize_insn_for_size_p ()) FAIL; if (expand_strn_compare (operands, 0)) DONE; else FAIL; } (i.e. use a positive condition). (Please remove the trailing tab while you're touching this code, too). Okay with such a change. Thanks, Segher
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 9ef3b11..d729f40 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -9102,7 +9102,8 @@ (define_expand "cmpstrnsi" (use (match_operand:SI 4))])] "TARGET_CMPB && (BYTES_BIG_ENDIAN || TARGET_LDBRX)" { - if (expand_strn_compare (operands, 0)) + if (!optimize_insn_for_size_p () + && expand_strn_compare (operands, 0)) DONE; else FAIL; @@ -9121,7 +9122,8 @@ (define_expand "cmpstrsi" (use (match_operand:SI 3))])] "TARGET_CMPB && (BYTES_BIG_ENDIAN || TARGET_LDBRX)" { - if (expand_strn_compare (operands, 1)) + if (!optimize_insn_for_size_p () + && expand_strn_compare (operands, 1)) DONE; else FAIL;