[llvm] [GlobalISel] Catching inconsistencies in load memory, result, and range metadata type (PR #121247)

Renat Idrisov via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 10 07:34:54 PST 2025


================
@@ -0,0 +1,72 @@
+# RUN: not --crash llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=none %s -o -
+--- |
+  define void @range_metadata_sext_i8_signed_range_i64_load_as_v2i32() {
+   ret void
+  }
+
+  define void @range_metadata_sext_i8_signed_range_i64_load_as_v2i32_extractlo() {
+   ret void
+  }
+
+  define void @range_metadata_sext_i33_signed_range_i64_load_as_v2i32() {
+    ret void
+  }
+
+  !0 = !{i64 -4294967295, i64 4294967296}
+  !1 = !{i64 -8589934591, i64 8589934592}
+
+...
+---
+name:            range_metadata_sext_i33_signed_range_i64_load_as_v2i32
+tracksRegLiveness: true
+body:             |
+  bb.0:
+    liveins: $vgpr0, $vgpr1
+
+    %1:_(s32) = COPY $vgpr0
+    %2:_(s32) = COPY $vgpr1
+    %0:_(p1) = G_MERGE_VALUES %1(s32), %2(s32)
+    ; CHECK: Bad machine code: range is incompatible with the value it gets assigned to
----------------
parsifal-47 wrote:

not sure if I understood it correctly, I put them all in one function, but now they look too similar, please take a look, thank you!

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


More information about the llvm-commits mailing list