Micro-optimization:
authorBill Wendling <isanbard@gmail.com>
Mon, 12 Apr 2010 22:19:57 +0000 (22:19 +0000)
committerBill Wendling <isanbard@gmail.com>
Mon, 12 Apr 2010 22:19:57 +0000 (22:19 +0000)
commit2aae6ae57249de3de4de5d2f688b6e7cecae13f6
treede8b2b9c8821a4f303282ac7bf1b1fc85e9c5516
parent3b49063a83eecaa9dc05c29d27768f85c0622163
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
lib/Target/X86/X86InstrInfo.cpp
test/CodeGen/X86/brcond.ll