aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-01-20 09:51:53 +1030
committerAlan Modra <amodra@gcc.gnu.org>2017-01-20 09:51:53 +1030
commit945a01f92138e0887ac258c7979392fb4661aa97 (patch)
tree2ab9a88077e4a00a94e74a7bac88d342dd944280
parent5699b9d11556148547b478d1b4591359c7b89ac5 (diff)
downloadgcc-945a01f92138e0887ac258c7979392fb4661aa97.zip
gcc-945a01f92138e0887ac258c7979392fb4661aa97.tar.gz
gcc-945a01f92138e0887ac258c7979392fb4661aa97.tar.bz2
[RS6000] Don't expand strcmp and strncmp inline when -Os
* config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if optimizing for size. From-SVN: r244660
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rs6000/rs6000.md6
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 33eb129..d231ff4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
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
* config/rs6000/rs6000.c (expand_strn_compare): Get the asm name
for strcmp and strncmp from corresponding builtin decl.
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 9ef3b11..3f29221 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