brintos

brintos / llvm-project-archived public Read only

0
0
Text · 798 B · 0a632d4 Raw
20 lines · plain
1; RUN: llc -global-isel -stop-after irtranslator -mtriple aarch64-apple-ios %s -o - | FileCheck %s2 3; We use to incorrectly use the store size instead of the alloc size when4; creating the stack slot for allocas. This shows on aarch64 only when5; we allocated weirdly sized type. For instance, in that case, we used6; to allocate a slot of size 24-bit (19 rounded up to the next byte),7; whereas we really want to use a full 32-bit slot for this type.8; CHECK-LABEL: foo9; Check that the stack slot is 4-byte wide instead of the previously10; wrongly 3-byte sized slot.11; CHECK: stack:12; CHECK-NEXT: - { id: 0, name: stack_slot, type: default, offset: 0, size: 4, alignment: 413define void @foo() {14  %stack_slot = alloca i1915  call void @bar(ptr %stack_slot)16  ret void17}18 19declare void @bar(ptr %a)20