You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
__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.
The text was updated successfully, but these errors were encountered:
Extended Description
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.
The text was updated successfully, but these errors were encountered: