Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove lvSpillAtSingleDef from some asserts
  • Loading branch information
kunalspathak committed Jul 9, 2021
commit 1171e15669702e350f74049476e0ca095d5ce86d
2 changes: 1 addition & 1 deletion src/coreclr/jit/compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2017,7 +2017,7 @@ inline
#ifdef TARGET_AMD64
#ifndef UNIX_AMD64_ABI
// On amd64, every param has a stack location, except on Unix-like systems.
assert(varDsc->lvIsParam || varDsc->lvSingleDefRegCandidate || varDsc->lvSpillAtSingleDef);
assert(varDsc->lvIsParam);
#endif // UNIX_AMD64_ABI
#else // !TARGET_AMD64
// For other targets, a stack parameter that is enregistered or prespilled
Expand Down
7 changes: 3 additions & 4 deletions src/coreclr/jit/emitxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2159,16 +2159,15 @@ inline UNATIVE_OFFSET emitter::emitInsSizeSV(code_t code, int var, int dsp)
// Dev10 804810 - failing this assert can lead to bad codegen and runtime crashes
CLANG_FORMAT_COMMENT_ANCHOR;

LclVarDsc* varDsc = emitComp->lvaTable + var;

#ifdef UNIX_AMD64_ABI
LclVarDsc* varDsc = emitComp->lvaTable + var;
bool isRegPassedArg = varDsc->lvIsParam && varDsc->lvIsRegArg;
// Register passed args could have a stack offset of 0.
noway_assert((int)offs < 0 || isRegPassedArg || emitComp->opts.IsOSR());
#else // !UNIX_AMD64_ABI
bool isSingleDefSpill = varDsc->lvSpillAtSingleDef;

// OSR transitioning to RBP frame currently can have mid-frame FP
noway_assert(((int)offs < 0) || isSingleDefSpill || emitComp->opts.IsOSR());
noway_assert(((int)offs < 0) || emitComp->opts.IsOSR());
#endif // !UNIX_AMD64_ABI
}

Expand Down