A while ago I implemented the functionality to lower Microsoft ptr32
and ptr64 pointers, which are basically stored as 32-bit and 64-bit
pointers and are extended/truncated to the appropriate pointer size when
dereferenced. Apparently I never implemented this extend/truncate when
dereferencing part, so that is what this patch attempts to do.
For 32-bit pointers in 64-bit builds I put the sign/zero extend in
matchAddress in X86ISelDAGToDAG, but loading from 64-bit pointers in
32-bit builds fails in the legalizer before that point, which is why
this code is in two different places. Not sure if this is a good way of doing
this.
clang-tidy: error: use of undeclared identifier 'Ld' [clang-diagnostic-error]
not useful