Consider: __declspec(noreturn) void crash(void *); void g(void*); void f(int c) { void *p = _alloca(c); if (c) crash(p); g(p); } Here is the call to 'crash': .LBB0_1: # %if.then callq "?crash@@YAXPEAX@Z" addq $32, %rsp ud2 The ADD RSP instruction is dead. On Windows, it is very common to not have a reserved call frame because of inalloca. Maybe the right fix here is to teach MI more about noreturn functions so we can do more general DCE after them. It would also help us get rid of TrapOnUnreachable in favor of inserting int3 after all noreturn calls.
This is worth doing because it comes up on every assert-like construct.
r270109