blob: 6ae9aa51202fd839ebaf39ccac70f43ca3f71991 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
; RUN: llc < %s -march=cellspu | FileCheck %s
; ModuleID = 'sext128.bc'
target datalayout = "E-p:32:32:128-i1:8:128-i8:8:128-i16:16:128-i32:32:128-i64:32:128-f32:32:128-f64:64:128-v64:128:128-v128:128:128-a0:0:128-s0:128:128"
target triple = "spu"
define i128 @sext_i64_i128(i64 %a) {
entry:
%0 = sext i64 %a to i128
ret i128 %0
; CHECK: long 269488144
; CHECK: long 269488144
; CHECK: long 66051
; CHECK: long 67438087
; CHECK-NOT: rotqmbyi
; CHECK: lqa
; CHECK: rotmai
; CHECK: shufb
}
define i128 @sext_i32_i128(i32 %a) {
entry:
%0 = sext i32 %a to i128
ret i128 %0
; CHECK: long 269488144
; CHECK: long 269488144
; CHECK: long 269488144
; CHECK: long 66051
; CHECK-NOT: rotqmbyi
; CHECK: lqa
; CHECK: rotmai
; CHECK: shufb
}
define i128 @sext_i32_i128a(float %a) {
entry:
%0 = call i32 @myfunc(float %a)
%1 = sext i32 %0 to i128
ret i128 %1
; CHECK: long 269488144
; CHECK: long 269488144
; CHECK: long 269488144
; CHECK: long 66051
; CHECK-NOT: rotqmbyi
; CHECK: lqa
; CHECK: rotmai
; CHECK: shufb
}
declare i32 @myfunc(float)
define i128 @func1(i8 %u) {
entry:
; CHECK: xsbh
; CHECK: xshw
; CHECK: rotmai
; CHECK: shufb
; CHECK: bi $lr
%0 = sext i8 %u to i128
ret i128 %0
}
define i128 @func2(i16 %u) {
entry:
; CHECK: xshw
; CHECK: rotmai
; CHECK: shufb
; CHECK: bi $lr
%0 = sext i16 %u to i128
ret i128 %0
}
|