[SimplifyCFG] Emit `rotl` directly in `ReduceSwitchRange` (#77603)
This patch emits `ROTL(Cond, BitWidth - Shift)` directly in `ReduceSwitchRange`. This should give better codegen because `SimplifyDemandedBits` will break the rotation patterns in the original form. See also https://github.com/llvm/llvm-project/pull/73441 and the IR diff https://github.com/dtcxzyw/llvm-opt-benchmark/pull/115/files. This patch should cover most of cases handled by #73441.
Loading
Please sign in to comment