forked from OSchip/llvm-project
[PredicateInfo] Print RenamedOp (NFC)
Make it easier to debug renaming issues.
This commit is contained in:
parent
c2a61ef388
commit
c0308fd154
|
@ -896,18 +896,21 @@ public:
|
||||||
PB->From->printAsOperand(OS);
|
PB->From->printAsOperand(OS);
|
||||||
OS << ",";
|
OS << ",";
|
||||||
PB->To->printAsOperand(OS);
|
PB->To->printAsOperand(OS);
|
||||||
OS << "] }\n";
|
OS << "]";
|
||||||
} else if (const auto *PS = dyn_cast<PredicateSwitch>(PI)) {
|
} else if (const auto *PS = dyn_cast<PredicateSwitch>(PI)) {
|
||||||
OS << "; switch predicate info { CaseValue: " << *PS->CaseValue
|
OS << "; switch predicate info { CaseValue: " << *PS->CaseValue
|
||||||
<< " Switch:" << *PS->Switch << " Edge: [";
|
<< " Switch:" << *PS->Switch << " Edge: [";
|
||||||
PS->From->printAsOperand(OS);
|
PS->From->printAsOperand(OS);
|
||||||
OS << ",";
|
OS << ",";
|
||||||
PS->To->printAsOperand(OS);
|
PS->To->printAsOperand(OS);
|
||||||
OS << "] }\n";
|
OS << "]";
|
||||||
} else if (const auto *PA = dyn_cast<PredicateAssume>(PI)) {
|
} else if (const auto *PA = dyn_cast<PredicateAssume>(PI)) {
|
||||||
OS << "; assume predicate info {"
|
OS << "; assume predicate info {"
|
||||||
<< " Comparison:" << *PA->Condition << " }\n";
|
<< " Comparison:" << *PA->Condition;
|
||||||
}
|
}
|
||||||
|
OS << ", RenamedOp: ";
|
||||||
|
PI->RenamedOp->printAsOperand(OS, false);
|
||||||
|
OS << " }\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -138,7 +138,7 @@ define void @test4(i1 %b, i32 %x) {
|
||||||
; CHECK-NEXT: i32 2, label [[CASE0]]
|
; CHECK-NEXT: i32 2, label [[CASE0]]
|
||||||
; CHECK-NEXT: i32 3, label [[CASE3]]
|
; CHECK-NEXT: i32 3, label [[CASE3]]
|
||||||
; CHECK-NEXT: i32 4, label [[DEFAULT:%.*]]
|
; CHECK-NEXT: i32 4, label [[DEFAULT:%.*]]
|
||||||
; CHECK-NEXT: ] Edge: [label [[SW]],label %case1] }
|
; CHECK-NEXT: ] Edge: [label [[SW]],label %case1]
|
||||||
; CHECK-NEXT: [[X_0:%.*]] = call i32 @llvm.ssa.copy.{{.+}}(i32 [[X:%.*]])
|
; CHECK-NEXT: [[X_0:%.*]] = call i32 @llvm.ssa.copy.{{.+}}(i32 [[X:%.*]])
|
||||||
; CHECK-NEXT: switch i32 [[X]], label [[DEFAULT]] [
|
; CHECK-NEXT: switch i32 [[X]], label [[DEFAULT]] [
|
||||||
; CHECK-NEXT: i32 0, label [[CASE0]]
|
; CHECK-NEXT: i32 0, label [[CASE0]]
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
|
|
||||||
; CHECK-LABEL: bb:
|
; CHECK-LABEL: bb:
|
||||||
; CHECK: Has predicate info
|
; CHECK: Has predicate info
|
||||||
; CHECK: branch predicate info { TrueEdge: 1 Comparison: %cmp1 = icmp ne %0* %arg, null Edge: [label %bb,label %bb1] }
|
; CHECK: branch predicate info { TrueEdge: 1 Comparison: %cmp1 = icmp ne %0* %arg, null Edge: [label %bb,label %bb1], RenamedOp: %arg }
|
||||||
; CHECK-NEXT: %arg.0 = call %0* @llvm.ssa.copy.{{.+}}(%0* %arg)
|
; CHECK-NEXT: %arg.0 = call %0* @llvm.ssa.copy.{{.+}}(%0* %arg)
|
||||||
|
|
||||||
; CHECK-LABEL: bb1:
|
; CHECK-LABEL: bb1:
|
||||||
; CHECK: Has predicate info
|
; CHECK: Has predicate info
|
||||||
; CHECK-NEXT: branch predicate info { TrueEdge: 0 Comparison: %cmp2 = icmp ne %1* null, %tmp Edge: [label %bb1,label %bb3] }
|
; CHECK-NEXT: branch predicate info { TrueEdge: 0 Comparison: %cmp2 = icmp ne %1* null, %tmp Edge: [label %bb1,label %bb3], RenamedOp: %tmp }
|
||||||
; CHECK-NEXT: %tmp.0 = call %1* @llvm.ssa.copy.{{.+}}(%1* %tmp)
|
; CHECK-NEXT: %tmp.0 = call %1* @llvm.ssa.copy.{{.+}}(%1* %tmp)
|
||||||
|
|
||||||
define void @f0(%0* %arg, %1* %tmp) {
|
define void @f0(%0* %arg, %1* %tmp) {
|
||||||
|
|
Loading…
Reference in New Issue