XCore target: return error for unsupported alignment

llvm-svn: 194463
This commit is contained in:
Robert Lytton 2013-11-12 10:11:05 +00:00
parent eaf6f36e6d
commit ed835b6fd4
2 changed files with 13 additions and 0 deletions

View File

@ -93,6 +93,10 @@ void XCoreFrameLowering::emitPrologue(MachineFunction &MF) const {
XCoreFunctionInfo *XFI = MF.getInfo<XCoreFunctionInfo>();
DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
if (MFI->getMaxAlignment() > getStackAlignment())
report_fatal_error("emitPrologue unsupported alignment: "
+ Twine(MFI->getMaxAlignment()));
bool FP = hasFP(MF);
const AttributeSet &PAL = MF.getFunction()->getAttributes();

View File

@ -0,0 +1,9 @@
; RUN: not llc < %s -march=xcore 2>&1 | FileCheck %s
; CHECK: emitPrologue unsupported alignment: 8
define void @f() nounwind {
entry:
%BadAlignment = alloca i64, align 8
ret void
}