[PATCH] D17353: Set minimum cost of speculating an instruction.
Dehao Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 18 10:50:05 PST 2016
danielcdh added a comment.
The lower_bound case is quite interesting. If the input value is close to first or last, which means branch prediction within the loop will be mostly correct, the non-if-converted version is 2X faster than if-converted version. If the the input value is completely randomly distributed, the if-converted version is 2X faster than non-if-converted version.
So overall, it's hard to make the decision without looking at the branch misprediction rate for the specific branch.
http://reviews.llvm.org/D17353
More information about the llvm-commits
mailing list