Hello,
Attached is the updated version of the patch.
Passed the bootstrap and gcc testsuite.
Thanks,
Dehao
Index: gcc/testsuite/gcc.dg/predict-3.c
===
--- gcc/testsuite/gcc.dg/predict-3.c(revision 0)
+++ gcc/testsuite/gcc.dg/pr
Hello,
This patch add a static branch predict heuristic for the following cases:
for (int i = 0; i < bound; i++) {
if (i < bound - 2)
computation_1();
else
computation_2();
}
In this case, we would predict the branch to be taken because it's
comparing loop induction variable to loop