]> git.ipfire.org Git - thirdparty/gcc.git/commit
Elide expand_constructor if move by pieces is preferred
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 21 May 2021 12:16:20 +0000 (05:16 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 21 May 2021 14:27:37 +0000 (07:27 -0700)
commit53fb833d635da04f5b44af16bcea1082e7b59e75
tree6166e9128634ef8eb9e93e10f6e77b405d0c2921
parent5d42db533324e80a7382b20b94cace5b202d41ea
Elide expand_constructor if move by pieces is preferred

Elide expand_constructor when the constructor is static storage and not
mostly zeros and we can move it by pieces prefer to do so since that's
usually more efficient than performing a series of stores from immediates.

2021-05-21  Richard Biener  <rguenther@suse.de>
    H.J. Lu  <hjl.tools@gmail.com>

gcc/

PR middle-end/90773
* expr.c (expand_constructor): Elide expand_constructor if
move by pieces is preferred.

gcc/testsuite/

* gcc.target/i386/pr90773-24.c: New test.
* gcc.target/i386/pr90773-25.c: Likewise.
gcc/expr.c
gcc/testsuite/gcc.target/i386/pr90773-24.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr90773-25.c [new file with mode: 0644]