OLD | NEW |
(Empty) | |
| 1 ; Tests that we name unnamed global addresses. |
| 2 |
| 3 ; RUN: %llvm2ice -notranslate -verbose=inst < %s | FileCheck %s |
| 4 |
| 5 ; RUN: %llvm2ice -notranslate -verbose=inst -default-function-prefix=h \ |
| 6 ; RUN: -default-global-prefix=g < %s | FileCheck --check-prefix=BAD %s |
| 7 |
| 8 @0 = internal global [4 x i8] zeroinitializer, align 4 |
| 9 |
| 10 ; CHECK: @Global = internal global [4 x i8] zeroinitializer, align 4 |
| 11 |
| 12 @1 = internal constant [10 x i8] c"Some stuff", align 1 |
| 13 |
| 14 ; CHECK-NEXT: @Global1 = internal constant [10 x i8] c"Some stuff", align 1 |
| 15 |
| 16 @g = internal global [4 x i8] zeroinitializer, align 4 |
| 17 |
| 18 ; BAD: Warning: Default global prefix 'g' conflicts with name 'g'. |
| 19 |
| 20 ; CHECK-NEXT: @g = internal global [4 x i8] zeroinitializer, align 4 |
| 21 |
| 22 define i32 @2(i32 %v) { |
| 23 ret i32 %v |
| 24 } |
| 25 |
| 26 ; CHECK-NEXT: define i32 @Function(i32 %v) { |
| 27 ; CHECK-NEXT: __0: |
| 28 ; CHECK-NEXT: ret i32 %v |
| 29 ; CHECK-NEXT: } |
| 30 |
| 31 define void @hg() { |
| 32 ret void |
| 33 } |
| 34 |
| 35 ; BAD: Warning: Default function prefix 'h' conflicts with name 'hg'. |
| 36 |
| 37 ; CHECK-NEXT: define void @hg() { |
| 38 ; CHECK-NEXT: __0: |
| 39 ; CHECK-NEXT: ret void |
| 40 ; CHECK-NEXT: } |
| 41 |
| 42 define void @3() { |
| 43 ret void |
| 44 } |
| 45 |
| 46 ; CHECK-NEXT: define void @Function1() { |
| 47 ; CHECK-NEXT: __0: |
| 48 ; CHECK-NEXT: ret void |
| 49 ; CHECK-NEXT: } |
| 50 |
OLD | NEW |