[RS6000] Don't expand strcmp and strncmp inline when -Os
authorAlan Modra <amodra@gmail.com>
Thu, 19 Jan 2017 23:21:53 +0000 (09:51 +1030)
committerAlan Modra <amodra@gcc.gnu.org>
Thu, 19 Jan 2017 23:21:53 +0000 (09:51 +1030)
* config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if
optimizing for size.

From-SVN: r244660

gcc/ChangeLog
gcc/config/rs6000/rs6000.md

index 33eb1298100781f01ab3eecd4eead9fdf593c2a5..d231ff49d5ba260dfb2bf6b4bd3d435712af744f 100644 (file)
@@ -1,3 +1,8 @@
+2017-01-20  Alan Modra  <amodra@gmail.com>
+
+       * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if
+       optimizing for size.
+
 2017-01-20  Alan Modra  <amodra@gmail.com>
 
        PR target/79144
index 9ef3b11d12a4fd416af5d0b6db68a1a7c3157c56..3f292211463ddd38f3369ab8a79d1c0f866127e8 100644 (file)
              (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 
              (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