[DAGCombiner] Use APInt directly in (shl (zext (srl x, C)), C) combine range test
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 13 Sep 2016 18:33:29 +0000 (18:33 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 13 Sep 2016 18:33:29 +0000 (18:33 +0000)
commit4a8eba3e96d9b5b4366002acd717912800d9c11b
tree18053ecf819ff841c91d7343fc0f486b0647a37e
parente204c48d164d0148a008b3f97bdcc5ccaa3d7d39
[DAGCombiner] Use APInt directly in (shl (zext (srl x, C)), C) combine range test

To avoid assertion, we must ensure that the inner shift constant is within range before calling ConstantSDNode::getZExtValue(). We already know that the outer shift constant is in range.

Followup to D23007

llvm-svn: 281362
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/shift-i128.ll