mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
c31e34345d
This patch teaches BasicBlock::print to construct an instance of SlotTracker with the containing function. Without this patch, we dump: *** IR Dump After LoopInstSimplifyPass *** ; Preheader: br label %1 ; Loop: <badref>: ; preds = %1, %0 br label %1 Note "<badref>" above. This happens because BasicBlock::print calls: SlotTracker SlotTable(this->getModule()); Note that this constructor does not add the contents of functions to the slot table. That is, basic blocks are left unnumbered. This patch fixes the problem by switching to: SlotTracker SlotTable(this->getParent()); which does add the contents of the Module and the function, this->getParent(), to the slot table. Differential Revision: https://reviews.llvm.org/D89567
15 lines
341 B
LLVM
15 lines
341 B
LLVM
; RUN: opt -passes=loop-instsimplify -print-after-all -disable-output -S < %s 2>&1 | FileCheck %s
|
|
|
|
; loop-instsimplify dumps individual basic blocks as part of a loop,
|
|
; not a function. Verify that the non-entry basic block is labeled as
|
|
; "1", not "<badref>".
|
|
|
|
; CHECK-NOT: <badref>
|
|
|
|
define void @foo() {
|
|
br label %1
|
|
|
|
1:
|
|
br label %1
|
|
}
|