aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGen.cpp
diff options
context:
space:
mode:
authordianqk <dianqk@dianqk.net>2025-10-06 12:56:43 +0800
committerGitHub <noreply@github.com>2025-10-06 04:56:43 +0000
commitbbdcba9b851abe37cf2b10ec6d9b50c12cdd3604 (patch)
treea8356e4aad042550ac85bf24f0db21ba0ec789f1 /llvm/lib/CodeGen/CodeGen.cpp
parent36cfdebe927c34508c1e245b459da43b745ae620 (diff)
downloadllvm-bbdcba9b851abe37cf2b10ec6d9b50c12cdd3604.zip
llvm-bbdcba9b851abe37cf2b10ec6d9b50c12cdd3604.tar.gz
llvm-bbdcba9b851abe37cf2b10ec6d9b50c12cdd3604.tar.bz2
[SimplifyCFG] Fold the contiguous wrapping cases into ICmp. (#161000)
Fixes #157113. Take the following IR as an example; we know the destination of the `[1, 3]` cases is `%else`. ```llvm define i32 @src(i8 range(i8 0, 6) %arg) { switch i8 %arg, label %else [ i8 0, label %if i8 4, label %if i8 5, label %if ] if: ret i32 0 else: ret i32 1 } ``` We can first try the non-wrapping range for both destinations, but I don't see how that would be any better. Proof: https://alive2.llvm.org/ce/z/acdWD4.
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions