| 1 |
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 |
| 2 |
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \ |
| 3 |
; RUN: -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr -mcpu=future < %s | \ |
| 4 |
; RUN: FileCheck %s |
| 5 |
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff \ |
| 6 |
; RUN: -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr -mcpu=future < %s | \ |
| 7 |
; RUN: FileCheck %s --check-prefix=AIX |
| 8 |
|
| 9 |
; Test for load/store to/from v4i32. |
| 10 |
|
| 11 |
define <4 x i32> @testLXVRL(ptr %a, i64 %b) { |
| 12 |
; CHECK-LABEL: testLXVRL: |
| 13 |
; CHECK: # %bb.0: # %entry |
| 14 |
; CHECK-NEXT: lxvrl v2, r3, r4 |
| 15 |
; CHECK-NEXT: blr |
| 16 |
; |
| 17 |
; AIX-LABEL: testLXVRL: |
| 18 |
; AIX: # %bb.0: # %entry |
| 19 |
; AIX-NEXT: lxvrl v2, r3, r4 |
| 20 |
; AIX-NEXT: blr |
| 21 |
entry: |
| 22 |
%0 = tail call <4 x i32> @llvm.ppc.vsx.lxvrl(ptr %a, i64 %b) |
| 23 |
ret <4 x i32> %0 |
| 24 |
} |
| 25 |
declare <4 x i32> @llvm.ppc.vsx.lxvrl(ptr, i64) |
| 26 |
|
| 27 |
define <4 x i32> @testLXVRLL(ptr %a, i64 %b) { |
| 28 |
; CHECK-LABEL: testLXVRLL: |
| 29 |
; CHECK: # %bb.0: # %entry |
| 30 |
; CHECK-NEXT: lxvrll v2, r3, r4 |
| 31 |
; CHECK-NEXT: blr |
| 32 |
; |
| 33 |
; AIX-LABEL: testLXVRLL: |
| 34 |
; AIX: # %bb.0: # %entry |
| 35 |
; AIX-NEXT: lxvrll v2, r3, r4 |
| 36 |
; AIX-NEXT: blr |
| 37 |
entry: |
| 38 |
%0 = tail call <4 x i32> @llvm.ppc.vsx.lxvrll(ptr %a, i64 %b) |
| 39 |
ret <4 x i32> %0 |
| 40 |
} |
| 41 |
declare <4 x i32> @llvm.ppc.vsx.lxvrll(ptr, i64) |
| 42 |
|
| 43 |
define void @testSTXVRL(<4 x i32> %a, ptr %b, i64 %c) { |
| 44 |
; CHECK-LABEL: testSTXVRL: |
| 45 |
; CHECK: # %bb.0: # %entry |
| 46 |
; CHECK-NEXT: stxvrl v2, r5, r6 |
| 47 |
; CHECK-NEXT: blr |
| 48 |
; |
| 49 |
; AIX-LABEL: testSTXVRL: |
| 50 |
; AIX: # %bb.0: # %entry |
| 51 |
; AIX-NEXT: stxvrl v2, r3, r4 |
| 52 |
; AIX-NEXT: blr |
| 53 |
entry: |
| 54 |
tail call void @llvm.ppc.vsx.stxvrl(<4 x i32> %a, ptr %b, i64 %c) |
| 55 |
ret void |
| 56 |
} |
| 57 |
declare void @llvm.ppc.vsx.stxvrl(<4 x i32>, ptr, i64) |
| 58 |
|
| 59 |
define void @testSTXVRLL(<4 x i32> %a, ptr %b, i64 %c) { |
| 60 |
; CHECK-LABEL: testSTXVRLL: |
| 61 |
; CHECK: # %bb.0: # %entry |
| 62 |
; CHECK-NEXT: stxvrll v2, r5, r6 |
| 63 |
; CHECK-NEXT: blr |
| 64 |
; |
| 65 |
; AIX-LABEL: testSTXVRLL: |
| 66 |
; AIX: # %bb.0: # %entry |
| 67 |
; AIX-NEXT: stxvrll v2, r3, r4 |
| 68 |
; AIX-NEXT: blr |
| 69 |
entry: |
| 70 |
tail call void @llvm.ppc.vsx.stxvrll(<4 x i32> %a, ptr %b, i64 %c) |
| 71 |
ret void |
| 72 |
} |
| 73 |
declare void @llvm.ppc.vsx.stxvrll(<4 x i32>, ptr, i64) |
| 74 |
|
| 75 |
; Test for load/store vectore pair. |
| 76 |
|
| 77 |
define <256 x i1> @testLXVPRL(ptr %vpp, i64 %b) { |
| 78 |
; CHECK-LABEL: testLXVPRL: |
| 79 |
; CHECK: # %bb.0: # %entry |
| 80 |
; CHECK-NEXT: lxvprl vsp34, r4, r5 |
| 81 |
; CHECK-NEXT: stxv v2, 16(r3) |
| 82 |
; CHECK-NEXT: stxv v3, 0(r3) |
| 83 |
; CHECK-NEXT: blr |
| 84 |
; |
| 85 |
; AIX-LABEL: testLXVPRL: |
| 86 |
; AIX: # %bb.0: # %entry |
| 87 |
; AIX-NEXT: lxvprl vsp34, r4, r5 |
| 88 |
; AIX-NEXT: stxv v3, 16(r3) |
| 89 |
; AIX-NEXT: stxv v2, 0(r3) |
| 90 |
; AIX-NEXT: blr |
| 91 |
entry: |
| 92 |
%0 = tail call <256 x i1> @llvm.ppc.vsx.lxvprl(ptr %vpp, i64 %b) |
| 93 |
ret <256 x i1> %0 |
| 94 |
} |
| 95 |
declare <256 x i1> @llvm.ppc.vsx.lxvprl(ptr, i64) |
| 96 |
|
| 97 |
define <256 x i1> @testLXVPRLL(ptr %vpp, i64 %b) { |
| 98 |
; CHECK-LABEL: testLXVPRLL: |
| 99 |
; CHECK: # %bb.0: # %entry |
| 100 |
; CHECK-NEXT: lxvprll vsp34, r4, r5 |
| 101 |
; CHECK-NEXT: stxv v2, 16(r3) |
| 102 |
; CHECK-NEXT: stxv v3, 0(r3) |
| 103 |
; CHECK-NEXT: blr |
| 104 |
; |
| 105 |
; AIX-LABEL: testLXVPRLL: |
| 106 |
; AIX: # %bb.0: # %entry |
| 107 |
; AIX-NEXT: lxvprll vsp34, r4, r5 |
| 108 |
; AIX-NEXT: stxv v3, 16(r3) |
| 109 |
; AIX-NEXT: stxv v2, 0(r3) |
| 110 |
; AIX-NEXT: blr |
| 111 |
entry: |
| 112 |
%0 = tail call <256 x i1> @llvm.ppc.vsx.lxvprll(ptr %vpp, i64 %b) |
| 113 |
ret <256 x i1> %0 |
| 114 |
} |
| 115 |
declare <256 x i1> @llvm.ppc.vsx.lxvprll(ptr, i64) |
| 116 |
|
| 117 |
define void @testSTXVPRL(ptr %v, ptr %vp, i64 %len) { |
| 118 |
; CHECK-LABEL: testSTXVPRL: |
| 119 |
; CHECK: # %bb.0: # %entry |
| 120 |
; CHECK-NEXT: lxv v2, 16(r3) |
| 121 |
; CHECK-NEXT: lxv v3, 0(r3) |
| 122 |
; CHECK-NEXT: stxvprl vsp34, r4, r5 |
| 123 |
; CHECK-NEXT: blr |
| 124 |
; |
| 125 |
; AIX-LABEL: testSTXVPRL: |
| 126 |
; AIX: # %bb.0: # %entry |
| 127 |
; AIX-NEXT: lxv v2, 0(r3) |
| 128 |
; AIX-NEXT: lxv v3, 16(r3) |
| 129 |
; AIX-NEXT: stxvprl vsp34, r4, r5 |
| 130 |
; AIX-NEXT: blr |
| 131 |
entry: |
| 132 |
%0 = load <256 x i1>, ptr %v, align 32 |
| 133 |
tail call void @llvm.ppc.vsx.stxvprl(<256 x i1> %0, ptr %vp, i64 %len) |
| 134 |
ret void |
| 135 |
} |
| 136 |
declare void @llvm.ppc.vsx.stxvprl(<256 x i1>, ptr, i64) |
| 137 |
|
| 138 |
define void @testSTXVPRLL(ptr %v, ptr %vp, i64 %len) { |
| 139 |
; CHECK-LABEL: testSTXVPRLL: |
| 140 |
; CHECK: # %bb.0: # %entry |
| 141 |
; CHECK-NEXT: lxv v2, 16(r3) |
| 142 |
; CHECK-NEXT: lxv v3, 0(r3) |
| 143 |
; CHECK-NEXT: stxvprll vsp34, r4, r5 |
| 144 |
; CHECK-NEXT: blr |
| 145 |
; |
| 146 |
; AIX-LABEL: testSTXVPRLL: |
| 147 |
; AIX: # %bb.0: # %entry |
| 148 |
; AIX-NEXT: lxv v2, 0(r3) |
| 149 |
; AIX-NEXT: lxv v3, 16(r3) |
| 150 |
; AIX-NEXT: stxvprll vsp34, r4, r5 |
| 151 |
; AIX-NEXT: blr |
| 152 |
entry: |
| 153 |
%0 = load <256 x i1>, ptr %v, align 32 |
| 154 |
tail call void @llvm.ppc.vsx.stxvprll(<256 x i1> %0, ptr %vp, i64 %len) |
| 155 |
ret void |
| 156 |
} |
| 157 |
declare void @llvm.ppc.vsx.stxvprll(<256 x i1>, ptr, i64) |