xref: /llvm-project/llvm/test/Feature/undefined.ll (revision 1842a2909e80da9432c5d79a95ec2c331bd99744)
1; RUN: llvm-as < %s | llvm-dis > %t1.ll
2; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3; RUN: diff %t1.ll %t2.ll
4; RUN: FileCheck %s < %t1.ll
5
6@X = global i32 undef           ; <ptr> [#uses=0]
7
8declare i32 @atoi(ptr)
9
10define i32 @test() {
11        ret i32 undef
12}
13
14define i32 @test2() {
15        %X = add i32 undef, 1           ; <i32> [#uses=1]
16        ret i32 %X
17}
18
19
20; Check that there is a newline between functions.
21
22; CHECK: @X = global
23; CHECK-EMPTY:
24; CHECK: declare i32 @atoi(ptr)
25; CHECK-EMPTY:
26; CHECK: define i32 @test() {
27; CHECK: {{^[}]}}
28; CHECK-EMPTY:
29; CHECK: define i32 @test2() {
30; CHECK: {{^[}]}}
31