[all-commits] [llvm/llvm-project] 68079e: Teach SimplifyCFG to fold switches into lookup tab...
Owen Anderson via All-commits
all-commits at lists.llvm.org
Wed Sep 15 15:07:21 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 68079ef0eb011c8349e5ae84b95216e5039dbc16
https://github.com/llvm/llvm-project/commit/68079ef0eb011c8349e5ae84b95216e5039dbc16
Author: Owen Anderson <resistor at mac.com>
Date: 2021-09-15 (Wed, 15 Sep 2021)
Changed paths:
M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
A llvm/test/Transforms/SimplifyCFG/X86/switch-to-lookup-bitcast.ll
A llvm/test/Transforms/SimplifyCFG/X86/switch-to-lookup-gep.ll
Log Message:
-----------
Teach SimplifyCFG to fold switches into lookup tables in more cases.
In particular, it couldn't handle cases where lookup table constant
expressions involved bitcasts. This does not seem to come up
frequently in C++, but comes up reasonably often in Rust via
`#[derive(Debug)]`.
Originally reported by pcwalton.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D109565
More information about the All-commits
mailing list