HomePhabricator

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

Authored by qcolombet on May 2 2019, 6:23 PM.

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.

llvm-svn: 359856

Details

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