Teach InstCombine's ComputeMaskedBits what SelectionDAG's
authorDan Gohman <gohman@apple.com>
Mon, 28 Apr 2008 17:02:21 +0000 (17:02 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 28 Apr 2008 17:02:21 +0000 (17:02 +0000)
commit23e8b715267a64381e2fff8c208da1f24b387b83
treef306de3e44e0b534d1dab023bfbafded2cd1c35b
parent8f0ad582e81e24f2ab35f9e9d2308339c8e8cbeb
Teach InstCombine's ComputeMaskedBits what SelectionDAG's
ComputeMaskedBits knows about cttz, ctlz, and ctpop. Teach
SelectionDAG's ComputeMaskedBits what InstCombine's knows
about SRem. And teach them both some things about high bits
in Mul, UDiv, URem, and Sub. This allows instcombine and
dagcombine to eliminate sign-extension operations in
several new cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50358 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/sext-misc.ll [new file with mode: 0644]