Skip to content

Commit 2488ea4

Browse files
author
QingShan Zhang
committed
[NFC][Test][PowerPC] Add one test to verify the behavior of vector
mul/add for v8i16
1 parent baa7817 commit 2488ea4

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2+
; RUN: llc -verify-machineinstrs -mcpu=pwr9 -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P9
3+
; RUN: llc -verify-machineinstrs -mcpu=pwr8 -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s --check-prefixes=CHECK,CHECK-P8
4+
define <8 x i16> @mul(<8 x i16> %m, <8 x i16> %n) {
5+
; CHECK-LABEL: mul:
6+
; CHECK: # %bb.0: # %entry
7+
; CHECK-NEXT: xxlxor 36, 36, 36
8+
; CHECK-NEXT: vmladduhm 2, 2, 3, 4
9+
; CHECK-NEXT: blr
10+
entry:
11+
%0 = mul <8 x i16> %m, %n
12+
ret <8 x i16> %0
13+
}
14+
15+
define <8 x i16> @madd(<8 x i16> %m, <8 x i16> %n, <8 x i16> %o) {
16+
; CHECK-LABEL: madd:
17+
; CHECK: # %bb.0: # %entry
18+
; CHECK-NEXT: xxlxor 37, 37, 37
19+
; CHECK-NEXT: vmladduhm 2, 2, 3, 5
20+
; CHECK-NEXT: vadduhm 2, 2, 4
21+
; CHECK-NEXT: blr
22+
entry:
23+
%0 = mul <8 x i16> %m, %n
24+
%1 = add <8 x i16> %0, %o
25+
ret <8 x i16> %1
26+
}

0 commit comments

Comments
 (0)