[llvm] [GlobalISel] Catching inconsistencies in load memory, result, and range metadata type (PR #121247)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 08:30:47 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
----------------
arsenm wrote:
I think the verifier aborts after the first function fails, but keeps printing errors in the functions. As a consequence you would need all of these cases tested in one function
https://github.com/llvm/llvm-project/pull/121247
More information about the llvm-commits
mailing list