1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -instcombine -S | FileCheck %s
7 define i32 @single_case() {
8 ; CHECK-LABEL: @single_case(
9 ; CHECK-NEXT: switch i32 ptrtoint (i32* @g to i32), label %x [
12 ; CHECK-NEXT: ret i32 0
14 switch i32 add (i32 ptrtoint (i32* @g to i32), i32 -1), label %x []
19 define i32 @multiple_cases() {
20 ; CHECK-LABEL: @multiple_cases(
21 ; CHECK-NEXT: switch i32 ptrtoint (i32* @g to i32), label %x [
22 ; CHECK-NEXT: i32 2, label %one
23 ; CHECK-NEXT: i32 3, label %two
26 ; CHECK-NEXT: ret i32 0
28 ; CHECK-NEXT: ret i32 1
30 ; CHECK-NEXT: ret i32 2
32 switch i32 add (i32 ptrtoint (i32* @g to i32), i32 -1), label %x [