25 lines · plain
1; This test fails under the profcheck configuration due to profcheck creating2; metadata.3; UNSUPPORTED: profcheck4 5; Test prof-inject and prof-verify6 7; RUN: opt -passes=prof-inject %s -S -o - | FileCheck %s --check-prefix=INJECT8; RUN: not opt -passes=prof-verify %s -S -o - 2>&1 | FileCheck %s --check-prefix=VERIFY9; RUN: opt -passes=prof-inject,prof-verify %s --disable-output10; RUN: opt -enable-profcheck %s -S -o - | FileCheck %s --check-prefix=INJECT11 12define void @foo(i32 %i) !prof !0 {13 %c = icmp eq i32 %i, 014 br i1 %c, label %yes, label %no15yes:16 ret void17no:18 ret void19}20!0 = !{!"function_entry_count", i32 1}21 22; INJECT: br i1 %c, label %yes, label %no, !prof !123; INJECT: !1 = !{!"branch_weights", i32 3, i32 5}24 25; VERIFY: Profile verification failed: branch annotation missing