[llvm] 85394d9 - AMDGPU/GlobalISel: Don't hardcode stack alignment in assert message
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu May 13 16:01:18 PDT 2021
Author: Matt Arsenault
Date: 2021-05-13T19:00:13-04:00
New Revision: 85394d9ed71bea61000a502abc1f89a3981bee59
URL: https://github.com/llvm/llvm-project/commit/85394d9ed71bea61000a502abc1f89a3981bee59
DIFF: https://github.com/llvm/llvm-project/commit/85394d9ed71bea61000a502abc1f89a3981bee59.diff
LOG: AMDGPU/GlobalISel: Don't hardcode stack alignment in assert message
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
index f97c81b203c2..0c9af9ac5818 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
@@ -1174,7 +1174,8 @@ bool AMDGPUCallLowering::lowerTailCall(
// particular across call boundaries. Therefore our own arguments started at
// a 16-byte aligned SP and the delta applied for the tail call should
// satisfy the same constraint.
- assert(FPDiff % 16 == 0 && "unaligned stack on tail call");
+ assert(isAligned(ST.getStackAlignment(), FPDiff) &&
+ "unaligned stack on tail call");
}
SmallVector<CCValAssign, 16> ArgLocs;
More information about the llvm-commits
mailing list