Merge two almost-identical pieces of code.
authorChris Lattner <sabre@nondot.org>
Mon, 27 Feb 2006 02:38:23 +0000 (02:38 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 27 Feb 2006 02:38:23 +0000 (02:38 +0000)
commit3e88a4d700d912e9a5d91f22f4f9026783aec709
tree76086007d6c50186323a7dc61e81e26ab49ae308
parentf76f5da19b339b25e8f8f6cdd361dbe4ff4f197b
Merge two almost-identical pieces of code.

Make this code more powerful by using ComputeMaskedBits instead of looking
for an AND operand.  This lets us fold this:

int %test23(int %a) {
        %tmp.1 = and int %a, 1
        %tmp.2 = seteq int %tmp.1, 0
        %tmp.3 = cast bool %tmp.2 to int  ;; xor tmp1, 1
        ret int %tmp.3
}

into: xor (and a, 1), 1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26396 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp