Skip to content

Commit 0d6076e

Browse files
committed
[H2BLB][ISel] Add extractelement test
NFC
1 parent edbb550 commit 0d6076e

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2+
; RUN: llc -mtriple h2blb -o - %s -global-isel=1 -global-isel-abort=1 -verify-machineinstrs | FileCheck %s
3+
4+
define i16 @extractVecEltLow(<2 x i16> %a) {
5+
; CHECK-LABEL: extractVecEltLow:
6+
; CHECK: # %bb.0:
7+
; CHECK-NEXT: mov16 r1, r2
8+
; CHECK-NEXT: ret
9+
%res = extractelement <2 x i16> %a, i16 0
10+
ret i16 %res
11+
}
12+
13+
define i16 @extractVecEltHigh(<2 x i16> %a) {
14+
; CHECK-LABEL: extractVecEltHigh:
15+
; CHECK: # %bb.0:
16+
; CHECK-NEXT: mov16 r1, r3
17+
; CHECK-NEXT: ret
18+
%res = extractelement <2 x i16> %a, i16 1
19+
ret i16 %res
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2+
; RUN: llc -mtriple h2blb -o - %s -fast-isel=0 -verify-machineinstrs | FileCheck %s
3+
4+
define i16 @extractVecEltLow(<2 x i16> %a) {
5+
; CHECK-LABEL: extractVecEltLow:
6+
; CHECK: # %bb.0:
7+
; CHECK-NEXT: mov16 r1, r2
8+
; CHECK-NEXT: ret
9+
%res = extractelement <2 x i16> %a, i16 0
10+
ret i16 %res
11+
}
12+
13+
define i16 @extractVecEltHigh(<2 x i16> %a) {
14+
; CHECK-LABEL: extractVecEltHigh:
15+
; CHECK: # %bb.0:
16+
; CHECK-NEXT: mov16 r1, r3
17+
; CHECK-NEXT: ret
18+
%res = extractelement <2 x i16> %a, i16 1
19+
ret i16 %res
20+
}

0 commit comments

Comments
 (0)