HomePhabricator

[IRTranslator] Use the alloc size instead of the store size when translating…

Description

[IRTranslator] Use the alloc size instead of the store size when translating allocas

We use to incorrectly use the store size instead of the alloc size when
creating the stack slot for allocas.
On aarch64 this can be demonstrated by allocating weirdly sized types.

For instance, in the added test case, we use an alloca for i19. We used
to allocate a slot of size 24-bit (19 rounded up to the next byte),
whereas we really want to use a full 32-bit slot for this type.

Details

Committed
qcolombetMay 2 2019, 6:23 PM
Parents
rL359855: [AArch64][MC] Reject "add x0, x1, w2, lsl #1" etc.
Branches
Unknown
Tags
Unknown