1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mtriple=powerpc64le-unknown-linux-gnu -mattr=+power8-vector < %s | FileCheck %s
4 define void @VPKUDUM_unary(ptr %A) {
5 ; CHECK-LABEL: VPKUDUM_unary:
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: lxvd2x 0, 0, 3
8 ; CHECK-NEXT: xxswapd 34, 0
9 ; CHECK-NEXT: vpkudum 2, 2, 2
10 ; CHECK-NEXT: xxswapd 0, 34
11 ; CHECK-NEXT: stxvd2x 0, 0, 3
14 %tmp = load <2 x i64>, ptr %A
15 %tmp2 = bitcast <2 x i64> %tmp to <4 x i32>
16 %tmp3 = extractelement <4 x i32> %tmp2, i32 0
17 %tmp4 = extractelement <4 x i32> %tmp2, i32 2
18 %tmp5 = insertelement <4 x i32> undef, i32 %tmp3, i32 0
19 %tmp6 = insertelement <4 x i32> %tmp5, i32 %tmp4, i32 1
20 %tmp7 = insertelement <4 x i32> %tmp6, i32 %tmp3, i32 2
21 %tmp8 = insertelement <4 x i32> %tmp7, i32 %tmp4, i32 3
22 %tmp9 = bitcast <4 x i32> %tmp8 to <2 x i64>
23 store <2 x i64> %tmp9, ptr %A
27 define void @VPKUDUM(ptr %A, ptr %B) {
28 ; CHECK-LABEL: VPKUDUM:
29 ; CHECK: # %bb.0: # %entry
30 ; CHECK-NEXT: lxvd2x 0, 0, 3
31 ; CHECK-NEXT: lxvd2x 1, 0, 4
32 ; CHECK-NEXT: xxswapd 34, 0
33 ; CHECK-NEXT: xxswapd 35, 1
34 ; CHECK-NEXT: vpkudum 2, 3, 2
35 ; CHECK-NEXT: xxswapd 0, 34
36 ; CHECK-NEXT: stxvd2x 0, 0, 3
39 %tmp = load <2 x i64>, ptr %A
40 %tmp2 = bitcast <2 x i64> %tmp to <4 x i32>
41 %tmp3 = load <2 x i64>, ptr %B
42 %tmp4 = bitcast <2 x i64> %tmp3 to <4 x i32>
43 %tmp5 = extractelement <4 x i32> %tmp2, i32 0
44 %tmp6 = extractelement <4 x i32> %tmp2, i32 2
45 %tmp7 = extractelement <4 x i32> %tmp4, i32 0
46 %tmp8 = extractelement <4 x i32> %tmp4, i32 2
47 %tmp9 = insertelement <4 x i32> undef, i32 %tmp5, i32 0
48 %tmp10 = insertelement <4 x i32> %tmp9, i32 %tmp6, i32 1
49 %tmp11 = insertelement <4 x i32> %tmp10, i32 %tmp7, i32 2
50 %tmp12 = insertelement <4 x i32> %tmp11, i32 %tmp8, i32 3
51 %tmp13 = bitcast <4 x i32> %tmp12 to <2 x i64>
52 store <2 x i64> %tmp13, ptr %A