From: Alan Modra Date: Thu, 19 Jan 2017 23:21:53 +0000 (+1030) Subject: [RS6000] Don't expand strcmp and strncmp inline when -Os X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=945a01f92138e0887ac258c7979392fb4661aa97;p=gcc.git [RS6000] Don't expand strcmp and strncmp inline when -Os * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if optimizing for size. From-SVN: r244660 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 33eb1298100..d231ff49d5b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-01-20 Alan Modra + + * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if + optimizing for size. + 2017-01-20 Alan Modra PR target/79144 diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 9ef3b11d12a..3f292211463 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -9102,6 +9102,9 @@ (use (match_operand:SI 4))])] "TARGET_CMPB && (BYTES_BIG_ENDIAN || TARGET_LDBRX)" { + if (optimize_insn_for_size_p ()) + FAIL; + if (expand_strn_compare (operands, 0)) DONE; else @@ -9121,6 +9124,9 @@ (use (match_operand:SI 3))])] "TARGET_CMPB && (BYTES_BIG_ENDIAN || TARGET_LDBRX)" { + if (optimize_insn_for_size_p ()) + FAIL; + if (expand_strn_compare (operands, 1)) DONE; else