This is an archive of the discontinued LLVM Phabricator instance.

[LoopRotate] fix crash encountered with callbr
ClosedPublic

Authored by nickdesaulniers on Mar 4 2019, 3:16 PM.

Details

Summary

While implementing inlining support for callbr
(https://bugs.llvm.org/show_bug.cgi?id=40722), I hit a crash in Loop
Rotation when trying to build the entire x86 Linux kernel
(drivers/char/random.c). This is a small fix up to r353563.

Test case is drivers/char/random.c (with callbr's inlined), then ran
through creduce, then opt -opt-bisect-limit=<limit>, then bugpoint.

Thanks to Craig Topper for immediately spotting the fix, and teaching me
how to fish.

Diff Detail

Repository
rL LLVM

Event Timeline

nickdesaulniers created this revision.Mar 4 2019, 3:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2019, 3:16 PM
craig.topper added inline comments.Mar 4 2019, 3:22 PM
llvm/test/Transforms/LoopRotate/callbr.ll
4 ↗(On Diff #189216)

Drop the dso_local and local_unnamed_addr attributes throughout

61 ↗(On Diff #189216)

Drop this.

63 ↗(On Diff #189216)

Remove !tbaa and !srcloc in the IR above and then you can remove !0 through !8

73 ↗(On Diff #189216)

Use utils/update_test_checks.py to generate the checks.

  • remove dso_local local_unnamed_addr
  • remove attributes
  • replace existing tests with run of $ python llvm/utils/update_test_checks.py \ llvm/test/Transforms/LoopRotate/callbr.ll
nickdesaulniers marked 4 inline comments as done.Mar 4 2019, 4:27 PM
This revision is now accepted and ready to land.Mar 6 2019, 10:59 AM
This revision was automatically updated to reflect the committed changes.