1 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=-vsx < %s | FileCheck %s
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=+vsx < %s | FileCheck -check-prefix=CHECK-VSX %s
3 target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
4 target triple = "powerpc64-unknown-linux-gnu"
6 define float @test1(float %x) nounwind {
7 %call = tail call float @floorf(float %x) nounwind readnone
12 ; CHECK-VSX-LABEL: test1:
13 ; CHECK-VSX: xsrdpim 1, 1
16 declare float @floorf(float) nounwind readnone
18 define double @test2(double %x) nounwind {
19 %call = tail call double @floor(double %x) nounwind readnone
24 ; CHECK-VSX-LABEL: test2:
25 ; CHECK-VSX: xsrdpim 1, 1
28 declare double @floor(double) nounwind readnone
30 define float @test3(float %x) nounwind {
31 %call = tail call float @roundf(float %x) nounwind readnone
36 ; CHECK-VSX-LABEL: test3:
37 ; CHECK-VSX: xsrdpi 1, 1
40 declare float @roundf(float) nounwind readnone
42 define double @test4(double %x) nounwind {
43 %call = tail call double @round(double %x) nounwind readnone
48 ; CHECK-VSX-LABEL: test4:
49 ; CHECK-VSX: xsrdpi 1, 1
52 declare double @round(double) nounwind readnone
54 define float @test5(float %x) nounwind {
55 %call = tail call float @ceilf(float %x) nounwind readnone
60 ; CHECK-VSX-LABEL: test5:
61 ; CHECK-VSX: xsrdpip 1, 1
64 declare float @ceilf(float) nounwind readnone
66 define double @test6(double %x) nounwind {
67 %call = tail call double @ceil(double %x) nounwind readnone
72 ; CHECK-VSX-LABEL: test6:
73 ; CHECK-VSX: xsrdpip 1, 1
76 declare double @ceil(double) nounwind readnone
78 define float @test9(float %x) nounwind {
79 %call = tail call float @truncf(float %x) nounwind readnone
84 ; CHECK-VSX-LABEL: test9:
85 ; CHECK-VSX: xsrdpiz 1, 1
88 declare float @truncf(float) nounwind readnone
90 define double @test10(double %x) nounwind {
91 %call = tail call double @trunc(double %x) nounwind readnone
94 ; CHECK-LABEL: test10:
96 ; CHECK-VSX-LABEL: test10:
97 ; CHECK-VSX: xsrdpiz 1, 1
100 declare double @trunc(double) nounwind readnone