Currently, RewriteStatepointsForGC doesn't support the inttoptr instruction.
This is a problem, because some optimizations can generate inttoptrs; for example, it may inline an memcpy followed by a load into an inttoptr.
Before optimization, the result of the load would be treated as a base pointer, but after, it wouldn't accept it.
On a build with assertions, it would crash with an error; on a release build, it would enter an infinite loop.
This patch makes RS4GC treat inttoptr instructions as base pointers, so the behavior after optimization is the same as before.
It can also be useful for (semi-)conservative garbage collectors for languages with polymorphism, like OCaml.
Integers may be marked as non-pointers with a high or low set bit, then casted to a GC pointer and passed to a polymorphic function.
After this patch, that's possible to do with just an inttoptr.