HomePhabricator

Fix a hang when lowering __builtin_dynamic_object_size

Authored by erik.pilkington on Apr 10 2019, 4:42 PM.

Description

Fix a hang when lowering __builtin_dynamic_object_size

If the ObjectSizeOffsetEvaluator fails to fold the object size call, then it may
litter some unused instructions in the function. When done repeatably in
InstCombine, this results in an infinite loop. Fix this by tracking the set of
instructions that were inserted, then removing them on failure.

rdar://49172227

Differential revision: https://reviews.llvm.org/D60298

llvm-svn: 358146

Details

Committed
erik.pilkingtonApr 10 2019, 4:42 PM
Differential Revision
D60298: Fix a hang when lowering __builtin_dynamic_object_size
Parents
rG2f46de8c0b25: [NFC] Use clearer naming for local variables
Branches
Unknown
Tags
Unknown