diff options
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/Transforms/PGOProfile/branch1_gen.ll | 21 | ||||
-rw-r--r-- | llvm/test/Transforms/PGOProfile/branch2_gen.ll | 25 | ||||
-rw-r--r-- | llvm/test/Transforms/PGOProfile/criticaledge_gen.ll | 71 | ||||
-rw-r--r-- | llvm/test/Transforms/PGOProfile/criticaledge_use.ll | 74 | ||||
-rw-r--r-- | llvm/test/Transforms/PGOProfile/landingpad_gen.ll | 95 | ||||
-rw-r--r-- | llvm/test/Transforms/PGOProfile/loop3_gen.ll | 59 | ||||
-rw-r--r-- | llvm/test/Transforms/PGOProfile/loop3_use.ll | 63 | ||||
-rw-r--r-- | llvm/test/Transforms/PGOProfile/noprofile_use.ll | 9 | ||||
-rw-r--r-- | llvm/test/Transforms/PGOProfile/switch_gen.ll | 34 | ||||
-rw-r--r-- | llvm/test/Transforms/PGOProfile/switch_use.ll | 36 |
10 files changed, 0 insertions, 487 deletions
diff --git a/llvm/test/Transforms/PGOProfile/branch1_gen.ll b/llvm/test/Transforms/PGOProfile/branch1_gen.ll deleted file mode 100644 index a8f896b14a6..00000000000 --- a/llvm/test/Transforms/PGOProfile/branch1_gen.ll +++ /dev/null @@ -1,21 +0,0 @@ -; RUN: opt < %s -pgo-instr-gen -S | FileCheck %s -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -; CHECK: @__llvm_profile_name__Z9test_br_1i = private constant [13 x i8] c"_Z9test_br_1i" - -define i32 @_Z9test_br_1i(i32 %i) { -entry: - %cmp = icmp sgt i32 %i, 0 - br i1 %cmp, label %if.then, label %if.end - -if.then: -; CHECK: call void @llvm.instrprof.increment(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__llvm_profile_name__Z9test_br_1i, i32 0, i32 0), i64 23925403969, i32 2, i32 1) - %add = add nsw i32 %i, 2 - br label %if.end - -if.end: - %retv = phi i32 [ %add, %if.then ], [ %i, %entry ] -; CHECK: call void @llvm.instrprof.increment(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__llvm_profile_name__Z9test_br_1i, i32 0, i32 0), i64 23925403969, i32 2, i32 0) - ret i32 %retv -} diff --git a/llvm/test/Transforms/PGOProfile/branch2_gen.ll b/llvm/test/Transforms/PGOProfile/branch2_gen.ll deleted file mode 100644 index 2c18b6d097b..00000000000 --- a/llvm/test/Transforms/PGOProfile/branch2_gen.ll +++ /dev/null @@ -1,25 +0,0 @@ -; RUN: opt < %s -pgo-instr-gen -S | FileCheck %s -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -; CHECK: @__llvm_profile_name__Z9test_br_2i = private constant [13 x i8] c"_Z9test_br_2i" - -define i32 @_Z9test_br_2i(i32 %i) { -entry: - %cmp = icmp sgt i32 %i, 0 - br i1 %cmp, label %if.then, label %if.else - -if.then: -; CHECK: call void @llvm.instrprof.increment(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__llvm_profile_name__Z9test_br_2i, i32 0, i32 0), i64 29368252703, i32 2, i32 0) - %add = add nsw i32 %i, 2 - br label %if.end - -if.else: -; CHECK: call void @llvm.instrprof.increment(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__llvm_profile_name__Z9test_br_2i, i32 0, i32 0), i64 29368252703, i32 2, i32 1) - %sub = sub nsw i32 %i, 2 - br label %if.end - -if.end: - %retv = phi i32 [ %add, %if.then ], [ %sub, %if.else ] - ret i32 %retv -} diff --git a/llvm/test/Transforms/PGOProfile/criticaledge_gen.ll b/llvm/test/Transforms/PGOProfile/criticaledge_gen.ll deleted file mode 100644 index eeb02a05fac..00000000000 --- a/llvm/test/Transforms/PGOProfile/criticaledge_gen.ll +++ /dev/null @@ -1,71 +0,0 @@ -; RUN: opt < %s -pgo-instr-gen -S | FileCheck %s -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -; CHECK: @__llvm_profile_name__Z17test_criticalEdgeii = private constant [23 x i8] c"_Z17test_criticalEdgeii" -; CHECK: @"__llvm_profile_name_<stdin>:_ZL3bari" = private constant [16 x i8] c"<stdin>:_ZL3bari" - -define i32 @_Z17test_criticalEdgeii(i32 %i, i32 %j) { -entry: - switch i32 %i, label %sw.default [ - i32 1, label %sw.bb - i32 2, label %sw.bb1 - i32 3, label %sw.bb3 - i32 4, label %sw.bb3 -; CHECK: i32 3, label %entry.sw.bb3_crit_edge -; CHECK: i32 4, label %entry.sw.bb3_crit_edge1 - i32 5, label %sw.bb3 - ] - -; CHECK: entry.sw.bb3_crit_edge1: -; CHECK: br label %sw.bb3 - -; CHECK: entry.sw.bb3_crit_edge: -; CHECK: br label %sw.bb3 - -sw.bb: - %call = call i32 @_ZL3bari(i32 2) - br label %sw.epilog - -sw.bb1: - %call2 = call i32 @_ZL3bari(i32 1024) - br label %sw.epilog - -sw.bb3: - %cmp = icmp eq i32 %j, 2 - br i1 %cmp, label %if.then, label %if.end - -if.then: - %call4 = call i32 @_ZL3bari(i32 4) - br label %return - -if.end: - %call5 = call i32 @_ZL3bari(i32 8) - br label %sw.epilog - -sw.default: - %call6 = call i32 @_ZL3bari(i32 32) - %cmp7 = icmp sgt i32 %j, 10 - br i1 %cmp7, label %if.then8, label %if.end9 - -if.then8: - %add = add nsw i32 %call6, 10 - br label %if.end9 - -if.end9: - %res.0 = phi i32 [ %add, %if.then8 ], [ %call6, %sw.default ] - br label %sw.epilog - -sw.epilog: - %res.1 = phi i32 [ %res.0, %if.end9 ], [ %call5, %if.end ], [ %call2, %sw.bb1 ], [ %call, %sw.bb ] - br label %return - -return: - %retval = phi i32 [ %res.1, %sw.epilog ], [ %call4, %if.then ] - ret i32 %retval -} - -define internal i32 @_ZL3bari(i32 %i) { -entry: - ret i32 %i -} diff --git a/llvm/test/Transforms/PGOProfile/criticaledge_use.ll b/llvm/test/Transforms/PGOProfile/criticaledge_use.ll deleted file mode 100644 index 0c866d9f1ce..00000000000 --- a/llvm/test/Transforms/PGOProfile/criticaledge_use.ll +++ /dev/null @@ -1,74 +0,0 @@ -; RUN: llvm-profdata merge %S/Inputs/criticaledge.proftext -o %T/criticaledge.profdata -; RUN: opt < %s -pgo-instr-use -pgo-profile-file=%T/criticaledge.profdata -S | FileCheck %s -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -define i32 @_Z17test_criticalEdgeii(i32 %i, i32 %j) { -entry: - switch i32 %i, label %sw.default [ - i32 1, label %sw.bb - i32 2, label %sw.bb1 - i32 3, label %sw.bb3 - i32 4, label %sw.bb3 -; CHECK: i32 3, label %entry.sw.bb3_crit_edge -; CHECK: i32 4, label %entry.sw.bb3_crit_edge1 - i32 5, label %sw.bb3 - ] -; CHECK: !prof ! - -; CHECK: entry.sw.bb3_crit_edge1: -; CHECK: br label %sw.bb3 -; CHECK: entry.sw.bb3_crit_edge: -; CHECK: br label %sw.bb3 - -sw.bb: - %call = call i32 @_ZL3bari(i32 2) - br label %sw.epilog - -sw.bb1: - %call2 = call i32 @_ZL3bari(i32 1024) - br label %sw.epilog - -sw.bb3: - %cmp = icmp eq i32 %j, 2 - br i1 %cmp, label %if.then, label %if.end -; CHECK: !prof ! - -if.then: - %call4 = call i32 @_ZL3bari(i32 4) - br label %return - -if.end: - %call5 = call i32 @_ZL3bari(i32 8) - br label %sw.epilog - -sw.default: - %call6 = call i32 @_ZL3bari(i32 32) - %cmp7 = icmp sgt i32 %j, 10 - br i1 %cmp7, label %if.then8, label %if.end9 -; CHECK: !prof ! - -if.then8: - %add = add nsw i32 %call6, 10 - br label %if.end9 - -if.end9: - %res.0 = phi i32 [ %add, %if.then8 ], [ %call6, %sw.default ] - br label %sw.epilog - -sw.epilog: - %res.1 = phi i32 [ %res.0, %if.end9 ], [ %call5, %if.end ], [ %call2, %sw.bb1 ], [ %call, %sw.bb ] - br label %return - -return: - %retval = phi i32 [ %res.1, %sw.epilog ], [ %call4, %if.then ] - ret i32 %retval -} - -define internal i32 @_ZL3bari(i32 %i) { -entry: - ret i32 %i -} - -; CHECK-DAG: !{!"branch_weights", i32 2, i32 2} -; CHECK-DAG: !{!"branch_weights", i32 1, i32 1} diff --git a/llvm/test/Transforms/PGOProfile/landingpad_gen.ll b/llvm/test/Transforms/PGOProfile/landingpad_gen.ll deleted file mode 100644 index 7b5a90e6541..00000000000 --- a/llvm/test/Transforms/PGOProfile/landingpad_gen.ll +++ /dev/null @@ -1,95 +0,0 @@ -; RUN: opt < %s -pgo-instr-gen -S | FileCheck %s -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -@val = global i32 0, align 4 -@_ZTIi = external constant i8* -; CHECK: @__llvm_profile_name__Z3bari = private constant [7 x i8] c"_Z3bari" -; CHECK: @__llvm_profile_name__Z3fooi = private constant [7 x i8] c"_Z3fooi" - -define i32 @_Z3bari(i32 %i) { -entry: - %rem = srem i32 %i, 3 - %tobool = icmp ne i32 %rem, 0 - br i1 %tobool, label %if.then, label %if.end - -if.then: -; CHECK: call void @llvm.instrprof.increment(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__llvm_profile_name__Z3bari, i32 0, i32 0), i64 23319865734, i32 2, i32 1) - %exception = call i8* @__cxa_allocate_exception(i64 4) - %tmp = bitcast i8* %exception to i32* - store i32 %i, i32* %tmp, align 16 - call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null) - unreachable - -if.end: -; CHECK: call void @llvm.instrprof.increment(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__llvm_profile_name__Z3bari, i32 0, i32 0), i64 23319865734, i32 2, i32 0) - ret i32 0 -} - -declare i8* @__cxa_allocate_exception(i64) - -declare void @__cxa_throw(i8*, i8*, i8*) - -define i32 @_Z3fooi(i32 %i) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) { -entry: - %rem = srem i32 %i, 2 - %tobool = icmp ne i32 %rem, 0 - br i1 %tobool, label %if.then, label %if.end - -if.then: - %mul = mul nsw i32 %i, 7 - %call = invoke i32 @_Z3bari(i32 %mul) - to label %invoke.cont unwind label %lpad - -invoke.cont: -; CHECK: call void @llvm.instrprof.increment(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__llvm_profile_name__Z3fooi, i32 0, i32 0), i64 57451243578, i32 4, i32 1) - br label %if.end - -lpad: - %tmp = landingpad { i8*, i32 } - catch i8* bitcast (i8** @_ZTIi to i8*) - %tmp1 = extractvalue { i8*, i32 } %tmp, 0 - %tmp2 = extractvalue { i8*, i32 } %tmp, 1 - br label %catch.dispatch - -catch.dispatch: - %tmp3 = call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @_ZTIi to i8*)) - %matches = icmp eq i32 %tmp2, %tmp3 - br i1 %matches, label %catch, label %eh.resume - -catch: -; CHECK: call void @llvm.instrprof.increment(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__llvm_profile_name__Z3fooi, i32 0, i32 0), i64 57451243578, i32 4, i32 2) - %tmp4 = call i8* @__cxa_begin_catch(i8* %tmp1) - %tmp5 = bitcast i8* %tmp4 to i32* - %tmp6 = load i32, i32* %tmp5, align 4 - %tmp7 = load i32, i32* @val, align 4 - %sub = sub nsw i32 %tmp7, %tmp6 - store i32 %sub, i32* @val, align 4 - call void @__cxa_end_catch() - br label %try.cont - -try.cont: - ret i32 -1 - -if.end: -; CHECK: call void @llvm.instrprof.increment(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__llvm_profile_name__Z3fooi, i32 0, i32 0), i64 57451243578, i32 4, i32 0) - %tmp8 = load i32, i32* @val, align 4 - %add = add nsw i32 %tmp8, %i - store i32 %add, i32* @val, align 4 - br label %try.cont - -eh.resume: -; CHECK: call void @llvm.instrprof.increment(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__llvm_profile_name__Z3fooi, i32 0, i32 0), i64 57451243578, i32 4, i32 3) - %lpad.val = insertvalue { i8*, i32 } undef, i8* %tmp1, 0 - %lpad.val3 = insertvalue { i8*, i32 } %lpad.val, i32 %tmp2, 1 - resume { i8*, i32 } %lpad.val3 -} - -declare i32 @__gxx_personality_v0(...) - -declare i32 @llvm.eh.typeid.for(i8*) - -declare i8* @__cxa_begin_catch(i8*) - -declare void @__cxa_end_catch() - diff --git a/llvm/test/Transforms/PGOProfile/loop3_gen.ll b/llvm/test/Transforms/PGOProfile/loop3_gen.ll deleted file mode 100644 index 368fb193b18..00000000000 --- a/llvm/test/Transforms/PGOProfile/loop3_gen.ll +++ /dev/null @@ -1,59 +0,0 @@ -; RUN: opt < %s -pgo-instr-gen -S | FileCheck %s -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -; CHECK: @__llvm_profile_name__Z15test_nested_foriii = private constant [22 x i8] c"_Z15test_nested_foriii" - -define i32 @_Z15test_nested_foriii(i32 %r, i32 %s, i32 %t) { -entry: - br label %for.cond - -for.cond: - %i.0 = phi i32 [ 0, %entry ], [ %inc12, %for.inc11 ] - %nested_for_sum.0 = phi i32 [ 1, %entry ], [ %nested_for_sum.1, %for.inc11 ] - %cmp = icmp slt i32 %i.0, %r - br i1 %cmp, label %for.body, label %for.end13 - -for.body: - br label %for.cond1 - -for.cond1: - %j.0 = phi i32 [ 0, %for.body ], [ %inc9, %for.inc8 ] - %nested_for_sum.1 = phi i32 [ %nested_for_sum.0, %for.body ], [ %nested_for_sum.2, %for.inc8 ] - %cmp2 = icmp slt i32 %j.0, %s - br i1 %cmp2, label %for.body3, label %for.end10 - -for.body3: - br label %for.cond4 - -for.cond4: - %k.0 = phi i32 [ 0, %for.body3 ], [ %inc7, %for.inc ] - %nested_for_sum.2 = phi i32 [ %nested_for_sum.1, %for.body3 ], [ %inc, %for.inc ] - %cmp5 = icmp slt i32 %k.0, %t - br i1 %cmp5, label %for.body6, label %for.end - -for.body6: - %inc = add nsw i32 %nested_for_sum.2, 1 - br label %for.inc - -for.inc: - %inc7 = add nsw i32 %k.0, 1 - br label %for.cond4 - -for.end: - br label %for.inc8 - -for.inc8: - %inc9 = add nsw i32 %j.0, 1 - br label %for.cond1 - -for.end10: - br label %for.inc11 - -for.inc11: - %inc12 = add nsw i32 %i.0, 1 - br label %for.cond - -for.end13: - ret i32 %nested_for_sum.0 -} diff --git a/llvm/test/Transforms/PGOProfile/loop3_use.ll b/llvm/test/Transforms/PGOProfile/loop3_use.ll deleted file mode 100644 index c24f44c7bef..00000000000 --- a/llvm/test/Transforms/PGOProfile/loop3_use.ll +++ /dev/null @@ -1,63 +0,0 @@ -; RUN: llvm-profdata merge %S/Inputs/loop3.proftext -o %T/loop3.profdata -; RUN: opt < %s -pgo-instr-use -pgo-profile-file=%T/loop3.profdata -S | FileCheck %s -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -define i32 @_Z15test_nested_foriii(i32 %r, i32 %s, i32 %t) { -entry: - br label %for.cond - -for.cond: - %i.0 = phi i32 [ 0, %entry ], [ %inc12, %for.inc11 ] - %nested_for_sum.0 = phi i32 [ 1, %entry ], [ %nested_for_sum.1, %for.inc11 ] - %cmp = icmp slt i32 %i.0, %r - br i1 %cmp, label %for.body, label %for.end13 -; CHECK: !prof - -for.body: - br label %for.cond1 - -for.cond1: - %j.0 = phi i32 [ 0, %for.body ], [ %inc9, %for.inc8 ] - %nested_for_sum.1 = phi i32 [ %nested_for_sum.0, %for.body ], [ %nested_for_sum.2, %for.inc8 ] - %cmp2 = icmp slt i32 %j.0, %s - br i1 %cmp2, label %for.body3, label %for.end10 -; CHECK: !prof - -for.body3: - br label %for.cond4 - -for.cond4: - %k.0 = phi i32 [ 0, %for.body3 ], [ %inc7, %for.inc ] - %nested_for_sum.2 = phi i32 [ %nested_for_sum.1, %for.body3 ], [ %inc, %for.inc ] - %cmp5 = icmp slt i32 %k.0, %t - br i1 %cmp5, label %for.body6, label %for.end -; CHECK: !prof - -for.body6: - %inc = add nsw i32 %nested_for_sum.2, 1 - br label %for.inc - -for.inc: - %inc7 = add nsw i32 %k.0, 1 - br label %for.cond4 - -for.end: - br label %for.inc8 - -for.inc8: - %inc9 = add nsw i32 %j.0, 1 - br label %for.cond1 - -for.end10: - br label %for.inc11 - -for.inc11: - %inc12 = add nsw i32 %i.0, 1 - br label %for.cond - -for.end13: - ret i32 %nested_for_sum.0 -} - -; CHECK: !{!"branch_weights" diff --git a/llvm/test/Transforms/PGOProfile/noprofile_use.ll b/llvm/test/Transforms/PGOProfile/noprofile_use.ll deleted file mode 100644 index 25e39ecff4c..00000000000 --- a/llvm/test/Transforms/PGOProfile/noprofile_use.ll +++ /dev/null @@ -1,9 +0,0 @@ -; RUN: not opt < %s -pgo-instr-use -pgo-profile-file=%T/notexisting.profdata -S - -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -define i32 @_Z9single_bbv() { -entry: - ret i32 0 -} diff --git a/llvm/test/Transforms/PGOProfile/switch_gen.ll b/llvm/test/Transforms/PGOProfile/switch_gen.ll deleted file mode 100644 index ab1c601c99a..00000000000 --- a/llvm/test/Transforms/PGOProfile/switch_gen.ll +++ /dev/null @@ -1,34 +0,0 @@ -; RUN: opt < %s -pgo-instr-gen -S | FileCheck %s -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -; CHECK: @__llvm_profile_name__Z13test_switch_1i = private constant [18 x i8] c"_Z13test_switch_1i" - -define i32 @_Z13test_switch_1i(i32 %i) { -entry: - switch i32 %i, label %sw.default [ - i32 1, label %sw.bb - i32 2, label %sw.bb1 - i32 3, label %sw.bb3 - ] - -sw.bb: - %add = add nsw i32 %i, 2 - br label %sw.epilog - -sw.bb1: - %add2 = add nsw i32 %i, 100 - br label %sw.epilog - -sw.bb3: - %add4 = add nsw i32 %i, 4 - br label %sw.epilog - -sw.default: - %add5 = add nsw i32 %i, 1 - br label %sw.epilog - -sw.epilog: - %retv = phi i32 [ %add5, %sw.default ], [ %add4, %sw.bb3 ], [ %add2, %sw.bb1 ], [ %add, %sw.bb ] - ret i32 %retv -} diff --git a/llvm/test/Transforms/PGOProfile/switch_use.ll b/llvm/test/Transforms/PGOProfile/switch_use.ll deleted file mode 100644 index 5e362b16cf0..00000000000 --- a/llvm/test/Transforms/PGOProfile/switch_use.ll +++ /dev/null @@ -1,36 +0,0 @@ -; RUN: llvm-profdata merge %S/Inputs/switch.proftext -o %T/switch.profdata -; RUN: opt < %s -pgo-instr-use -pgo-profile-file=%T/switch.profdata -S | FileCheck %s -target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -define i32 @_Z13test_switch_1i(i32 %i) { -entry: - switch i32 %i, label %sw.default [ - i32 1, label %sw.bb - i32 2, label %sw.bb1 - i32 3, label %sw.bb3 - ] -; CHECK: !prof !0 - -sw.bb: - %add = add nsw i32 %i, 2 - br label %sw.epilog - -sw.bb1: - %add2 = add nsw i32 %i, 100 - br label %sw.epilog - -sw.bb3: - %add4 = add nsw i32 %i, 4 - br label %sw.epilog - -sw.default: - %add5 = add nsw i32 %i, 1 - br label %sw.epilog - -sw.epilog: - %retv = phi i32 [ %add5, %sw.default ], [ %add4, %sw.bb3 ], [ %add2, %sw.bb1 ], [ %add, %sw.bb ] - ret i32 %retv -} - -; CHECK: !0 = !{!"branch_weights" |