Commits

Michael Gottesman committed cd58ef3bd78
[inst-simplify] (upcast X2->X (ref_to_objectPointer X->ObjectPtr (objectpointer_to-ref ObjectPtr->X2 alpha))) -> alpha Since we don't have a downcast instruction, a common downcast pattern round trip is: upcast : $X2 -> $X ref_to_object_pointer : $X -> $Builtin.ObjectPointer object_pointer_to_ref : $Builtin.ObjectPointer -> $X2 We can RAUW the object pointer with the operand of the upcast. This canonicalization helps out mem2reg and devirtualization as well. Swift SVN r16515