Commit 945a01f9 by Alan Modra Committed by Alan Modra

[RS6000] Don't expand strcmp and strncmp inline when -Os

	* config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if
	optimizing for size.

From-SVN: r244660
parent 5699b9d1
2017-01-20 Alan Modra <amodra@gmail.com> 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 PR target/79144
* config/rs6000/rs6000.c (expand_strn_compare): Get the asm name * config/rs6000/rs6000.c (expand_strn_compare): Get the asm name
for strcmp and strncmp from corresponding builtin decl. for strcmp and strncmp from corresponding builtin decl.
......
...@@ -9102,6 +9102,9 @@ ...@@ -9102,6 +9102,9 @@
(use (match_operand:SI 4))])] (use (match_operand:SI 4))])]
"TARGET_CMPB && (BYTES_BIG_ENDIAN || TARGET_LDBRX)" "TARGET_CMPB && (BYTES_BIG_ENDIAN || TARGET_LDBRX)"
{ {
if (optimize_insn_for_size_p ())
FAIL;
if (expand_strn_compare (operands, 0)) if (expand_strn_compare (operands, 0))
DONE; DONE;
else else
...@@ -9121,6 +9124,9 @@ ...@@ -9121,6 +9124,9 @@
(use (match_operand:SI 3))])] (use (match_operand:SI 3))])]
"TARGET_CMPB && (BYTES_BIG_ENDIAN || TARGET_LDBRX)" "TARGET_CMPB && (BYTES_BIG_ENDIAN || TARGET_LDBRX)"
{ {
if (optimize_insn_for_size_p ())
FAIL;
if (expand_strn_compare (operands, 1)) if (expand_strn_compare (operands, 1))
DONE; DONE;
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment