fix corner case for optional aliasing (#18093)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18093
ghimport-source-id:
021adc52aa7bfe5fff74531c76a8cd28cab30b2a
Stack:
* **#18093 [jit] fix corner case for optional aliasing**
Occasionally the compiler can insert constant Nones to make types line
up. In that case, don't try to make a pointer from the optional type to
None, since we know statically that None won't be mutated or whatever.
Reviewed By: shannonzhu
Differential Revision:
D14493004
fbshipit-source-id:
6564065f39d99ee5af664f3a0fe235892973d9be