[PATCH] D109565: Teach SimplifyCFG to fold switches into lookup tables in more cases.
Owen Anderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 9 22:13:29 PDT 2021
resistor created this revision.
Herald added subscribers: JDevlieghere, hiraditya.
resistor requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D109565
Files:
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/SimplifyCFG/switch-to-lookup-bitcast.ll
llvm/test/Transforms/SimplifyCFG/switch-to-lookup-gep.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109565.371781.patch
Type: text/x-patch
Size: 7972 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210910/82067ee0/attachment.bin>
More information about the llvm-commits
mailing list