1 ; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -mattr=+vsx -mcpu=pwr8 < %s | \
2 ; RUN: FileCheck %s --implicit-check-not lxvd2x --implicit-check-not lfs
3 ; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -mattr=-altivec -mcpu=pwr8 -mattr=-vsx < %s | \
4 ; RUN: FileCheck %s --check-prefix=CHECK-NVSXALT --implicit-check-not xxlxor \
5 ; RUN: --implicit-check-not vxor
7 define signext i32 @t1(float %x) local_unnamed_addr #0 {
9 %cmp = fcmp ogt float %x, 0.000000e+00
10 %tmp = select i1 %cmp, i32 43, i32 11
14 ; CHECK: xxlxor [[REG1:[0-9]+]], [[REG1]], [[REG1]]
15 ; CHECK: fcmpu {{[0-9]+}}, {{[0-9]+}}, [[REG1]]
17 ; CHECK-NVSXALT: lfs [[REG1:[0-9]+]]
18 ; CHECK-NVSXALT: fcmpu {{[0-9]+}}, {{[0-9]+}}, [[REG1]]
22 define signext i32 @t2(double %x) local_unnamed_addr #0 {
24 %cmp = fcmp ogt double %x, 0.000000e+00
25 %tmp = select i1 %cmp, i32 43, i32 11
29 ; CHECK: xxlxor [[REG2:[0-9]+]], [[REG2]], [[REG2]]
30 ; CHECK: xscmpudp {{[0-9]+}}, {{[0-9]+}}, [[REG2]]
32 ; CHECK-NVSXALT: lfs [[REG2:[0-9]+]]
33 ; CHECK-NVSXALT: fcmpu {{[0-9]+}}, {{[0-9]+}}, [[REG2]]
37 define signext i32 @t3(ppc_fp128 %x) local_unnamed_addr #0 {
39 %cmp = fcmp ogt ppc_fp128 %x, 0xM00000000000000000000000000000000
40 %tmp = select i1 %cmp, i32 43, i32 11
44 ; CHECK: xxlxor [[REG3:[0-9]+]], [[REG3]], [[REG3]]
45 ; CHECK: fcmpu {{[0-9]+}}, {{[0-9]+}}, [[REG3]]
46 ; CHECK: fcmpu {{[0-9]+}}, {{[0-9]+}}, [[REG3]]
48 ; CHECK-NVSXALT: lfs [[REG3:[0-9]+]]
49 ; CHECK-NVSXALT: fcmpu {{[0-9]+}}, {{[0-9]+}}, [[REG3]]
53 define <2 x double> @t4() local_unnamed_addr #0 {
54 ret <2 x double> zeroinitializer
56 ; CHECK: xxlxor [[REG4:[0-9]+]], [[REG4]], [[REG4]]
58 ; CHECK-NVSXALT: lfs [[REG4:[0-9]+]]
59 ; CHECK-NVSXALT: fmr {{[0-9]+}}, [[REG4:[0-9]+]]
63 define <2 x i64> @t5() local_unnamed_addr #0 {
64 ret <2 x i64> zeroinitializer
66 ; CHECK: xxlxor [[REG5:[0-9]+]], [[REG5]], [[REG5]]
68 ; CHECK-NVSXALT: li 3, 0
69 ; CHECK-NVSXALT-NEXT: li 4, 0
70 ; CHECK-NVSXALT-NEXT: blr