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)
commita7bb55ebb615001f5ca871713c5c98014e5ed2b4
treec331e4d8e1c90bd6cf70e626dc82d9cc6aa2a99c
parentf319a7d6e781be2f576533d5007da123a1b697eb
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))

llvm-svn: 76535
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/2009-07-20-DAGCombineBug.ll [new file with mode: 0644]