Add some simplifications for MULH[SU]. This allows us to compile this:
authorChris Lattner <sabre@nondot.org>
Sun, 15 May 2005 05:39:08 +0000 (05:39 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 15 May 2005 05:39:08 +0000 (05:39 +0000)
commite5eb6f829c983dfe0da6634f5ea46a2bf16f359e
treeac5d141cdd1c84483b737208bec0bb5cb1db4d79
parent1e9448bce8ca7078049c0fd07826945aea75d36c
Add some simplifications for MULH[SU].  This allows us to compile this:

long %bar(long %X) {
  %Y = mul long %X, 4294967297
  ret long %Y
}

to this:

l1_bar:
        mov %EAX, DWORD PTR [%ESP + 4]
        mov %EDX, %EAX
        add %EDX, DWORD PTR [%ESP + 8]
        ret

instead of:

l1_bar:
        mov %ECX, DWORD PTR [%ESP + 4]
        mov %EDX, 1
        mov %EAX, %ECX
        mul %EDX
        add %EDX, %ECX
        add %EDX, DWORD PTR [%ESP + 8]
        mov %EAX, %ECX
        ret

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22044 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp