1 ; RUN: opt %s -passes=simplifycfg -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s
3 ; ConstantFoldTerminator function can convert SwitchInst with one case (and default) to
4 ; a conditional BranchInst. This test checks the converted BranchInst preserve the
5 ; make.implicit metadata.
7 declare i32 @consume(ptr)
10 define i32 @copy-metadata(ptr %x) {
13 %x.int = ptrtoint ptr %x to i64
15 ; CHECK: br i1 %cond, label %is_null, label %default, !make.implicit !0
16 switch i64 %x.int, label %default [
21 %0 = call i32 @consume(ptr %x)