https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112304
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note my patch does not change the fact that we don't pull the mov outside of the loop for: ``` void f(int *a, int l) { for(int i = 0; i < l; i++) a[i]=(a[i]!=0)+42; } ``` But that is for a different issue to fix. The issue there is we have a cset/add during the (RTL) LIM and we don't pull the constant out from the add. And then we go and do the combine and found it is an cinc and then 42 becomes part of the cinc. This is pre-existing issue and most likely could be reproduce with other testcases too.