Teach jump threading to duplicate small blocks when the branch
authorChris Lattner <sabre@nondot.org>
Tue, 12 Jan 2010 02:07:17 +0000 (02:07 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 12 Jan 2010 02:07:17 +0000 (02:07 +0000)
commit2249a0b1bd0941e61c0b87f2f64a5c8cab45f14c
tree6b58f509e04767cf04df9b6e1adbecf402537120
parent68c3def12618f73ec237359cb07f8e9e68d50b3a
Teach jump threading to duplicate small blocks when the branch
condition is a xor with a phi node.  This eliminates nonsense
like this from 176.gcc in several places:

 LBB166_84:
        testl   %eax, %eax
-       setne   %al
-       xorb    %cl, %al
-       notb    %al
-       testb   $1, %al
-       je      LBB166_85
+       je      LBB166_69
+       jmp     LBB166_85

This is rdar://7391699

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93221 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/JumpThreading.cpp
test/Transforms/JumpThreading/basic.ll