Consider a simple program:
int main() { int* ptr = nullptr; delete ptr; }
With GCC (7.2), there is a call instruction regardi
call
It's a QOI issue. clang does indeed elide the test:
https://godbolt.org/g/nBSykD
main: # @main xor eax, eax ret