[llvm-commits] [llvm] r109892 - in /llvm/trunk: lib/Target/PowerPC/PPCRegisterInfo.cpp test/FrontendC/vla-1.c
Dale Johannesen
dalej at apple.com
Fri Jul 30 14:09:48 PDT 2010
Author: johannes
Date: Fri Jul 30 16:09:48 2010
New Revision: 109892
URL: http://llvm.org/viewvc/llvm-project?rev=109892&view=rev
Log:
PPC doesn't supported VLA with large alignment. This was
formerly rejected by the FE, so asserted in the BE; now the FE only
warns, so we treat it as a legitimate fatal error in PPC BE.
This means the test for the feature won't pass, so it's xfail'd.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp
llvm/trunk/test/FrontendC/vla-1.c
Modified: llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp?rev=109892&r1=109891&r2=109892&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCRegisterInfo.cpp Fri Jul 30 16:09:48 2010
@@ -449,8 +449,8 @@
// Get stack alignments.
unsigned TargetAlign = MF.getTarget().getFrameInfo()->getStackAlignment();
unsigned MaxAlign = MFI->getMaxAlignment();
- assert(MaxAlign <= TargetAlign &&
- "Dynamic alloca with large aligns not supported");
+ if (MaxAlign > TargetAlign)
+ report_fatal_error("Dynamic alloca with large aligns not supported");
// Determine the previous frame's address. If FrameSize can't be
// represented as 16 bits or we need special alignment, then we load the
Modified: llvm/trunk/test/FrontendC/vla-1.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/vla-1.c?rev=109892&r1=109891&r2=109892&view=diff
==============================================================================
--- llvm/trunk/test/FrontendC/vla-1.c (original)
+++ llvm/trunk/test/FrontendC/vla-1.c Fri Jul 30 16:09:48 2010
@@ -1,4 +1,6 @@
// RUN: %llvmgcc_only -std=gnu99 %s -S |& grep {warning: alignment for}
+// ppc does not support this feature, and gets a fatal error at runtime.
+// XFAIL: powerpc
int foo(int a)
{
More information about the llvm-commits
mailing list