This is for Swift VFE support. In some vtable forms that Swift emits, the "base" of a relative pointer is not the global symbol itself directly, but a GEP into it -- so the pointer is relative to a particular field in the global. So getPointerAtOffset() needs to be able to see through the GEP and allow it in a SUB expression, to correctly recognize the offset as a vtable slot.
given that this is only used at a single point, maybe define it as a lambda at the use, so all the swift specific code is kept close together?
new tests probably should use the new pm syntax (-passes='globaldce')