OSDN Git Service

Fix a dagga combiner bug: avoid creating illegal constant.
authorEvan Cheng <evan.cheng@apple.com>
Tue, 21 Jul 2009 05:40:15 +0000 (05:40 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 21 Jul 2009 05:40:15 +0000 (05:40 +0000)
commitd101a72d79d910abf781e6573be0edac99061acc
tree47f91aa667808478d445026acbb72ecec0af96e7
parentf53c371983908f02678b0e12c5d18466dcc70ffd
Fix a dagga combiner bug: avoid creating illegal constant.

Is this really a winning transformation?
fold (shl (srl x, c1), c2) -> (shl (and x, (shl -1, c1)), (sub c2, c1)) or
                              (srl (and x, (shl -1, c1)), (sub c1, c2))

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76535 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/2009-07-20-DAGCombineBug.ll [new file with mode: 0644]