This reverts commit b3297ef05179e1fee616b97b1c65b58e4c7fef17.
This change is incorrect. The current semantic of null in the IR is a
pointer with the bitvalue 0. It is not a cast from an integer 0, so
this should preserve the pointer type.
Paths
| Differential D74738
Revert "[GISel]: Fix incorrect IRTranslation while translating null pointer types" ClosedPublic Authored by arsenm on Feb 17 2020, 12:05 PM.
Details Summary This reverts commit b3297ef05179e1fee616b97b1c65b58e4c7fef17. This change is incorrect. The current semantic of null in the IR is a
Diff Detail Event TimelineComment Actions Which part of the langref are you referring to? Anyway, we discussed this internally and this seems slightly better than using inttoptr.
Comment Actions
http://llvm.org/docs/LangRef.html#simple-constants, Null pointer constants. This falls short in actually saying this means a bit-value 0 pointer in all address spaces, but all of the code treats it this way.
Comment Actions Could you fix up the ARM64 selection code as I mentioned earlier so we don't generate different instructions? This revision is now accepted and ready to land.Mar 30 2020, 4:10 PM
Revision Contents
Diff 253725 llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator-switch.ll
llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
llvm/test/CodeGen/AArch64/GlobalISel/call-translator-tail-call.ll
llvm/test/CodeGen/AArch64/GlobalISel/call-translator.ll
llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-exceptions.ll
llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-tbaa.ll
llvm/test/CodeGen/AArch64/GlobalISel/select-constant.mir
llvm/test/CodeGen/AArch64/GlobalISel/translate-gep.ll
|