]> granicus.if.org Git - llvm/commit
[LoopRotate] fix crash encountered with callbr
authorNick Desaulniers <ndesaulniers@google.com>
Wed, 6 Mar 2019 23:04:40 +0000 (23:04 +0000)
committerNick Desaulniers <ndesaulniers@google.com>
Wed, 6 Mar 2019 23:04:40 +0000 (23:04 +0000)
commitdb98fa3b701a4ab35f26a4b946248bb21615a9f2
tree0368271bcdbcb581d8f7ace0a69bbe03c695536c
parent6f6ca7612eed9f73728e8f19597c0819ce04cc44
[LoopRotate] fix crash encountered with callbr

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.

Reviewers: craig.topper, jyknight

Reviewed By: craig.topper

Subscribers: hiraditya, llvm-commits, srhines

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D58929

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355564 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LoopRotationUtils.cpp
test/Transforms/LoopRotate/callbr.ll [new file with mode: 0644]