xref: /aosp_15_r20/external/llvm/test/CodeGen/ARM/2009-12-02-vtrn-undef.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mcpu=cortex-a8 < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32-n32"
4*9880d681SAndroid Build Coastguard Workertarget triple = "armv7-apple-darwin10"
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker%struct.int16x8_t = type { <8 x i16> }
7*9880d681SAndroid Build Coastguard Worker%struct.int16x8x2_t = type { [2 x %struct.int16x8_t] }
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Workerdefine void @t(%struct.int16x8x2_t* noalias nocapture sret %agg.result, <8 x i16> %tmp.0, %struct.int16x8x2_t* nocapture %dst) nounwind {
10*9880d681SAndroid Build Coastguard Workerentry:
11*9880d681SAndroid Build Coastguard Worker;CHECK: vtrn.16
12*9880d681SAndroid Build Coastguard Worker  %0 = shufflevector <8 x i16> %tmp.0, <8 x i16> undef, <8 x i32> <i32 0, i32 0, i32 2, i32 2, i32 4, i32 4, i32 6, i32 6>
13*9880d681SAndroid Build Coastguard Worker  %1 = shufflevector <8 x i16> %tmp.0, <8 x i16> undef, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 5, i32 5, i32 7, i32 7>
14*9880d681SAndroid Build Coastguard Worker  %agg.result1218.0 = getelementptr %struct.int16x8x2_t, %struct.int16x8x2_t* %agg.result, i32 0, i32 0, i32 0, i32 0 ; <<8 x i16>*>
15*9880d681SAndroid Build Coastguard Worker  store <8 x i16> %0, <8 x i16>* %agg.result1218.0, align 16
16*9880d681SAndroid Build Coastguard Worker  %agg.result12.1.0 = getelementptr %struct.int16x8x2_t, %struct.int16x8x2_t* %agg.result, i32 0, i32 0, i32 1, i32 0 ; <<8 x i16>*>
17*9880d681SAndroid Build Coastguard Worker  store <8 x i16> %1, <8 x i16>* %agg.result12.1.0, align 16
18*9880d681SAndroid Build Coastguard Worker  ret void
19*9880d681SAndroid Build Coastguard Worker}
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Worker; Radar 8290937: Ignore undef shuffle indices.
22*9880d681SAndroid Build Coastguard Worker; CHECK: t2
23*9880d681SAndroid Build Coastguard Worker; CHECK: vtrn.16
24*9880d681SAndroid Build Coastguard Workerdefine void @t2(%struct.int16x8x2_t* nocapture %ptr, <4 x i16> %a.0, <4 x i16> %b.0) nounwind {
25*9880d681SAndroid Build Coastguard Workerentry:
26*9880d681SAndroid Build Coastguard Worker  %0 = shufflevector <4 x i16> %a.0, <4 x i16> undef, <8 x i32> <i32 0, i32 0, i32 2, i32 2, i32 undef, i32 undef, i32 undef, i32 undef>
27*9880d681SAndroid Build Coastguard Worker  %1 = shufflevector <4 x i16> %a.0, <4 x i16> undef, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 undef, i32 undef, i32 undef, i32 undef>
28*9880d681SAndroid Build Coastguard Worker  %ptr26.0 = getelementptr inbounds %struct.int16x8x2_t, %struct.int16x8x2_t* %ptr, i32 0, i32 0, i32 0, i32 0
29*9880d681SAndroid Build Coastguard Worker  store <8 x i16> %0, <8 x i16>* %ptr26.0, align 16
30*9880d681SAndroid Build Coastguard Worker  %ptr20.1.0 = getelementptr inbounds %struct.int16x8x2_t, %struct.int16x8x2_t* %ptr, i32 0, i32 0, i32 1, i32 0
31*9880d681SAndroid Build Coastguard Worker  store <8 x i16> %1, <8 x i16>* %ptr20.1.0, align 16
32*9880d681SAndroid Build Coastguard Worker  ret void
33*9880d681SAndroid Build Coastguard Worker}
34