[PATCH] D149390: [NFC][EarlyCSE]Modify test case to ensure branch weights are preserved with cse.
Mingming Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 2 17:35:32 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG297c10fd175a: [NFC][EarlyCSE]Modify test case to ensure branch weights are preserved with cse. (authored by mingmingl).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149390/new/
https://reviews.llvm.org/D149390
Files:
llvm/test/Transforms/EarlyCSE/basic.ll
Index: llvm/test/Transforms/EarlyCSE/basic.ll
===================================================================
--- llvm/test/Transforms/EarlyCSE/basic.ll
+++ llvm/test/Transforms/EarlyCSE/basic.ll
@@ -137,15 +137,18 @@
;; 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(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149390.518920.patch
Type: text/x-patch
Size: 819 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230503/190ae0d9/attachment.bin>
More information about the llvm-commits
mailing list