2 ms·
This post is correct. Load of a null pointer is undefined behavior in LLVM. If you don't believe me, here is the code that optimizes based on this. https://co
by pcwalton 9y ago
This post is correct. Load of a null pointer is undefined behavior in LLVM.
If you don't believe me, here is the code that optimizes based on this.
https://code.woboq.org/llvm/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp.html#1033 https://code.woboq.org/llvm/llvm/lib/Transforms/InstCombine/...
https://code.woboq.org/llvm/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp.html#_ZL24canSimplifyNullLoadOrGEPRN4llvm8LoadInstEPNS_5ValueE https://code.woboq.org/llvm/llvm/lib/Transforms/InstCombine/...