xref: /aosp_15_r20/external/llvm/test/CodeGen/Hexagon/store-widen-aliased-load.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=hexagon < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: memh
3*9880d681SAndroid Build Coastguard Worker; Check that store widening does not merge the two stores.
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-p:32:32:32-i64:64:64-i32:32:32-i16:16:16-i1:32:32-f64:64:64-f32:32:32-v64:64:64-v32:32:32-a0:0-n16:32"
6*9880d681SAndroid Build Coastguard Workertarget triple = "hexagon"
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker%struct.type_t = type { i8, i8, [2 x i8] }
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Workerdefine zeroext i8 @foo(%struct.type_t* nocapture %p) nounwind {
11*9880d681SAndroid Build Coastguard Workerentry:
12*9880d681SAndroid Build Coastguard Worker  %a = getelementptr inbounds %struct.type_t, %struct.type_t* %p, i32 0, i32 0
13*9880d681SAndroid Build Coastguard Worker  store i8 0, i8* %a, align 2, !tbaa !0
14*9880d681SAndroid Build Coastguard Worker  %b = getelementptr inbounds %struct.type_t, %struct.type_t* %p, i32 0, i32 1
15*9880d681SAndroid Build Coastguard Worker  %0 = load i8, i8* %b, align 1, !tbaa !0
16*9880d681SAndroid Build Coastguard Worker  store i8 0, i8* %b, align 1, !tbaa !0
17*9880d681SAndroid Build Coastguard Worker  ret i8 %0
18*9880d681SAndroid Build Coastguard Worker}
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Worker!0 = !{!"omnipotent char", !1}
21*9880d681SAndroid Build Coastguard Worker!1 = !{!"Simple C/C++ TBAA"}
22