1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu \
2 ; RUN: -mcpu=a2 | FileCheck %s
3 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu \
4 ; RUN: -mcpu=pwr7 -mattr=+vsx | FileCheck -check-prefix=CHECK-VSX %s
5 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu \
6 ; RUN: -mcpu=pwr9 -mattr=-direct-move | FileCheck %s -check-prefix=CHECK-P9
7 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"
8 target triple = "powerpc64-unknown-linux-gnu"
10 define float @foo(i64 %a) nounwind {
12 %x = sitofp i64 %a to float
17 ; CHECK: lfd [[REG:[0-9]+]],
18 ; CHECK: fcfids 1, [[REG]]
23 ; CHECK-VSX: lfd [[REG:[0-9]+]],
24 ; CHECK-VSX: fcfids 1, [[REG]]
29 ; CHECK-P9: lfd [[REG:[0-9]+]],
30 ; CHECK-P9: xscvsxdsp 1, [[REG]]
34 define double @goo(i64 %a) nounwind {
36 %x = sitofp i64 %a to double
41 ; CHECK: lfd [[REG:[0-9]+]],
42 ; CHECK: fcfid 1, [[REG]]
47 ; CHECK-VSX: lfd [[REG:[0-9]+]],
48 ; CHECK-VSX: xscvsxddp 1, [[REG]]
53 ; CHECK-P9: lfd [[REG:[0-9]+]],
54 ; CHECK-P9: xscvsxddp 1, [[REG]]
58 define float @foou(i64 %a) nounwind {
60 %x = uitofp i64 %a to float
65 ; CHECK: lfd [[REG:[0-9]+]],
66 ; CHECK: fcfidus 1, [[REG]]
71 ; CHECK-VSX: lfd [[REG:[0-9]+]],
72 ; CHECK-VSX: fcfidus 1, [[REG]]
77 ; CHECK-P9: lfd [[REG:[0-9]+]],
78 ; CHECK-P9: xscvuxdsp 1, [[REG]]
82 define double @goou(i64 %a) nounwind {
84 %x = uitofp i64 %a to double
89 ; CHECK: lfd [[REG:[0-9]+]],
90 ; CHECK: fcfidu 1, [[REG]]
95 ; CHECK-VSX: lfd [[REG:[0-9]+]],
96 ; CHECK-VSX: xscvuxddp 1, [[REG]]
101 ; CHECK-P9: lfd [[REG:[0-9]+]],
102 ; CHECK-P9: xscvuxddp 1, [[REG]]