This is an archive of the discontinued LLVM Phabricator instance.

Teach Wreturn-type, Wunreachable-code, and alpha.deadcode.UnreachableCode to treat __assume(0) like __builtin_unreachable.
ClosedPublic

Authored by thakis on Feb 12 2018, 9:09 PM.

Details

Reviewers
rsmith
rnk
Summary

Fixes PR29134.

Diff Detail

Event Timeline

thakis created this revision.Feb 12 2018, 9:09 PM
hans added a subscriber: hans.Feb 13 2018, 6:14 AM
rnk accepted this revision.Feb 13 2018, 12:43 PM

lgtm

It looks like we already generate llvm.assume() for these and that eventually behaves the same as the unreachable instruction. Neat. :)

This revision is now accepted and ready to land.Feb 13 2018, 12:43 PM
thakis closed this revision.Feb 13 2018, 1:33 PM

r325052, thanks!