https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67635
--- Comment #3 from Oleg Endo <olegendo at gcc dot gnu.org> --- (In reply to ktkachov from comment #2) > > Perhaps we can consider teaching cse to not transform these kinds of > expressions (c ? x : x + a) if the target has a store_flag/addcc instruction > of the appropriate mode? Sounds a bit shaky. These sequences could also be introduced by other things than the CSE pass. I guess a more "stable" solution would be to make ifcvt realize that in one path x must be zero and effectively un-CSE it, then proceed as usual.