This patch enables generation of relocations for pointers extracted from vectors when vector of pointers have scalar base pointer.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I'm uncomfortable with this patch. The placement in this helper function leaves open the possibility that other callers of findBDVorBase encounter an incorrectly typed result. I'm also concerned that we might end up with a scalar-base, vector-derived pair ending up in the stack map, and I don't think the downstream code knows how to deal with that.
A principled fix would be to integrate getelementptr into the base rewriting logic analogously to extractelement.
In the meantime, I've posted an alternate workaround in https://reviews.llvm.org/D57138. What do you think of that?
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | ||
---|---|---|
1023 | I think what you actually want here is: i.e. bitcast either scalars, or between vector types. |
I think what you actually want here is:
if (Base->getType()->isVectorTy() == Input->getType()->isVectorTy())
i.e. bitcast either scalars, or between vector types.