[llvm-commits] [llvm] r41133 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Chris Lattner
clattner at apple.com
Fri Aug 17 08:24:07 PDT 2007
> URL: http://llvm.org/viewvc/llvm-project?rev=41133&view=rev
> Log:
> If dynamic_stackalloc alignment is > stack alignment, first issue
> an instruction to align the stack ptr before the decrement.
Nifty!
> + unsigned Align = cast<ConstantSDNode>(Tmp3)->getValue();
> + unsigned StackAlign =
> + TLI.getTargetMachine().getFrameInfo()->getStackAlignment();
> + if (Align > StackAlign)
> + SP = DAG.getNode(ISD::AND, VT, SP, DAG.getConstant(-Align,
> VT));
Please declare Align as uint64_t, or use -(uint64_t)Align to avoid
problems on 64-bit systems.
Thanks Evan,
-Chris
More information about the llvm-commits
mailing list