xref: /aosp_15_r20/external/llvm/test/CodeGen/Hexagon/store-widen-negv2.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=hexagon < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: foo:
3*9880d681SAndroid Build Coastguard Worker; CHECK: memh(r0+#0){{.*}}={{.*}}#-2
4*9880d681SAndroid Build Coastguard Worker; Don't use memh(r0+#0)=##65534.
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-m:e-p:32:32-i1:32-i64:64-a:0-v32:32-n16:32"
7*9880d681SAndroid Build Coastguard Workertarget triple = "hexagon"
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind
10*9880d681SAndroid Build Coastguard Workerdefine void @foo(i16* nocapture %s) #0 {
11*9880d681SAndroid Build Coastguard Workerentry:
12*9880d681SAndroid Build Coastguard Worker  %0 = bitcast i16* %s to i8*
13*9880d681SAndroid Build Coastguard Worker  store i8 -2, i8* %0, align 2
14*9880d681SAndroid Build Coastguard Worker  %add.ptr = getelementptr inbounds i8, i8* %0, i32 1
15*9880d681SAndroid Build Coastguard Worker  store i8 -1, i8* %add.ptr, align 1
16*9880d681SAndroid Build Coastguard Worker  ret void
17*9880d681SAndroid Build Coastguard Worker}
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Workerattributes #0 = { nounwind }
20