[SystemZ] lowerDYNAMIC_STACKALLOC_XPLINK - use cast<> instead of dyn_cast<> to avoid dereference of nullptr
The pointer is always dereferenced, so assert the cast is correct instead of returning nullptr
This commit is contained in:
parent
ada6bcc13f
commit
5f4549c372
|
|
@ -3577,7 +3577,7 @@ SystemZTargetLowering::lowerDYNAMIC_STACKALLOC_XPLINK(SDValue Op,
|
|||
// If user has set the no alignment function attribute, ignore
|
||||
// alloca alignments.
|
||||
uint64_t AlignVal =
|
||||
(RealignOpt ? dyn_cast<ConstantSDNode>(Align)->getZExtValue() : 0);
|
||||
(RealignOpt ? cast<ConstantSDNode>(Align)->getZExtValue() : 0);
|
||||
|
||||
uint64_t StackAlign = TFI->getStackAlignment();
|
||||
uint64_t RequiredAlign = std::max(AlignVal, StackAlign);
|
||||
|
|
|
|||
Loading…
Reference in New Issue