https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115262
--- Comment #3 from Kewen Lin <linkw at gcc dot gnu.org> --- (In reply to Peter Bergner from comment #2) > (In reply to Jeffrey A. Law from comment #1) > > It looks like the test wants to see xxsel, but after that change we get > > xxlor and what looks like a slight difference in register allocation. I > > can't really judge if the new code is better, worse is equivalent. > > xxsel XT,XA,XB,XC computes XT = (XA & ~XC) | (XB & XC). Using De Morgan's > law given XB == XC, that seems to simplify to XT = XA | XB which is what > you're producing and an xxlor (a simple logical or) is not going to be > slower than a xxsel and is probably faster. I agree with Bill that this > looks like an example of needing to update the expected results of the test > case. I'll let Segher and/or Ke Wen comment though. I agree they are equivalent here, from the scheduling descriptions, xxsel and xxlor are in the same unit.