brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 720116c Raw
75 lines · plain
1; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mattr=+thumb2 -arm-atomic-cfg-tidy=0 | FileCheck %s2; If-conversion defeats the purpose of this test, which is to check3; conditional branch generation, so a call to make sure it doesn't4; happen and we get actual branches.5 6declare void @foo()7 8define i32 @f1(i32 %a, i32 %b, ptr %v) {9entry:10; CHECK-LABEL: f1:11; CHECK: bne LBB12        %tmp = icmp eq i32 %a, %b               ; <i1> [#uses=1]13        br i1 %tmp, label %cond_true, label %return14 15cond_true:              ; preds = %entry16        call void @foo()17        store i32 0, ptr %v18        ret i32 019 20return:         ; preds = %entry21        call void @foo()22        ret i32 123}24 25define i32 @f2(i32 %a, i32 %b, ptr %v) {26entry:27; CHECK-LABEL: f2:28; CHECK: bge LBB29        %tmp = icmp slt i32 %a, %b              ; <i1> [#uses=1]30        br i1 %tmp, label %cond_true, label %return31 32cond_true:              ; preds = %entry33        call void @foo()34        store i32 0, ptr %v35        ret i32 036 37return:         ; preds = %entry38        call void @foo()39        ret i32 140}41 42define i32 @f3(i32 %a, i32 %b, ptr %v) {43entry:44; CHECK-LABEL: f3:45; CHECK: bhs LBB46        %tmp = icmp ult i32 %a, %b              ; <i1> [#uses=1]47        br i1 %tmp, label %cond_true, label %return48 49cond_true:              ; preds = %entry50        call void @foo()51        store i32 0, ptr %v52        ret i32 053 54return:         ; preds = %entry55        call void @foo()56        ret i32 157}58 59define i32 @f4(i32 %a, i32 %b, ptr %v) {60entry:61; CHECK-LABEL: f4:62; CHECK: blo LBB63        %tmp = icmp uge i32 %a, %b              ; <i1> [#uses=1]64        br i1 %tmp, label %cond_true, label %return65 66cond_true:              ; preds = %entry67        call void @foo()68        store i32 0, ptr %v69        ret i32 070 71return:         ; preds = %entry72        call void @foo()73        ret i32 174}75