diff --git a/llvm/lib/CodeGen/AsmPrinter/OxCamlGCPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/OxCamlGCPrinter.cpp index b0404aba3b994..c5a3d1c1c9211 100644 --- a/llvm/lib/CodeGen/AsmPrinter/OxCamlGCPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/OxCamlGCPrinter.cpp @@ -207,7 +207,7 @@ bool OxCamlGCMetadataPrinter::emitStackMaps(Module &M, StackMaps &SM, AsmPrinter // Stack offset from OxCaml (in case LLVM says we have dynamic objects) // This will get set to UINT64_MAX in `StackMaps.recordStackMapOpers` if // that is the case. - if (CSI.CSFunctionInfo.StackSize != UINT64_MAX) { + if (CSI.CSFunctionInfo.StackSize == UINT64_MAX) { FrameSize += stackOffsetOfID(CSI.ID); }