HomePhabricator

[WideableCond] Fix a nasty bug in detection of "explicit guards"

Authored by reames on Apr 2 2019, 9:51 AM.

Description

[WideableCond] Fix a nasty bug in detection of "explicit guards"

The code was failing to actually check for the presence of the call to widenable_condition. The whole point of specifying the widenable_condition intrinsic was allowing widening transforms. A normal branch is not widenable. A normal branch leading to a deopt is not widenable (in general).

I added a test case via LoopPredication, but GuardWidening has an analogous bug. Those are the only two passes actually using this utility just yet. Noticed while working on LoopPredication for non-widenable branches; POC in D60111.

llvm-svn: 357493

Details

Committed
reamesApr 2 2019, 9:51 AM
Parents
rG017deaf1ae3a: [llvm-objcopy] Change SHT_NOBITS to SHT_PROBITS for some --set-section-flags
Branches
Unknown
Tags
Unknown