[PATCH] D135982: [SimplifyCFG] Try unsigned case value for switch to lookup table

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 14 12:07:23 PDT 2022


bcl5980 created this revision.
bcl5980 added reviewers: nikic, craig.topper, spatel.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
bcl5980 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Treat case value as unsigned when we find the min case in the switch is min signed value and max case is max signed value.
Fix: #56538


https://reviews.llvm.org/D135982

Files:
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp
  llvm/test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135982.467863.patch
Type: text/x-patch
Size: 5200 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221014/e60602c6/attachment.bin>


More information about the llvm-commits mailing list