1 ; RUN: llc -march=hexagon < %s | FileCheck %s
3 ; CHECK-LABEL: test_00:
5 define <4 x i8> @test_00(<4 x i8> %a0) {
6 %p = shufflevector <4 x i8> %a0, <4 x i8> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
10 ; CHECK-LABEL: test_01:
11 ; CHECK: r0 = swiz(r0)
12 define <4 x i8> @test_01(<4 x i8> %a0) {
13 %p = shufflevector <4 x i8> %a0, <4 x i8> undef, <4 x i32> <i32 undef, i32 2, i32 1, i32 0>
17 ; CHECK-LABEL: test_02:
18 ; CHECK: r0 = swiz(r0)
19 define <4 x i8> @test_02(<4 x i8> %a0) {
20 %p = shufflevector <4 x i8> %a0, <4 x i8> undef, <4 x i32> <i32 3, i32 undef, i32 1, i32 0>
24 ; CHECK-LABEL: test_03:
25 ; CHECK: r0 = swiz(r0)
26 define <4 x i8> @test_03(<4 x i8> %a0) {
27 %p = shufflevector <4 x i8> %a0, <4 x i8> undef, <4 x i32> <i32 3, i32 2, i32 undef, i32 undef>
31 ; CHECK-LABEL: test_10:
32 ; CHECK: r0 = vtrunehb(r1:0)
33 define <4 x i8> @test_10(<4 x i8> %a0, <4 x i8> %a1) {
34 %p = shufflevector <4 x i8> %a0, <4 x i8> %a1, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
38 ; CHECK-LABEL: test_11:
39 ; CHECK: r0 = vtrunehb(r1:0)
40 define <4 x i8> @test_11(<4 x i8> %a0, <4 x i8> %a1) {
41 %p = shufflevector <4 x i8> %a0, <4 x i8> %a1, <4 x i32> <i32 undef, i32 2, i32 4, i32 undef>
45 ; CHECK-LABEL: test_12:
46 ; CHECK: r0 = vtrunehb(r1:0)
47 define <4 x i8> @test_12(<4 x i8> %a0, <4 x i8> %a1) {
48 %p = shufflevector <4 x i8> %a0, <4 x i8> %a1, <4 x i32> <i32 0, i32 undef, i32 4, i32 6>
52 ; CHECK-LABEL: test_13:
53 ; CHECK: r0 = vtrunehb(r1:0)
54 define <4 x i8> @test_13(<4 x i8> %a0, <4 x i8> %a1) {
55 %p = shufflevector <4 x i8> %a0, <4 x i8> %a1, <4 x i32> <i32 0, i32 2, i32 undef, i32 undef>
59 ; CHECK-LABEL: test_20:
60 ; CHECK: r0 = vtrunohb(r1:0)
61 define <4 x i8> @test_20(<4 x i8> %a0, <4 x i8> %a1) {
62 %p = shufflevector <4 x i8> %a0, <4 x i8> %a1, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
66 ; CHECK-LABEL: test_21:
67 ; CHECK: r0 = vtrunohb(r1:0)
68 define <4 x i8> @test_21(<4 x i8> %a0, <4 x i8> %a1) {
69 %p = shufflevector <4 x i8> %a0, <4 x i8> %a1, <4 x i32> <i32 undef, i32 3, i32 5, i32 7>
73 ; CHECK-LABEL: test_22:
74 ; CHECK: r0 = vtrunohb(r1:0)
75 define <4 x i8> @test_22(<4 x i8> %a0, <4 x i8> %a1) {
76 %p = shufflevector <4 x i8> %a0, <4 x i8> %a1, <4 x i32> <i32 undef, i32 undef, i32 5, i32 7>
80 ; CHECK-LABEL: test_23:
81 ; CHECK: r0 = vtrunohb(r1:0)
82 define <4 x i8> @test_23(<4 x i8> %a0, <4 x i8> %a1) {
83 %p = shufflevector <4 x i8> %a0, <4 x i8> %a1, <4 x i32> <i32 1, i32 3, i32 5, i32 undef>