brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 591fb32 Raw
75 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc < %s -mtriple=x86_64 -mattr=+branch-hint -enable-branch-hint | FileCheck %s3; RUN: llc < %s -mtriple=x86_64 -mattr=+branch-hint -enable-branch-hint -branch-hint-probability-threshold=50 | FileCheck %s4; RUN: llc < %s -mtriple=x86_64 -mattr=+branch-hint -enable-branch-hint -branch-hint-probability-threshold=60 -tail-dup-placement=false | FileCheck --check-prefix=TH60 %s5 6 7; Design: Add DS segment override prefix for condition branch who has high8; probability to take (which is greater than the probability threshold of9; enabling branch hint).10 11define void @p51(i32 %x, ptr %p) {12; CHECK-LABEL: p51:13; CHECK:       # %bb.0: # %entry14; CHECK-NEXT:    testl %edi, %edi15; CHECK-NEXT:    ds16; CHECK-NEXT:    je .LBB0_217; CHECK-NEXT:  # %bb.1: # %if.then18; CHECK-NEXT:    movl %edi, (%rsi)19; CHECK-NEXT:  .LBB0_2: # %if.end20; CHECK-NEXT:    retq21;22; TH60-LABEL: p51:23; TH60:       # %bb.0: # %entry24; TH60-NEXT:    testl %edi, %edi25; TH60-NEXT:    je .LBB0_226; TH60-NEXT:  # %bb.1: # %if.then27; TH60-NEXT:    movl %edi, (%rsi)28; TH60-NEXT:  .LBB0_2: # %if.end29; TH60-NEXT:    retq30entry:31  %tobool.not = icmp eq i32 %x, 032  br i1 %tobool.not, label %if.end, label %if.then, !prof !033 34if.then:35  store i32 %x, ptr %p, align 436  br label %if.end37 38if.end:39  ret void40}41 42define void @p61(i32 %x, ptr %p) {43; CHECK-LABEL: p61:44; CHECK:       # %bb.0: # %entry45; CHECK-NEXT:    testl %edi, %edi46; CHECK-NEXT:    jne .LBB1_147; CHECK-NEXT:  # %bb.2: # %if.end48; CHECK-NEXT:    retq49; CHECK-NEXT:  .LBB1_1: # %if.then50; CHECK-NEXT:    movl %edi, (%rsi)51; CHECK-NEXT:    retq52;53; TH60-LABEL: p61:54; TH60:       # %bb.0: # %entry55; TH60-NEXT:    testl %edi, %edi56; TH60-NEXT:    ds57; TH60-NEXT:    je .LBB1_258; TH60-NEXT:  # %bb.1: # %if.then59; TH60-NEXT:    movl %edi, (%rsi)60; TH60-NEXT:  .LBB1_2: # %if.end61; TH60-NEXT:    retq62entry:63  %tobool.not = icmp eq i32 %x, 064  br i1 %tobool.not, label %if.end, label %if.then, !prof !165 66if.then:67  store i32 %x, ptr %p, align 468  br label %if.end69 70if.end:71  ret void72}73 74!0 = !{!"branch_weights", i32 51, i32 49}75!1 = !{!"branch_weights", i32 61, i32 39}