[PATCH] D19488: [CodeGenPrepare] use branch weight metadata to decide if a select should be turned into a branch

David Li via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 16:04:22 PDT 2016


davidxl added inline comments.

================
Comment at: test/CodeGen/X86/cmov-into-branch.ll:118
@@ -96,2 +117,3 @@
+
 !0 = !{!"branch_weights", i32 1, i32 99}
 !1 = !{!"branch_weights", i32 1, i32 100}
----------------
spatel wrote:
> Hmm - do you want to check for something different than 'weighted_select1()' above?
Ok - I mis-read the case -- what needs to be covered is already covered.  A minor suggestion -- the tests (select2, select3) are intended to test that meta data can drive decision to create branch -- but not necessarily to test the actual default 99%,1% threshold. For this reason, it might be better to make !1 and !2 prof data more extreme so that the tests are more robust.


http://reviews.llvm.org/D19488





More information about the llvm-commits mailing list