Debian Codegraph @

llvm/test/CodeGen/PowerPC/llround-conv.ll

raw
1 ; RUN: llc < %s -mtriple=powerpc64le | FileCheck %s
2
3 ; CHECK-LABEL: testmsws:
4 ; CHECK: bl llroundf
5 define signext i32 @testmsws(float %x) {
6 entry:
7 %0 = tail call i64 @llvm.llround.f32(float %x)
8 %conv = trunc i64 %0 to i32
9 ret i32 %conv
10 }
11
12 ; CHECK-LABEL: testmsxs:
13 ; CHECK: bl llroundf
14 define i64 @testmsxs(float %x) {
15 entry:
16 %0 = tail call i64 @llvm.llround.f32(float %x)
17 ret i64 %0
18 }
19
20 ; CHECK-LABEL: testmswd:
21 ; CHECK: bl llround
22 define signext i32 @testmswd(double %x) {
23 entry:
24 %0 = tail call i64 @llvm.llround.f64(double %x)
25 %conv = trunc i64 %0 to i32
26 ret i32 %conv
27 }
28
29 ; CHECK-LABEL: testmsxd:
30 ; CHECK: bl llround
31 define i64 @testmsxd(double %x) {
32 entry:
33 %0 = tail call i64 @llvm.llround.f64(double %x)
34 ret i64 %0
35 }
36
37 ; CHECK-LABEL: testmswl:
38 ; CHECK: bl llroundl
39 define signext i32 @testmswl(ppc_fp128 %x) {
40 entry:
41 %0 = tail call i64 @llvm.llround.ppcf128(ppc_fp128 %x)
42 %conv = trunc i64 %0 to i32
43 ret i32 %conv
44 }
45
46 ; CHECK-LABEL: testmsll:
47 ; CHECK: bl llroundl
48 define i64 @testmsll(ppc_fp128 %x) {
49 entry:
50 %0 = tail call i64 @llvm.llround.ppcf128(ppc_fp128 %x)
51 ret i64 %0
52 }
53
54 declare i64 @llvm.llround.f32(float) nounwind readnone
55 declare i64 @llvm.llround.f64(double) nounwind readnone
56 declare i64 @llvm.llround.ppcf128(ppc_fp128) nounwind readnone