Skip to content
Unverified Commit 45be680b authored by Yingwei Zheng's avatar Yingwei Zheng Committed by GitHub
Browse files

[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.
parent 113bce0c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment