https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104950
--- Comment #6 from Hongtao.liu <crazylht at gmail dot com> --- (In reply to Andrew Pinski from comment #5) > (In reply to Hongtao.liu from comment #4) > > (In reply to Richard Biener from comment #3) > > > Ah, on aarch64 we get > > > > > > cmp w0, 0 > > > add x0, x1, 4 > > > csel x0, x0, x1, eq > > > ldr w0, [x0] > > > > > > so we do not load from the possibly trapping mem. With the testcase I > > > provided and -fno-tree-sink on x86_64 we get > > > > Not for this one > > > > float > > foo (float a, float b, float *c, int i, int j) > > { > > return a > b ? c[i] : c[j]; > > } > > That one is recorded as PR Just note -fno-tree-sink works for PR102008, but not for this case.