[MLGO] Update test for MBB Profile Dump
authorAiden Grossman <agrossman154@yahoo.com>
Thu, 9 Feb 2023 17:46:26 +0000 (17:46 +0000)
committerAiden Grossman <agrossman154@yahoo.com>
Thu, 9 Feb 2023 17:51:07 +0000 (17:51 +0000)
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

index 5486dd6..f5082ba 100644 (file)
@@ -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