ARM: don't try to over-align large vectors as arguments.
authorTim Northover <tnorthover@apple.com>
Thu, 3 May 2018 12:54:25 +0000 (12:54 +0000)
committerTim Northover <tnorthover@apple.com>
Thu, 3 May 2018 12:54:25 +0000 (12:54 +0000)
commit28e0a6f7dd131043165ea5896b7c35be523e53e1
tree22c8d29f2aef0b632191c7a66f7e0165116d9498
parent377d68fd2cc33bfb38a9d803669eaf3bdca5d517
ARM: don't try to over-align large vectors as arguments.

By default LLVM thinks very large vectors get aligned to their size when
passed across functions. Unfortunately no-one told the ARM backend so it
doesn't trigger stack realignment and so accesses can cause the usual
misalignment issues (e.g. a data abort).

This changes the ABI alignment to the stack alignment, which in practice
(and as a bonus) also coincides with the alignment "natural" vectors get.

llvm-svn: 331451
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.h
llvm/test/CodeGen/ARM/large-vector.ll [new file with mode: 0644]
llvm/test/CodeGen/ARM/vuzp.ll