https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103784
--- Comment #12 from Segher Boessenkool <segher at gcc dot gnu.org> --- What David says :-) We really could use something good for this, it has been a problem for all GCC targets since forever; it hurts rs6000 more than most though. Before RA this is a diamond, one side does the 0/1, the other the always 0. After the join it gets an AND with 1 (not an extend; the effect is similar of course). Shrink-wrapping gets rid of the join (duplicates the tail code to both branches) but does not optimise the result of that, which gives us the silly li 3,0;clrldi 3,3,63 (and the other side does not need the shift either, but doesn't look quite as silly :-) ). It is not unlikely this would work better if we had no QImode thing for the bool; even SImode might work better already, but DImode would be best (in the ABI everything is passed in full registers always, so something has to set the upper bits somewhere).