1 ; RUN: opt %s -simplifycfg -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(i32*)
10 define i32 @copy-metadata(i32* %x) {
13 %x.int = ptrtoint i32* %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(i32* %x)