From 08b170808458b9ccc40d760752ad7c49bd2a1324 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Thu, 9 Feb 2023 17:46:26 +0000 Subject: [PATCH] [MLGO] Update test for MBB Profile Dump This patch updates the test for the MBB profile dump to include a function that has multiple basic blocks so that we can test the numbering of multiple basic blocks within an individual function. --- llvm/test/CodeGen/MLRegalloc/bb-profile-dump.ll | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llvm/test/CodeGen/MLRegalloc/bb-profile-dump.ll b/llvm/test/CodeGen/MLRegalloc/bb-profile-dump.ll index 5486dd6..f5082ba 100644 --- a/llvm/test/CodeGen/MLRegalloc/bb-profile-dump.ll +++ b/llvm/test/CodeGen/MLRegalloc/bb-profile-dump.ll @@ -14,8 +14,15 @@ define i64 @f2(i64 %a, i64 %b) { define i64 @f1() { %sum = call i64 @f2(i64 2, i64 2) + %isEqual = icmp eq i64 %sum, 4 + br i1 %isEqual, label %ifEqual, label %ifNotEqual +ifEqual: + ret i64 0 +ifNotEqual: ret i64 %sum } ; CHECK: f2,0,1.000000e+00 ; CHECK-NEXT: f1,0,1.000000e+00 +; CHECK-NEXT: f1,1,5.000000e-01 +; CHECK-NEXT: f1,2,1.000000e+00 -- 2.7.4