[llvm] [RISCV][GISel] Legalizer and register bank selection for G_JUMP_TABLE and G_BRJT (PR #71970)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 10 12:03:40 PST 2023
================
@@ -0,0 +1,121 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=riscv32 -mattr=+m -run-pass=legalizer %s -o - \
+# RUN: | FileCheck %s
+
+--- |
+ define i32 @jt_test(i32 %x) {
+ entry:
+ switch i32 %x, label %return [
+ i32 75, label %sw.bb
+ i32 34, label %sw.bb
+ i32 56, label %sw.bb
+ i32 35, label %sw.bb
+ i32 40, label %sw.bb
+ i32 4, label %sw.bb1
+ i32 5, label %sw.bb1
+ i32 6, label %sw.bb1
+ ]
+
+ sw.bb: ; preds = %entry, %entry, %entry, %entry, %entry
+ %add = add nsw i32 %x, 42
----------------
topperc wrote:
I just copied this test from AArch64's IR translator and selection test. I'll simplify it.
https://github.com/llvm/llvm-project/pull/71970
More information about the llvm-commits
mailing list