[PATCH] D48270: [ARM] Check for unaligned access via bitcasts
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 18 13:00:46 PDT 2018
efriedma requested changes to this revision.
efriedma added a comment.
This revision now requires changes to proceed.
In IR, if a pointer operand doesn't have the alignment given by the "align" annotation, the behavior is undefined. (If you don't explicitly specify the alignment, it defaults to the alignment specified in the DataLayout.) Similarly, in a MachineFunction, if a memory operation accesses an address which doesn't have the alignment given in the MMO, the behavior is undefined.
Looking at ARMParallelDSP::CreateSMLADCall in https://reviews.llvm.org/D48128, it looks like you forgot to set the alignment on the loads you're creating.
https://reviews.llvm.org/D48270
More information about the llvm-commits
mailing list