forked from OSchip/llvm-project
SystemZTargetLowering::lowerDYNAMIC_STACKALLOC - use cast<> instead of dyn_cast<> for dereferenced pointer. NFCI.
We're immediately dereferencing the casted pointer, so use cast<> which will assert instead of dyn_cast<> which can return null. Fixes static analyzer warning.
This commit is contained in:
parent
6725860d21
commit
52e448974b
|
@ -3419,8 +3419,8 @@ lowerDYNAMIC_STACKALLOC(SDValue Op, SelectionDAG &DAG) const {
|
|||
|
||||
// If user has set the no alignment function attribute, ignore
|
||||
// alloca alignments.
|
||||
uint64_t AlignVal = (RealignOpt ?
|
||||
dyn_cast<ConstantSDNode>(Align)->getZExtValue() : 0);
|
||||
uint64_t AlignVal =
|
||||
(RealignOpt ? cast<ConstantSDNode>(Align)->getZExtValue() : 0);
|
||||
|
||||
uint64_t StackAlign = TFI->getStackAlignment();
|
||||
uint64_t RequiredAlign = std::max(AlignVal, StackAlign);
|
||||
|
|
Loading…
Reference in New Issue