diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-05-17 06:52:02 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-05-17 06:52:14 -0700 |
commit | cc558e28014f0d85247398c89e7cf75d92df1bd3 (patch) | |
tree | a118dc18e40c36e892c820e9ff756e1ca194ae14 /gcc/tree-inline.c | |
parent | e7e785dfec360573c2e8a700ef570a22359410c5 (diff) | |
download | gcc-cc558e28014f0d85247398c89e7cf75d92df1bd3.zip gcc-cc558e28014f0d85247398c89e7cf75d92df1bd3.tar.gz gcc-cc558e28014f0d85247398c89e7cf75d92df1bd3.tar.bz2 |
x86: Add gcc.target/i386/strncmp-1.c
Add a strncmp test for the cmpstrn pattern with neither of the strings
is a constant string. We can expand the cmpstrn pattern to "repz cmpsb"
only if one of the strings is a constant so that expand_builtin_strncmp()
can write the length argument to be the minimum of the const string
length and the actual length argument. Otherwise, "repz cmpsb" may pass
the 0 byte.
* gcc.target/i386/strncmp-1.c: New test.
Diffstat (limited to 'gcc/tree-inline.c')
0 files changed, 0 insertions, 0 deletions