spatel craig.topper AndreiGrischenko zvi hfinkel efriedma lebedev.ri kparzysz
- rG374c27a4de76: Merging r330345:
rG82ef8e19ef1d: [InstCombine] Adjusting bswap pattern matching to hold for And/Shift mixed case
rGfbee8574ab2e: [if-converter] Handle BBs that terminate in ret during diamond conversion
rL333561: Merging r330345:
rL331257: [InstCombine] Adjusting bswap pattern matching to hold for And/Shift mixed case
rL330345: [if-converter] Handle BBs that terminate in ret during diamond conversion
Thanks for coming back to this. I think this patch is fine as one more match of a potential IR variant, but...
Since the time we started the discussion in D41353, there was a proposal to improve matching for ctpop and ctlz in D45173. I'm curious what others think about the fact that we match bswap/bitreverse in regular instcombine. Would it be better to match all of those intrinsics in the same place? Do we distinguish these based on how often we expect them to occur?
Sorry, I was away last week. My understanding is that the distinction between the regular and the aggressive instcombine is based on how expensive the individual transformations are. If we had an infinite computational power, everything would be included in the regular instcombine. Based on that, I think that this patch is ok as is.