[all-commits] [llvm/llvm-project] 45be68: [SimplifyCFG] Emit `rotl` directly in `ReduceSwitc...
Yingwei Zheng via All-commits
all-commits at lists.llvm.org
Wed Jan 10 06:57:30 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 45be680b1ae51866568b1794fa6f59190042ee92
https://github.com/llvm/llvm-project/commit/45be680b1ae51866568b1794fa6f59190042ee92
Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
Date: 2024-01-10 (Wed, 10 Jan 2024)
Changed paths:
M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
M llvm/test/Transforms/SimplifyCFG/rangereduce.ll
Log Message:
-----------
[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.
More information about the All-commits
mailing list