HaohaiWen wrote: > Your original example does not verify: https://alive2.llvm.org/ce/z/Bkd89Z > Can you please provide a correct example of what you're trying to do?
As I said in previous comments: > This requires first optimize > %sly = shl nuw i32 %zext.y, 8 > %yx = or i32 %zext.x, %sly > to > fshl %xy, %xy, 8 > Then teach InstCombine to optimize the rest to bitreverse. This PR only teach InstCombine to optimize shl+or to fshl. I'll add another patch to teach InstComibine(matchBSwapOrBitReverse) to convert the example you metioned to bitreverse. And the original example will be the test in that patch. https://github.com/llvm/llvm-project/pull/68502 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits