HomePhabricator

Fix assert in ObjCARC optimizer when deleting retainBlock of null or undef.

Description

Fix assert in ObjCARC optimizer when deleting retainBlock of null or undef.

The caller to EraseInstruction had this conditional:

// ARC calls with null are no-ops. Delete them.
if (IsNullOrUndef(Arg))

but the assert inside EraseInstruction only allowed ConstantPointerNull and not
undef or bitcasts.

This adds support for both of these cases.

rdar://problem/47003805

Details

Committed
peteJan 2 2019, 1:00 PM
Parents
rL350260: [WebAssembly][NFC] Elaborate on simd-noopt test comment
Branches
Unknown
Tags
Unknown