https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57755

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
unsigned g(unsigned a,unsigned b,unsigned c){
  return ((a<b)?a:c)*3/42+1;
}

has a few related bug reports already.

Last example from the patch:
unsigned h(unsigned a,unsigned b){
  return ((a<=42)?b:0)&b;
}
PRE is able to optimize this so I don't think it should be done (unless we have
another pass which does similar to what I suggested in the first part of
comment #4).

Reply via email to