]> git.ipfire.org Git - thirdparty/gcc.git/commit
middle-end/123697 - fix .MASK_LOAD_LANES folding
authorRichard Biener <rguenther@suse.de>
Tue, 20 Jan 2026 09:57:34 +0000 (10:57 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 20 Jan 2026 11:41:12 +0000 (12:41 +0100)
commit46a3355c7f165661a048151ce36cf6e08a4e5d9d
treecc6409bd661eaba154a1aef304e21a548a05f1d9
parent23cd6f3bcb494606afe82a490b10f64f660d8143
middle-end/123697 - fix .MASK_LOAD_LANES folding

.MASK_LOAD_LANES has an aggregate (array of vectors) return value
which is not compatible with the else value used when trying to
fold this with all lanes inactive.  Instead use an empty CTOR if
the else value is zero and otherwise do not simplify.

PR middle-end/123697
* gimple-fold.cc (gimple_fold_partial_load_store): Use an
empty CTOR for a zero else value in .MASK_LOAD_LANES.

* gcc.dg/vect/vect-pr123697.c: New testcase.
gcc/gimple-fold.cc
gcc/testsuite/gcc.dg/vect/vect-pr123697.c [new file with mode: 0644]