1 ; RUN: llc %s -o - | FileCheck %s
3 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
4 target triple = "thumbv6m-none-unknown-musleabi"
6 @a = global i8 undef, align 4
8 ; Check that store-merging generates a single str i32 rather than strb+strb+strh,
9 ; i.e., -1 is not moved by constant-hoisting.
10 ; CHECK: movs [[R1:r[0-9]+]], #255
11 ; CHECK: lsls [[R2:r[0-9]+]], [[R1]], #16
13 ; CHECK: movs [[R3:r[0-9]+]], #255
14 ; CHECK: lsls [[R4:r[0-9]+]], [[R3]], #16
21 br i1 undef, label %bb1, label %bb2
24 store i8 0, i8* getelementptr inbounds (i8, i8* @a, i32 1), align 1
25 store i8 0, i8* getelementptr inbounds (i8, i8* @a, i32 0), align 4
26 store i8 -1, i8* getelementptr inbounds (i8, i8* @a, i32 2), align 2
27 store i8 0, i8* getelementptr inbounds (i8, i8* @a, i32 3), align 1
31 store i8 0, i8* getelementptr inbounds (i8, i8* @a, i32 9), align 1
32 store i8 0, i8* getelementptr inbounds (i8, i8* @a, i32 8), align 4
33 store i8 -1, i8* getelementptr inbounds (i8, i8* @a, i32 10), align 2
34 store i8 0, i8* getelementptr inbounds (i8, i8* @a, i32 11), align 1