1 ; RUN: opt < %s -lowerswitch -S | FileCheck %s 2 ; CHECK-NOT: icmp eq i32 %0, 1 3 4 define i32 @foo(i32 %a) #0 { 5 entry: 6 %retval = alloca i32, align 4 7 %a.addr = alloca i32, align 4 8 store i32 %a, i32* %a.addr, align 4 9 %0 = load i32, i32* %a.addr, align 4 10 switch i32 %0, label %sw.default [ 11 i32 0, label %sw.bb 12 i32 1, label %sw.bb1 13 i32 2, label %sw.bb2 14 ] 15 16 sw.bb: 17 ret i32 12 18 19 sw.bb1: 20 ret i32 4 21 22 sw.bb2: 23 ret i32 2 24 25 sw.default: 26 ret i32 9 27 } 28