diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-07-15 10:34:54 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-10-26 04:15:47 -0700 |
commit | 4052c05e5b30fee0fb95a51e74e12a56dce29491 (patch) | |
tree | b022dbf38ce2640fd94a6a90cc0afff50bf01280 /gcc/expr.c | |
parent | 3edc21af5272194794fbf24b2c5f0981c632e866 (diff) | |
download | gcc-4052c05e5b30fee0fb95a51e74e12a56dce29491.zip gcc-4052c05e5b30fee0fb95a51e74e12a56dce29491.tar.gz gcc-4052c05e5b30fee0fb95a51e74e12a56dce29491.tar.bz2 |
x86: Inline strncmp only with -minline-all-stringops
Expand strncmp to "repz cmpsb" only with -minline-all-stringops since
"repz cmpsb" can be much slower than strncmp function implemented with
vector instructions, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052
gcc/
PR target/95458
* config/i386/i386-expand.c (ix86_expand_cmpstrn_or_cmpmem):
Return false for -mno-inline-all-stringops.
gcc/testsuite/
PR target/95458
* gcc.target/i386/pr95458-1.c: New test.
* gcc.target/i386/pr95458-2.c: Likewise.
Diffstat (limited to 'gcc/expr.c')
0 files changed, 0 insertions, 0 deletions