diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-04-12 22:19:57 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-04-12 22:19:57 +0000 |
commit | 2aae6ae57249de3de4de5d2f688b6e7cecae13f6 (patch) | |
tree | de8b2b9c8821a4f303282ac7bf1b1fc85e9c5516 /lib/Transforms/Utils/BasicBlockUtils.cpp | |
parent | 3b49063a83eecaa9dc05c29d27768f85c0622163 (diff) |
Micro-optimization:
If we have this situation:
jCC L1
jmp L2
L1:
...
L2:
...
We can get a small performance boost by emitting this instead:
jnCC L2
L1:
...
L2:
...
This testcase shows an example of this:
float func(float x, float y) {
double product = (double)x * y;
if (product == 0.0)
return product;
return product - 1.0;
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101075 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions