xref: /llvm-project/llvm/test/CodeGen/MIR/AArch64/machine-metadata-error.mir (revision ff9af4c43ad71eeba2cabe99609cfaa0fd54c1d0)
1# RUN: not llc -run-pass none -o /dev/null %s 2>&1 | FileCheck %s
2# This test ensures that the MIR parser detects errors when parsing machine
3# metadata.
4--- |
5  target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
6  target triple = "aarch64-unknown-linux-gnu"
7
8  define i32 @test_memcpy(ptr nocapture %p, ptr nocapture readonly %q) {
9    ret i32 0
10  }
11...
12---
13name:            test_memcpy
14machineMetadataNodes:
15  - '!9 = distinct !{!9, !7, !"Dst"}'
16  - '!10 = !{!9}'
17  - '!6 = distinct !{!6, !7, !"Src"}'
18  - '!5 = !{!6}'
19  - '!7 = distinct !{!7, !"MemcpyLoweringDomain"}'
20body:             |
21  bb.0 (%ir-block.0):
22  ; CHECK: [[@LINE+1]]:78: use of undefined metadata '!11'
23    %2:fpr128 = LDRQui %0, 1 :: (load 16, align 4, !alias.scope !5, !noalias !11)
24
25...
26