[llvm] [SelectionDAG] Avoid redundant comparisons in bit-test switch lowering (PR #222626)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 13 07:27:41 PDT 2026
================
@@ -0,0 +1,171 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
+; RUN: llc -mtriple=aarch64 -O2 -verify-machineinstrs < %s | FileCheck %s
+
+declare void @foo1(i32)
+declare void @foo2(i32)
+declare void @foo3(i32)
+declare void @foo4(i32)
+declare void @foo5(i32)
+
+define i32 @switch1(i32 %x) "no-jump-tables"="true" {
----------------
arsenm wrote:
```suggestion
define i32 @switch1(i32 %x) nounwind "no-jump-tables"="true" {
```
https://github.com/llvm/llvm-project/pull/222626
More information about the llvm-commits
mailing list