aix-external-sym-sdnode-lowering.ll
2.8 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
; RUN: llc -mcpu=pwr4 -mattr=-altivec -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff \
; RUN: -stop-after=machine-cp < %s | FileCheck \
; RUN: --check-prefix=32BIT %s
; RUN: llc -mcpu=pwr4 -mattr=-altivec -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff \
; RUN: -stop-after=machine-cp < %s | FileCheck \
; RUN: --check-prefix=64BIT %s
define i64 @call_divdi3(i64 %p, i64 %num) {
entry:
%div = sdiv i64 %p, %num
ret i64 %div
}
; 32BIT: BL_NOP <mcsymbol .__divdi3>
define i64 @call_fixunsdfdi(double %p) {
entry:
%conv = fptoui double %p to i64
ret i64 %conv
}
; 32BIT: BL_NOP <mcsymbol .__fixunsdfdi>
define double @call_floatundidf(i64 %p) {
entry:
%conv = uitofp i64 %p to double
ret double %conv
}
; 32BIT: BL_NOP <mcsymbol .__floatundidf>
define float @call_floatundisf(i64 %p) {
entry:
%conv = uitofp i64 %p to float
ret float %conv
}
; 32BIT: BL_NOP <mcsymbol .__floatundisf>
define i64 @call_moddi3(i64 %p, i64 %num) {
entry:
%rem = srem i64 %p, %num
ret i64 %rem
}
; 32BIT: BL_NOP <mcsymbol .__moddi3>
define i64 @call_udivdi3(i64 %p, i64 %q) {
%1 = udiv i64 %p, %q
ret i64 %1
}
; 32BIT: BL_NOP <mcsymbol .__udivdi3>
define i64 @call_umoddi3(i64 %p, i64 %num) {
entry:
%rem = urem i64 %p, %num
ret i64 %rem
}
; 32BIT: BL_NOP <mcsymbol .__umoddi3>
define double @call_ceil(double %n) {
entry:
%0 = call double @llvm.ceil.f64(double %n)
ret double %0
}
declare double @llvm.ceil.f64(double)
; 32BIT: BL_NOP <mcsymbol .ceil>
; 64BIT: BL8_NOP <mcsymbol .ceil>
define double @call_floor(double %n) {
entry:
%0 = call double @llvm.floor.f64(double %n)
ret double %0
}
declare double @llvm.floor.f64(double)
; 32BIT: BL_NOP <mcsymbol .floor>
; 64BIT: BL8_NOP <mcsymbol .floor>
define void @call_memcpy(i8* %p, i8* %q, i32 %n) {
entry:
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %p, i8* %q, i32 %n, i1 false)
ret void
}
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture writeonly, i8* nocapture readonly, i32, i1)
; 32BIT: BL_NOP <mcsymbol .memcpy>
; 64BIT: BL8_NOP <mcsymbol .memcpy>
define void @call_memmove(i8* %p, i8* %q, i32 %n) {
entry:
call void @llvm.memmove.p0i8.p0i8.i32(i8* %p, i8* %q, i32 %n, i1 false)
ret void
}
declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly, i32, i1)
; 32BIT: BL_NOP <mcsymbol .memmove>
; 64BIT: BL8_NOP <mcsymbol .memmove>
define void @call_memset(i8* %p, i8 %q, i32 %n) #0 {
entry:
call void @llvm.memset.p0i8.i32(i8* %p, i8 %q, i32 %n, i1 false)
ret void
}
declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i1)
; 32BIT: BL_NOP <mcsymbol .memset>
; 64BIT: BL8_NOP <mcsymbol .memset>
define double @call_round(double %n) {
entry:
%0 = call double @llvm.round.f64(double %n)
ret double %0
}
declare double @llvm.round.f64(double)
; 32BIT: BL_NOP <mcsymbol .round>
; 64BIT: BL8_NOP <mcsymbol .round>