diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-07-13 10:33:47 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-07-13 10:33:47 -0700 |
commit | 9cba898481368ce16c6a2d30ef781a82dce27c55 (patch) | |
tree | 6d44bf71c40e5f79feed433195185d8977b966d6 /gcc/omp-expand.c | |
parent | 6a9a3434c7396ea14c8f9c291694faea382c36dc (diff) | |
download | gcc-9cba898481368ce16c6a2d30ef781a82dce27c55.zip gcc-9cba898481368ce16c6a2d30ef781a82dce27c55.tar.gz gcc-9cba898481368ce16c6a2d30ef781a82dce27c55.tar.bz2 |
x86: Pass a copy of the string length to cmpstrnqi
cmpstrnsi expander may pass the actual string length directly to cmpstrnqi
patterns. For cmpstrnsi, one of the strings must be a constant and
expand_builtin_strncmp rewrites the length argument to be the minimum of
the const string length and the actual string length. But it is not the
case for cmpmemsi. Pass a copy of the string length to cmpstrnqi patterns
to avoid changing the actual string length by cmpstrnqi patterns.
gcc/
PR target/95443
* config/i386/i386.md (cmpstrnsi): Pass a copy of the string
length to cmpstrnqi patterns.
gcc/testsuite/
PR target/95443
* gcc.target/i386/pr95443-1.c: New test.
* gcc.target/i386/pr95443-2.c: Likewise.
Diffstat (limited to 'gcc/omp-expand.c')
0 files changed, 0 insertions, 0 deletions