https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97445
--- Comment #22 from Jan Hubicka <hubicka at ucw dot cz> --- > Maybe better just have a match.pd rule that would fold > y = z binop cst; > x = __builtin_constant_p (y); > to > x = __builtin_constant_p (z); > and let SCCVN do the rest (or do it in fwprop or whatever else if we'd want to > write it in C without having to enumerate all possible binops we want to do it > for). > > Not sure if we shouldn't stop on ops that could trap though, or on ops that > could possibly be invalid... We need to establish that z binop cst folds to a constant whenever z is a constant or we may run into cases where we go into builtin_constant_p == true case and then fail to fold the actual value. Honza > > -- > You are receiving this mail because: > You are on the CC list for the bug.