diff --git a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp --- a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp +++ b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp @@ -255,15 +255,6 @@ // Get the number of bytes to allocate from the FrameInfo. uint64_t FrameSize = MFI.getStackSize(); - // Get the alignment. - Align StackAlign = getStackAlign(); - - // Make sure the frame is aligned. - FrameSize = alignTo(FrameSize, StackAlign); - - // Update frame info. - MFI.setStackSize(FrameSize); - // When using SP or BP to access stack objects, we may require extra padding // to ensure the bottom of the RVV stack is correctly aligned within the main // stack. We calculate this as the amount required to align the scalar local