diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 3d7d20d4160..4a9a62a7048 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -479,11 +479,11 @@ static inline unsigned clampStackAlignment(bool ShouldClamp, unsigned PrefAlign, if (!ShouldClamp || PrefAlign <= StackAlign) return PrefAlign; if (Alloca && MinAlign > StackAlign) - Alloca->getParent()->getContext().emitError(Alloca, - "Requested Minimal Alignment exceeds the Stack Alignment!"); + Alloca->getParent()->getContext().emitWarning(Alloca, + "Requested alignment exceeds the stack alignment!"); else assert(MinAlign <= StackAlign && - "Requested Minimal Alignment exceeds the Stack Alignment!"); + "Requested alignment exceeds the stack alignment!"); return StackAlign; } diff --git a/test/CodeGen/ARM/alloc-no-stack-realign-error.ll b/test/CodeGen/ARM/alloc-no-stack-realign-error.ll index 96c00174dba..9b4d12ae8a8 100644 --- a/test/CodeGen/ARM/alloc-no-stack-realign-error.ll +++ b/test/CodeGen/ARM/alloc-no-stack-realign-error.ll @@ -6,10 +6,10 @@ ; If alignment for alloc is smaller than or equal to stack alignment, but the ; preferred type alignment is bigger, the alignment will be clamped. ; If alignment for alloca is bigger than stack alignment, the compiler -; will emit an error. +; will emit a warning. define void @test(<16 x float>* noalias sret %agg.result) nounwind ssp { entry: -; CHECK: Requested Minimal Alignment exceeds the Stack Alignment! +; CHECK: warning: Requested alignment exceeds the stack alignment! %retval = alloca <16 x float>, align 16 %0 = load <16 x float>* @T3_retval, align 16 store <16 x float> %0, <16 x float>* %retval