during IPO (interprocedural optimizations) you wanna have some cases around specializing a function without the early exits, they should be hoisted outside of the function and inlining decisions should be made once that's done.
void foo(int* ptr) {
if (ptr != NULL) {
...
}
}