1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown -verify-machineinstrs \
3 ; RUN: -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | FileCheck %s
4 ; RUN: llc -mcpu=pwr9 -mtriple=powerpc64-unknown-unknown -verify-machineinstrs \
5 ; RUN: -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \
6 ; RUN: FileCheck %s --check-prefix=CHECK-BE
7 ; RUN: llc -mcpu=pwr8 -mtriple=powerpc64le-unknown-unknown -verify-machineinstrs \
8 ; RUN: -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | FileCheck %s \
9 ; RUN: -check-prefix=CHECK-P8
11 ; Function Attrs: norecurse nounwind readnone
12 define i64 @getPart1(fp128 %in) local_unnamed_addr {
13 ; CHECK-LABEL: getPart1:
14 ; CHECK: # %bb.0: # %entry
15 ; CHECK-NEXT: mfvsrld r3, v2
18 ; CHECK-BE-LABEL: getPart1:
19 ; CHECK-BE: # %bb.0: # %entry
20 ; CHECK-BE-NEXT: mfvsrld r3, v2
23 ; CHECK-P8-LABEL: getPart1:
24 ; CHECK-P8: # %bb.0: # %entry
25 ; CHECK-P8-NEXT: xxswapd vs0, v2
26 ; CHECK-P8-NEXT: mffprd r3, f0
29 %0 = bitcast fp128 %in to i128
30 %a.sroa.0.0.extract.trunc = trunc i128 %0 to i64
31 ret i64 %a.sroa.0.0.extract.trunc
34 ; Function Attrs: norecurse nounwind readnone
35 define i64 @getPart2(fp128 %in) local_unnamed_addr {
36 ; CHECK-LABEL: getPart2:
37 ; CHECK: # %bb.0: # %entry
38 ; CHECK-NEXT: mfvsrd r3, v2
41 ; CHECK-BE-LABEL: getPart2:
42 ; CHECK-BE: # %bb.0: # %entry
43 ; CHECK-BE-NEXT: mfvsrd r3, v2
46 ; CHECK-P8-LABEL: getPart2:
47 ; CHECK-P8: # %bb.0: # %entry
48 ; CHECK-P8-NEXT: mfvsrd r3, v2
51 %0 = bitcast fp128 %in to i128
52 %a.sroa.0.8.extract.shift = lshr i128 %0, 64
53 %a.sroa.0.8.extract.trunc = trunc i128 %a.sroa.0.8.extract.shift to i64
54 ret i64 %a.sroa.0.8.extract.trunc
57 ; Function Attrs: norecurse nounwind readnone
58 define i64 @checkBitcast(fp128 %in, <2 x i64> %in2, <2 x i64> *%out) local_unnamed_addr {
59 ; CHECK-LABEL: checkBitcast:
60 ; CHECK: # %bb.0: # %entry
61 ; CHECK-NEXT: mfvsrld r3, v2
62 ; CHECK-NEXT: vaddudm v2, v2, v3
63 ; CHECK-NEXT: stxv v2, 0(r7)
66 ; CHECK-BE-LABEL: checkBitcast:
67 ; CHECK-BE: # %bb.0: # %entry
68 ; CHECK-BE-NEXT: mfvsrd r3, v2
69 ; CHECK-BE-NEXT: vaddudm v2, v2, v3
70 ; CHECK-BE-NEXT: stxv v2, 0(r7)
73 ; CHECK-P8-LABEL: checkBitcast:
74 ; CHECK-P8: # %bb.0: # %entry
75 ; CHECK-P8-NEXT: xxswapd vs0, v2
76 ; CHECK-P8-NEXT: vaddudm v2, v2, v3
77 ; CHECK-P8-NEXT: mffprd r3, f0
78 ; CHECK-P8-NEXT: xxswapd vs0, v2
79 ; CHECK-P8-NEXT: stxvd2x vs0, 0, r7
82 %0 = bitcast fp128 %in to <2 x i64>
83 %1 = extractelement <2 x i64> %0, i64 0
84 %2 = add <2 x i64> %0, %in2
85 store <2 x i64> %2, <2 x i64> *%out, align 16