llvm-project
22 строки · 510.0 Байт
1; RUN: opt -S -allow-incomplete-ir < %s | FileCheck %s
2
3; CHECK: @fn2 = external global i8
4; CHECK: @g1 = external global i8
5; CHECK: @g2 = external global i8
6; CHECK: @g3 = external global i8
7; CHECK: @g4 = external global i8
8
9; CHECK: declare void @fn1(i32)
10
11define ptr @test() {
12call void @fn1(i32 0)
13call void @fn1(i32 1)
14call void @fn2(i32 2)
15call void @fn2(i32 2, i32 3)
16call void @fn2(ptr @g1)
17load i32, ptr @g2
18store i32 0, ptr @g2
19load i32, ptr @g3
20load i64, ptr @g3
21ret ptr @g4
22}
23