OLD | NEW |
1 ; Simple test of signed and unsigned integer conversions. | 1 ; Simple test of signed and unsigned integer conversions. |
2 | 2 |
3 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s | 3 ; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s |
4 ; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s | 4 ; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s |
5 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s | 5 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
6 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s | 6 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s |
7 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ | 7 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ |
8 ; RUN: | FileCheck --check-prefix=DUMP %s | 8 ; RUN: | FileCheck --check-prefix=DUMP %s |
9 | 9 |
10 @i8v = global [1 x i8] zeroinitializer, align 1 | 10 @i8v = internal global [1 x i8] zeroinitializer, align 1 |
11 @i16v = global [2 x i8] zeroinitializer, align 2 | 11 @i16v = internal global [2 x i8] zeroinitializer, align 2 |
12 @i32v = global [4 x i8] zeroinitializer, align 4 | 12 @i32v = internal global [4 x i8] zeroinitializer, align 4 |
13 @i64v = global [8 x i8] zeroinitializer, align 8 | 13 @i64v = internal global [8 x i8] zeroinitializer, align 8 |
14 @u8v = global [1 x i8] zeroinitializer, align 1 | 14 @u8v = internal global [1 x i8] zeroinitializer, align 1 |
15 @u16v = global [2 x i8] zeroinitializer, align 2 | 15 @u16v = internal global [2 x i8] zeroinitializer, align 2 |
16 @u32v = global [4 x i8] zeroinitializer, align 4 | 16 @u32v = internal global [4 x i8] zeroinitializer, align 4 |
17 @u64v = global [8 x i8] zeroinitializer, align 8 | 17 @u64v = internal global [8 x i8] zeroinitializer, align 8 |
18 | 18 |
19 define void @from_int8() { | 19 define void @from_int8() { |
20 entry: | 20 entry: |
21 %__0 = bitcast [1 x i8]* @i8v to i8* | 21 %__0 = bitcast [1 x i8]* @i8v to i8* |
22 %v0 = load i8* %__0, align 1 | 22 %v0 = load i8* %__0, align 1 |
23 %v1 = sext i8 %v0 to i16 | 23 %v1 = sext i8 %v0 to i16 |
24 %__3 = bitcast [2 x i8]* @i16v to i16* | 24 %__3 = bitcast [2 x i8]* @i16v to i16* |
25 store i16 %v1, i16* %__3, align 1 | 25 store i16 %v1, i16* %__3, align 1 |
26 %v2 = sext i8 %v0 to i32 | 26 %v2 = sext i8 %v0 to i32 |
27 %__5 = bitcast [4 x i8]* @i32v to i32* | 27 %__5 = bitcast [4 x i8]* @i32v to i32* |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 ret void | 195 ret void |
196 } | 196 } |
197 ; CHECK: from_uint64: | 197 ; CHECK: from_uint64: |
198 ; CHECK: u64v | 198 ; CHECK: u64v |
199 ; CHECK: i8v | 199 ; CHECK: i8v |
200 ; CHECK: i16v | 200 ; CHECK: i16v |
201 ; CHECK: i32v | 201 ; CHECK: i32v |
202 | 202 |
203 ; ERRORS-NOT: ICE translation error | 203 ; ERRORS-NOT: ICE translation error |
204 ; DUMP-NOT: SZ | 204 ; DUMP-NOT: SZ |
OLD | NEW |