xref: /aosp_15_r20/external/llvm/test/CodeGen/AArch64/arm64-vector-ext.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=arm64 -aarch64-neon-syntax=apple | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker;CHECK: @func30
4*9880d681SAndroid Build Coastguard Worker;CHECK: movi.4h v1, #1
5*9880d681SAndroid Build Coastguard Worker;CHECK: and.8b v0, v0, v1
6*9880d681SAndroid Build Coastguard Worker;CHECK: ushll.4s  v0, v0, #0
7*9880d681SAndroid Build Coastguard Worker;CHECK: str  q0, [x0]
8*9880d681SAndroid Build Coastguard Worker;CHECK: ret
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker%T0_30 = type <4 x i1>
11*9880d681SAndroid Build Coastguard Worker%T1_30 = type <4 x i32>
12*9880d681SAndroid Build Coastguard Workerdefine void @func30(%T0_30 %v0, %T1_30* %p1) {
13*9880d681SAndroid Build Coastguard Worker  %r = zext %T0_30 %v0 to %T1_30
14*9880d681SAndroid Build Coastguard Worker  store %T1_30 %r, %T1_30* %p1
15*9880d681SAndroid Build Coastguard Worker  ret void
16*9880d681SAndroid Build Coastguard Worker}
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Worker; Extend from v1i1 was crashing things (PR20791). Make sure we do something
19*9880d681SAndroid Build Coastguard Worker; sensible instead.
20*9880d681SAndroid Build Coastguard Workerdefine <1 x i32> @autogen_SD7918() {
21*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: autogen_SD7918
22*9880d681SAndroid Build Coastguard Worker; CHECK: movi d0, #0000000000000000
23*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: ret
24*9880d681SAndroid Build Coastguard Worker  %I29 = insertelement <1 x i1> zeroinitializer, i1 false, i32 0
25*9880d681SAndroid Build Coastguard Worker  %ZE = zext <1 x i1> %I29 to <1 x i32>
26*9880d681SAndroid Build Coastguard Worker  ret <1 x i32> %ZE
27*9880d681SAndroid Build Coastguard Worker}
28