xref: /aosp_15_r20/external/llvm/test/CodeGen/Mips/swzero.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=mipsel < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker%struct.unaligned = type <{ i32 }>
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdefine void @zero_u(%struct.unaligned* nocapture %p) nounwind {
6*9880d681SAndroid Build Coastguard Workerentry:
7*9880d681SAndroid Build Coastguard Worker; CHECK: swl $zero
8*9880d681SAndroid Build Coastguard Worker; CHECK: swr $zero
9*9880d681SAndroid Build Coastguard Worker  %x = getelementptr inbounds %struct.unaligned, %struct.unaligned* %p, i32 0, i32 0
10*9880d681SAndroid Build Coastguard Worker  store i32 0, i32* %x, align 1
11*9880d681SAndroid Build Coastguard Worker  ret void
12*9880d681SAndroid Build Coastguard Worker}
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Workerdefine void @zero_a(i32* nocapture %p) nounwind {
15*9880d681SAndroid Build Coastguard Workerentry:
16*9880d681SAndroid Build Coastguard Worker; CHECK: sw $zero
17*9880d681SAndroid Build Coastguard Worker  store i32 0, i32* %p, align 4
18*9880d681SAndroid Build Coastguard Worker  ret void
19*9880d681SAndroid Build Coastguard Worker}
20*9880d681SAndroid Build Coastguard Worker
21