1 ; This test case will cause an internal EK_GPRel64BlockAddress to be 2 ; produced. This was not handled for direct object and an assertion 3 ; to occur. This is a variation on test case test/CodeGen/Mips/do_switch.ll 4 5 ; RUN: llc < %s -filetype=obj -march=mips -relocation-model=static 6 7 ; RUN: llc < %s -filetype=obj -march=mips -relocation-model=pic 8 9 ; RUN: llc < %s -filetype=obj -march=mips64 -relocation-model=pic -mcpu=mips64 -mattr=n64 10 11 define i32 @main() nounwind readnone { 12 entry: 13 %x = alloca i32, align 4 ; <i32*> [#uses=2] 14 store volatile i32 2, i32* %x, align 4 15 %0 = load volatile i32* %x, align 4 ; <i32> [#uses=1] 16 17 switch i32 %0, label %bb4 [ 18 i32 0, label %bb5 19 i32 1, label %bb1 20 i32 2, label %bb2 21 i32 3, label %bb3 22 ] 23 24 bb1: ; preds = %entry 25 ret i32 2 26 27 bb2: ; preds = %entry 28 ret i32 0 29 30 bb3: ; preds = %entry 31 ret i32 3 32 33 bb4: ; preds = %entry 34 ret i32 4 35 36 bb5: ; preds = %entry 37 ret i32 1 38 } 39 40