brintos

brintos / llvm-project-archived public Read only

0
0
Text · 819 B · 5ffe1f9 Raw
48 lines · plain
1; RUN: llc < %s -mtriple=thumbv7-linux-gnueabihf -O1 %s -o - | FileCheck %s2 3; CHECK-LABEL: test_jump_table:4; CHECK: b{{.*}} .LBB5; CHECK-NOT: tbh6 7define i32 @test_jump_table(i32 %x, float %in) {8 9h1:10 11 %b0 = fadd float %in, 1234.512 %b1 = fptoui float %b0 to i3213  14  switch i32 %x, label %h2 [15    i32 0, label %h316    i32 2, label %h417    i32 4, label %h518    i32 6, label %h619  ]20 21h2:22  %a0 = add i32 %x, 523  br label %h324 25h3:26  %d2 = phi i32 [%b1, %h1], [%a0, %h2]27  %d3 = add i32 %d2, 328  br label %h429 30h4:31  %c2 = phi i32 [%b1, %h1], [%d3, %h3]32  %c3 = add i32 %c2, 533  br label %h534 35h5:36  %a2 = phi i32 [%b1, %h1], [%c3, %h4]37  %a3 = add i32 %a2, 638  br label %h639 40h6:41  %y = phi i32 [0, %h1], [%a3, %h5]42  call i32 @llvm.arm.space(i32 2000, i32 undef)43  ret i32 %y44  45}46 47declare i32 @llvm.arm.space(i32, i32)48