1 ; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mtriple=powerpc64-unknown-unknown < %s | FileCheck %s
2 ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple=powerpc64le-unknown-unknown < %s | FileCheck %s \
3 ; RUN: --check-prefix=CHECK-P7
4 ; RUN: llc -verify-machineinstrs -mcpu=pwr9 -mtriple=powerpc64-unknown-unknown < %s | FileCheck %s
6 define signext i32 @f32toi32(float %a) {
8 %0 = bitcast float %a to i32
12 ; CHECK: xscvdpspn [[CONVREG:[0-9]+]], 1
14 ; CHECK: mffprwz 3, [[CONVREG]]
17 define i64 @f64toi64(double %a) {
19 %0 = bitcast double %a to i64
26 define float @i32tof32(i32 signext %a) {
28 %0 = bitcast i32 %a to float
32 ; CHECK: mtfprd [[MOVEREG:[0-9]+]], 3
33 ; CHECK: xxsldwi [[SHIFTREG:[0-9]+]], [[MOVEREG]], [[MOVEREG]], 1
34 ; CHECK: xscvspdpn 1, [[SHIFTREG]]
37 define double @i64tof64(i64 %a) {
39 %0 = bitcast i64 %a to double
46 define zeroext i32 @f32toi32u(float %a) {
48 %0 = bitcast float %a to i32
52 ; CHECK: xscvdpspn [[CONVREG:[0-9]+]], 1
54 ; CHECK: mffprwz 3, [[CONVREG]]
57 define i64 @f64toi64u(double %a) {
59 %0 = bitcast double %a to i64
66 define float @i32utof32(i32 zeroext %a) {
68 %0 = bitcast i32 %a to float
72 ; CHECK: mtfprd [[MOVEREG:[0-9]+]], 3
73 ; CHECK: xxsldwi [[SHIFTREG:[0-9]+]], [[MOVEREG]], [[MOVEREG]], 1
74 ; CHECK: xscvspdpn 1, [[SHIFTREG]]
77 define double @i64utof64(i64 %a) {
79 %0 = bitcast i64 %a to double