[PATCH] D15536: [JumpThreading] Fix opcode bonus in getJumpThreadDuplicationCost()
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 29 08:35:03 PST 2015
mcrosier accepted this revision.
mcrosier added a reviewer: mcrosier.
mcrosier added a comment.
This revision is now accepted and ready to land.
This looks like a straight forward fix to unintended behavior. LGTM with one minor suggestion.
================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:346
@@ -337,3 +345,3 @@
return Size;
}
----------------
How about just:
return Size > Bonus ? Size - Bonus : 0;
http://reviews.llvm.org/D15536
More information about the llvm-commits
mailing list