[llvm] 297c10f - [NFC][EarlyCSE]Modify test case to ensure branch weights are preserved with cse.
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Tue May 2 17:35:24 PDT 2023
Author: Mingming Liu
Date: 2023-05-02T17:34:53-07:00
New Revision: 297c10fd175a2f0ff7cb293fcb2d149b065eaabe
URL: https://github.com/llvm/llvm-project/commit/297c10fd175a2f0ff7cb293fcb2d149b065eaabe
DIFF: https://github.com/llvm/llvm-project/commit/297c10fd175a2f0ff7cb293fcb2d149b065eaabe.diff
LOG: [NFC][EarlyCSE]Modify test case to ensure branch weights are preserved with cse.
Differential Revision: https://reviews.llvm.org/D149390
Added:
Modified:
llvm/test/Transforms/EarlyCSE/basic.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/EarlyCSE/basic.ll b/llvm/test/Transforms/EarlyCSE/basic.ll
index 0a743749cf3a..c6b746026c94 100644
--- a/llvm/test/Transforms/EarlyCSE/basic.ll
+++ b/llvm/test/Transforms/EarlyCSE/basic.ll
@@ -137,15 +137,18 @@ declare i32 @func(ptr%P) readonly
;; Simple call CSE'ing.
define i32 @test5(ptr%P) {
; CHECK-LABEL: @test5(
-; CHECK-NEXT: [[V1:%.*]] = call i32 @func(ptr [[P:%.*]])
+; CHECK-NEXT: [[V1:%.*]] = call i32 @func(ptr [[P:%.*]]), !prof !0
; CHECK-NEXT: ret i32 0
;
- %V1 = call i32 @func(ptr %P)
- %V2 = call i32 @func(ptr %P)
+ %V1 = call i32 @func(ptr %P), !prof !0
+ %V2 = call i32 @func(ptr %P), !prof !1
%Diff = sub i32 %V1, %V2
ret i32 %Diff
}
+!0 = !{!"branch_weights", i32 95}
+!1 = !{!"branch_weights", i32 95}
+
;; Trivial Store->load forwarding
define i32 @test6(ptr%P) {
; CHECK-LABEL: @test6(
More information about the llvm-commits
mailing list