Alexander Richardson | c11ae18 | 2018-02-27 11:15:11 +0000 | [diff] [blame] | 1 | ; RUN: llvm-as %s -data-layout=P200 -o /dev/null |
| 2 | ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s |
| 3 | |
| 4 | ; Check that numbered variables in a nonzero program address space 200 can be used in a call instruction |
| 5 | |
| 6 | define i8 @test_unnamed(i8(i32)*, i8(i32) addrspace(200)*) { |
| 7 | %first = call i8 %0(i32 0) ; this is fine |
| 8 | %second = call i8 %1(i32 0) ; this is also fine if it's the program AS |
| 9 | ; CHECK: call-nonzero-program-addrspace-2.ll:[[@LINE-1]]:21: error: '%1' defined with type 'i8 (i32) addrspace(200)*' |
| 10 | ret i8 0 |
| 11 | } |