forked from OSchip/llvm-project
[InstSimplify] Add additional test for PR49839 (NFC)
This is a variant involving an aggregate constant, which was not covered by the previous patch.
This commit is contained in:
parent
b4f2f7bebd
commit
c232a15df4
|
@ -195,3 +195,23 @@ join:
|
|||
%phi = phi i64 [ srem (i64 1, i64 ptrtoint (ptr @g to i64)), %if ], [ srem (i64 1, i64 ptrtoint (ptr @g to i64)) , %entry ]
|
||||
ret i64 %phi
|
||||
}
|
||||
|
||||
define <1 x i64> @pr49839_vector(i1 %c) {
|
||||
; CHECK-LABEL: @pr49839_vector(
|
||||
; CHECK-NEXT: entry:
|
||||
; CHECK-NEXT: br i1 [[C:%.*]], label [[IF:%.*]], label [[JOIN:%.*]]
|
||||
; CHECK: if:
|
||||
; CHECK-NEXT: br label [[JOIN]]
|
||||
; CHECK: join:
|
||||
; CHECK-NEXT: ret <1 x i64> <i64 srem (i64 1, i64 ptrtoint (ptr @g to i64))>
|
||||
;
|
||||
entry:
|
||||
br i1 %c, label %if, label %join
|
||||
|
||||
if:
|
||||
br label %join
|
||||
|
||||
join:
|
||||
%phi = phi <1 x i64> [ poison, %if ], [ <i64 srem (i64 1, i64 ptrtoint (ptr @g to i64))>, %entry ]
|
||||
ret <1 x i64> %phi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue