https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104950
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-03-16
Summary|GCC does not emit |GCC does not emit
|branchless code |branchless code for load
| |next to each other
Ever confirmed|0 |1
Severity|normal |enhancement
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, reduced testcase:
struct Node{
int i, l,r;
};
int eval(int t, struct Node *a) {
return t == 0 ? a->r : a->l;
}
Note on aarch64, if we remove the i field, then ifcvt on the RTL level is able
to catch it but it does not do it for x86_64 (maybe a cost issue).