@@ -363,6 +363,17 @@ where the returned result should go.
363363 requires isIntrinsicFunction(FUNC)
364364 andBool #functionNameMatchesEnv(getFunctionName(FUNC))
365365
366+ syntax Bool ::= isNoOpFunction(MonoItemKind) [function]
367+ rule isNoOpFunction(monoItemFn(symbol(""), _, noBody)) => true
368+ rule isNoOpFunction(_) => false [owise]
369+
370+ // SMIR marks some semantically empty shims (e.g. drop glue for trivially droppable slices)
371+ // as NoOpSym. They have no body and should continue immediately without switching frames.
372+ rule [termCallNoOp]:
373+ <k> #execTerminatorCall(_, monoItemFn(symbol(""), _, noBody), _ARGS, _DEST, TARGET, _UNWIND, _SPAN) ~> _
374+ => #continueAt(TARGET)
375+ </k>
376+
366377 // Regular function call - full state switching and stack setup
367378 rule [termCallFunction]:
368379 <k> #execTerminatorCall(FTY, FUNC, ARGS, DEST, TARGET, UNWIND, SPAN) ~> _
@@ -379,6 +390,7 @@ where the returned result should go.
379390 </currentFrame>
380391 <stack> STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK </stack>
381392 requires notBool isIntrinsicFunction(FUNC)
393+ andBool notBool isNoOpFunction(FUNC)
382394 andBool notBool #functionNameMatchesEnv(getFunctionName(FUNC))
383395
384396 // Function call to a function in the break-on set - same as termCallFunction but separate rule id for cut-point
@@ -397,6 +409,7 @@ where the returned result should go.
397409 </currentFrame>
398410 <stack> STACK => ListItem(StackFrame(OLDCALLER, OLDDEST, OLDTARGET, OLDUNWIND, LOCALS)) STACK </stack>
399411 requires notBool isIntrinsicFunction(FUNC)
412+ andBool notBool isNoOpFunction(FUNC)
400413 andBool #functionNameMatchesEnv(getFunctionName(FUNC))
401414
402415 syntax Bool ::= isIntrinsicFunction(MonoItemKind) [function]
0 commit comments