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