brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 2a3769e Raw
31 lines · plain
1! Check that the branch weights used by the array repacking2! are propagated all the way to LLVM IR:3! RUN: %flang_fc1 -frepack-arrays -emit-llvm %s -o - | FileCheck %s4 5! CHECK-LABEL: define void @test_(6! CHECK-SAME:      ptr noalias [[TMP0:%.*]])7! CHECK:    [[TMP4:%.*]] = ptrtoint ptr [[TMP0]] to i648! CHECK:    [[TMP5:%.*]] = icmp ne i64 [[TMP4]], 09! CHECK:    br i1 [[TMP5]], label %[[BB6:.*]], label %[[BB46:.*]]10! CHECK:  [[BB6]]:11! CHECK:    [[TMP7:%.*]] = call i1 @_FortranAIsContiguous(ptr [[TMP0]])12! CHECK:    [[TMP8:%.*]] = icmp eq i1 [[TMP7]], false13! CHECK:    [[TMP13:%.*]] = and i1 [[TMP8]], [[TMP12:.*]]14! CHECK:    br i1 [[TMP13]], label %[[BB14:.*]], label %[[BB46]], !prof [[PROF2:![0-9]+]]15! CHECK:  [[BB14]]:16! CHECK:    call void @_FortranAShallowCopyDirect17! CHECK:    br label %[[BB46]]18! CHECK:  [[BB46]]:19! CHECK:    br i1 [[TMP5]], label %[[BB48:.*]], label %[[BB57:.*]]20! CHECK:  [[BB48]]:21! CHECK:    br i1 [[TMP55:.*]], label %[[BB56:.*]], label %[[BB57]], !prof [[PROF2]]22! CHECK:  [[BB56]]:23! CHECK:    call void @_FortranAShallowCopyDirect24! CHECK:    br label %[[BB57]]25! CHECK:  [[BB57]]:26! CHECK:    ret void27! CHECK: [[PROF2]] = !{!"branch_weights", i32 0, i32 1}28subroutine test(x)29  real :: x(:)30end subroutine test31