]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/111048 - avoid flawed logic in fold_vec_perm
authorRichard Biener <rguenther@suse.de>
Fri, 18 Aug 2023 07:41:56 +0000 (09:41 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 18 Aug 2023 08:23:47 +0000 (10:23 +0200)
commitf5f47cc1ce75b00427756939a2dab94d3d125f6a
tree6439af120281d1983d60d5942c6298a9b28e1f59
parent68f7cb6cf9e8b9f2254855507f3b479552adda5f
tree-optimization/111048 - avoid flawed logic in fold_vec_perm

The following avoids running into somehow flawed logic in fold_vec_perm
for non-VLA vectors.

PR tree-optimization/111048
* fold-const.cc (fold_vec_perm_cst): Check for non-VLA
vectors first.

* gcc.dg/torture/pr111048.c: New testcase.
gcc/fold-const.cc
gcc/testsuite/gcc.dg/torture/pr111048.c [new file with mode: 0644]