1f8045b25SFlorian Hahn; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2*8ebb3eacSBjorn Pettersson; RUN: opt -S -passes=ipsccp < %s | FileCheck %s 3cee313d2SEric Christopher 4cee313d2SEric Christopherdeclare void @foo() 5cee313d2SEric Christopherdeclare void @goo() 6cee313d2SEric Christopherdeclare void @patatino() 7cee313d2SEric Christopher 8cee313d2SEric Christopherdefine void @test1(i32 %t) { 9f8045b25SFlorian Hahn; CHECK-LABEL: @test1( 10f8045b25SFlorian Hahn; CHECK-NEXT: [[CHOICE:%.*]] = icmp eq i32 undef, -1 11f8045b25SFlorian Hahn; CHECK-NEXT: switch i1 [[CHOICE]], label [[FIRST:%.*]] [ 12f8045b25SFlorian Hahn; CHECK-NEXT: i1 false, label [[SECOND:%.*]] 13f8045b25SFlorian Hahn; CHECK-NEXT: i1 true, label [[THIRD:%.*]] 14f8045b25SFlorian Hahn; CHECK-NEXT: ] 15f8045b25SFlorian Hahn; CHECK: first: 16f8045b25SFlorian Hahn; CHECK-NEXT: call void @foo() 17f8045b25SFlorian Hahn; CHECK-NEXT: ret void 18f8045b25SFlorian Hahn; CHECK: second: 19f8045b25SFlorian Hahn; CHECK-NEXT: call void @goo() 20f8045b25SFlorian Hahn; CHECK-NEXT: ret void 21f8045b25SFlorian Hahn; CHECK: third: 22f8045b25SFlorian Hahn; CHECK-NEXT: call void @patatino() 23f8045b25SFlorian Hahn; CHECK-NEXT: ret void 24f8045b25SFlorian Hahn; 25cee313d2SEric Christopher %choice = icmp eq i32 undef, -1 26cee313d2SEric Christopher switch i1 %choice, label %first [i1 0, label %second 27cee313d2SEric Christopher i1 1, label %third] 28cee313d2SEric Christopherfirst: 29cee313d2SEric Christopher call void @foo() 30cee313d2SEric Christopher ret void 31cee313d2SEric Christophersecond: 32cee313d2SEric Christopher call void @goo() 33cee313d2SEric Christopher ret void 34cee313d2SEric Christopherthird: 35cee313d2SEric Christopher call void @patatino() 36cee313d2SEric Christopher ret void 37cee313d2SEric Christopher} 38