forked from OSchip/llvm-project
[CloneFunction] Add a testcase for r277691/r277693
PR28848 had a very nice reduction of the underlying cause of the bug. Our ValueMap had, in an entry for an Instruction, a ConstantInt. This is not at all unexpected but should be handled properly. llvm-svn: 277773
This commit is contained in:
parent
bdade36769
commit
b48ed0f721
|
@ -301,3 +301,24 @@ entry:
|
||||||
; CHECK-LABEL: define i32 @PR28802(
|
; CHECK-LABEL: define i32 @PR28802(
|
||||||
; CHECK: call i32 @PR28802.external(i32 0)
|
; CHECK: call i32 @PR28802.external(i32 0)
|
||||||
; CHECK: ret i32 0
|
; CHECK: ret i32 0
|
||||||
|
|
||||||
|
define internal i32 @PR28848.callee(i32 %p2, i1 %c) {
|
||||||
|
entry:
|
||||||
|
br i1 %c, label %cond.end, label %cond.true
|
||||||
|
|
||||||
|
cond.true:
|
||||||
|
br label %cond.end
|
||||||
|
|
||||||
|
cond.end:
|
||||||
|
%cond = phi i32 [ 0, %cond.true ], [ %p2, %entry ]
|
||||||
|
%or = or i32 %cond, %p2
|
||||||
|
ret i32 %or
|
||||||
|
}
|
||||||
|
|
||||||
|
define i32 @PR28848() {
|
||||||
|
entry:
|
||||||
|
%call = call i32 @PR28848.callee(i32 0, i1 false)
|
||||||
|
ret i32 %call
|
||||||
|
}
|
||||||
|
; CHECK-LABEL: define i32 @PR28848(
|
||||||
|
; CHECK: ret i32 0
|
||||||
|
|
Loading…
Reference in New Issue