[Bug middle-end/117173] can_vec_perm_const_p does not consider costs

2024-10-16 Thread rdapp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117173 --- Comment #2 from Robin Dapp --- In x264, before the optimization we have: _42 = VEC_PERM_EXPR ; ... _44 = VEC_PERM_EXPR ; _45 = VEC_PERM_EXPR ; The first one (_42) is "monotonic" and can be implemented by a vmerge. This implies a load and

[Bug middle-end/117173] can_vec_perm_const_p does not consider costs

2024-10-16 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117173 --- Comment #1 from Richard Biener --- So on the GIMPLE side this is mostly canonicalization - the "theory" is that the backend should be able to implement VEC_PERM_EXPR using the same two cheap permutes facing this premute request. I don't se