brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · caf7b3b Raw
40 lines · plain
1; RUN: llc %s -o - | FileCheck %s2 3target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"4target triple = "thumbv6m-none-unknown-musleabi"5 6@a = global i8 undef, align 47 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]+]], #25511; CHECK: lsls [[R2:r[0-9]+]], [[R1]], #1612; CHECK: str  [[R2]]13; CHECK: movs [[R3:r[0-9]+]], #25514; CHECK: lsls [[R4:r[0-9]+]], [[R3]], #1615; CHECK: str  [[R4]]16; CHECK-NOT: strh17; CHECK-NOT: strb18 19define void @ham() {20bb:21  br i1 undef, label %bb1, label %bb222 23bb1:24  store i8 0, ptr getelementptr inbounds (i8, ptr @a, i32 1), align 125  store i8 0, ptr @a, align 426  store i8 -1, ptr getelementptr inbounds (i8, ptr @a, i32 2), align 227  store i8 0, ptr getelementptr inbounds (i8, ptr @a, i32 3), align 128  br label %bb329 30bb2:31  store i8 0, ptr getelementptr inbounds (i8, ptr @a, i32 9), align 132  store i8 0, ptr getelementptr inbounds (i8, ptr @a, i32 8), align 433  store i8 -1, ptr getelementptr inbounds (i8, ptr @a, i32 10), align 234  store i8 0, ptr getelementptr inbounds (i8, ptr @a, i32 11), align 135  br label %bb336 37bb3:38  ret void39}40