Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: test/Transforms/NaCl/strip-branchweight-metadata.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/Transforms/NaCl/strip-attributes.ll ('k') | test/Transforms/NaCl/strip-meta-leaves-debug.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Transforms/NaCl/strip-branchweight-metadata.ll
diff --git a/test/Transforms/NaCl/strip-branchweight-metadata.ll b/test/Transforms/NaCl/strip-branchweight-metadata.ll
new file mode 100644
index 0000000000000000000000000000000000000000..61d3a6d5af476a7d67dfd94473f63cc4ebc7ef63
--- /dev/null
+++ b/test/Transforms/NaCl/strip-branchweight-metadata.ll
@@ -0,0 +1,29 @@
+; RUN: opt -S -strip-metadata %s | FileCheck %s
+
+; Test that !prof metadata is removed from branches
+; CHECK: @foo
+; CHECK-NOT: !prof
+define i32 @foo(i32 %c) {
+ switch i32 %c, label %3 [
+ i32 5, label %4
+ i32 0, label %1
+ i32 4, label %2
+ ], !prof !0
+
+; <label>:1 ; preds = %0
+ br label %4
+
+; <label>:2 ; preds = %0
+ br label %4
+
+; <label>:3 ; preds = %0
+ br label %4
+
+; <label>:4 ; preds = %0, %3, %2, %1
+ %.0 = phi i32 [ -1, %1 ], [ 99, %2 ], [ 1, %3 ], [ 0, %0 ]
+ ret i32 %.0
+}
+
+; CHECK: ret i32 %.0
+; CHECK-NOT: !0 =
+!0 = metadata !{metadata !"branch_weights", i32 4, i32 256, i32 8, i32 4}
« no previous file with comments | « test/Transforms/NaCl/strip-attributes.ll ('k') | test/Transforms/NaCl/strip-meta-leaves-debug.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698