When expanding to RTL we always use vec_perm_indices with two operands
which can make a difference with respect to supported vs. unsupported.
So the following adjusts a query in match.pd for target support which
got this "wrong" and using 1 for a equal operand permute.
Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
Eventually a reduced testcase is ready in time.
Richard.
PR middle-end/118795
* match.pd (vec_perm <vec_perm <a, b>> -> vec_perm <a, b>):
Use the appropriate check to see whether the original
outer permute was supported.
---
gcc/match.pd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/match.pd b/gcc/match.pd
index ad966766376..c0402e81c28 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -11128,7 +11128,7 @@ and,
(with
{
vec_perm_indices sel0 (builder0, 2, nelts);
- vec_perm_indices sel1 (builder1, 1, nelts);
+ vec_perm_indices sel1 (builder1, 2, nelts);
for (int i = 0; i < nelts; i++)
builder2.quick_push (sel0[sel1[i].to_constant ()]);
--
2.43.0