[NFC][SimplifyCFG] Add a test with an undef cond branch to identical destinations

This commit is contained in:
Roman Lebedev 2021-01-08 00:10:50 +03:00
parent 7600d7c7be
commit 6984781df9
No known key found for this signature in database
GPG Key ID: 083C3EBB4A1689E0
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S < %s | FileCheck %s
declare void @llvm.assume(i1)
define void @fn(i1 %c) {
; CHECK-LABEL: @fn(
; CHECK-NEXT: entry:
; CHECK-NEXT: unreachable
;
entry:
call void @llvm.assume(i1 undef)
br i1 %c, label %bb1, label %bb1
bb1:
ret void
}