[llvm] [RISCV][GlobalISel] Create generic instructions to handle legalization and selection of G_GLOBAL_VALUE for medlow code model (PR #69562)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 21:55:34 PST 2024


================
@@ -0,0 +1,33 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=riscv32 -run-pass=regbankselect \
+# RUN:   -disable-gisel-legality-check -simplify-mir -verify-machineinstrs %s \
+# RUN:   -o - | FileCheck %s
+# RUN: llc -mtriple=riscv64 -run-pass=regbankselect \
+# RUN:   -disable-gisel-legality-check -simplify-mir -verify-machineinstrs %s \
+# RUN:   -o - | FileCheck %s
+
+--- |
+  @var = global i32 0
+
+  define ptr @test_global() {
+    ret ptr @var
+  }
+
+...
+---
+name:            test_global
+legalized:       true
+tracksRegLiveness: true
+body:             |
+  bb.0 (%ir-block.0):
----------------
arsenm wrote:

drop block name 

https://github.com/llvm/llvm-project/pull/69562


More information about the llvm-commits mailing list