1 ; RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown \
2 ; RUN: -enable-ppc-quad-precision -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 \
5 ; RUN: -enable-ppc-quad-precision -verify-machineinstrs \
6 ; RUN: -ppc-asm-full-reg-names \
7 ; RUN: -ppc-vsr-nums-as-vr < %s | FileCheck %s --check-prefix=CHECK-BE
9 ; Function Attrs: norecurse nounwind readnone
10 define i64 @getPart1(fp128 %in) local_unnamed_addr {
12 %0 = bitcast fp128 %in to i128
13 %a.sroa.0.0.extract.trunc = trunc i128 %0 to i64
14 ret i64 %a.sroa.0.0.extract.trunc
15 ; CHECK-LABEL: getPart1
16 ; CHECK: mfvsrld r3, v2
18 ; CHECK-BE-LABEL: getPart1
19 ; CHECK-BE: mfvsrld r3, v2
23 ; Function Attrs: norecurse nounwind readnone
24 define i64 @getPart2(fp128 %in) local_unnamed_addr {
26 %0 = bitcast fp128 %in to i128
27 %a.sroa.0.8.extract.shift = lshr i128 %0, 64
28 %a.sroa.0.8.extract.trunc = trunc i128 %a.sroa.0.8.extract.shift to i64
29 ret i64 %a.sroa.0.8.extract.trunc
30 ; CHECK-LABEL: getPart2
31 ; CHECK: mfvsrd r3, v2
33 ; CHECK-BE-LABEL: getPart2
34 ; CHECK-BE: mfvsrd r3, v2
38 ; Function Attrs: norecurse nounwind readnone
39 define i64 @checkBitcast(fp128 %in, <2 x i64> %in2, <2 x i64> *%out) local_unnamed_addr {
41 %0 = bitcast fp128 %in to <2 x i64>
42 %1 = extractelement <2 x i64> %0, i64 0
43 %2 = add <2 x i64> %0, %in2
44 store <2 x i64> %2, <2 x i64> *%out, align 16
46 ; CHECK-LABEL: checkBitcast
47 ; CHECK: mfvsrld r3, v2
49 ; CHECK-BE-LABEL: checkBitcast
50 ; CHECK-BE: mfvsrd r3, v2