1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=a2q | FileCheck %s
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=a2q -enable-unsafe-fp-math | FileCheck -check-prefix=CHECK-FM %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 <4 x float> @test1(<4 x float> %x) nounwind {
7 %call = tail call <4 x float> @llvm.floor.v4f32(<4 x float> %x) nounwind readnone
14 ; CHECK-FM: qvfrim 1, 1
17 declare <4 x float> @llvm.floor.v4f32(<4 x float>) nounwind readnone
19 define <4 x double> @test2(<4 x double> %x) nounwind {
20 %call = tail call <4 x double> @llvm.floor.v4f64(<4 x double> %x) nounwind readnone
21 ret <4 x double> %call
27 ; CHECK-FM: qvfrim 1, 1
30 declare <4 x double> @llvm.floor.v4f64(<4 x double>) nounwind readnone
32 define <4 x float> @test3(<4 x float> %x) nounwind {
33 %call = tail call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %x) nounwind readnone
40 ; CHECK-FM-NOT: qvfrin
43 declare <4 x float> @llvm.nearbyint.v4f32(<4 x float>) nounwind readnone
45 define <4 x double> @test4(<4 x double> %x) nounwind {
46 %call = tail call <4 x double> @llvm.nearbyint.v4f64(<4 x double> %x) nounwind readnone
47 ret <4 x double> %call
53 ; CHECK-FM-NOT: qvfrin
56 declare <4 x double> @llvm.nearbyint.v4f64(<4 x double>) nounwind readnone
58 define <4 x float> @test5(<4 x float> %x) nounwind {
59 %call = tail call <4 x float> @llvm.ceil.v4f32(<4 x float> %x) nounwind readnone
66 ; CHECK-FM: qvfrip 1, 1
69 declare <4 x float> @llvm.ceil.v4f32(<4 x float>) nounwind readnone
71 define <4 x double> @test6(<4 x double> %x) nounwind {
72 %call = tail call <4 x double> @llvm.ceil.v4f64(<4 x double> %x) nounwind readnone
73 ret <4 x double> %call
79 ; CHECK-FM: qvfrip 1, 1
82 declare <4 x double> @llvm.ceil.v4f64(<4 x double>) nounwind readnone
84 define <4 x float> @test9(<4 x float> %x) nounwind {
85 %call = tail call <4 x float> @llvm.trunc.v4f32(<4 x float> %x) nounwind readnone
92 ; CHECK-FM: qvfriz 1, 1
95 declare <4 x float> @llvm.trunc.v4f32(<4 x float>) nounwind readnone
97 define <4 x double> @test10(<4 x double> %x) nounwind {
98 %call = tail call <4 x double> @llvm.trunc.v4f64(<4 x double> %x) nounwind readnone
99 ret <4 x double> %call
105 ; CHECK-FM: qvfriz 1, 1
108 declare <4 x double> @llvm.trunc.v4f64(<4 x double>) nounwind readnone