Home | History | Annotate | Download | only in SPARC
      1 ; RUN: opt < %s -simplifycfg -S -mtriple=sparc-unknown-unknown | FileCheck %s
      2 
      3 ; Check that switches are not turned into lookup tables, as this is not
      4 ; considered profitable on the target.
      5 
      6 define i32 @f(i32 %c) nounwind uwtable readnone {
      7 entry:
      8   switch i32 %c, label %sw.default [
      9     i32 42, label %return
     10     i32 43, label %sw.bb1
     11     i32 44, label %sw.bb2
     12     i32 45, label %sw.bb3
     13     i32 46, label %sw.bb4
     14     i32 47, label %sw.bb5
     15     i32 48, label %sw.bb6
     16   ]
     17 
     18 sw.bb1: br label %return
     19 sw.bb2: br label %return
     20 sw.bb3: br label %return
     21 sw.bb4: br label %return
     22 sw.bb5: br label %return
     23 sw.bb6: br label %return
     24 sw.default: br label %return
     25 return:
     26   %retval.0 = phi i32 [ 15, %sw.default ], [ 1, %sw.bb6 ], [ 62, %sw.bb5 ], [ 27, %sw.bb4 ], [ -1, %sw.bb3 ], [ 0, %sw.bb2 ], [ 123, %sw.bb1 ], [ 55, %entry ]
     27   ret i32 %retval.0
     28 
     29 ; CHECK-LABEL: @f(
     30 ; CHECK-NOT: getelementptr
     31 ; CHECK: switch i32 %c
     32 }
     33