From 945a01f92138e0887ac258c7979392fb4661aa97 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 20 Jan 2017 09:51:53 +1030 Subject: [PATCH] [RS6000] Don't expand strcmp and strncmp inline when -Os * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if optimizing for size. From-SVN: r244660 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/rs6000.md | 6 ++++++ 2 files changed, 11 insertions(+) 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 -- 2.30.2