1; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=sse2 -mcpu=corei7 -o /dev/null
2
3; Revision 199135 introduced a wrong check in method
4; DAGCombiner::SimplifyVBinOp in an attempt to refactor some code
5; using the new method 'BuildVectorSDNode::isConstant' when possible.
6;
7; However the modified code in method SimplifyVBinOp now wrongly
8; checks that the operands of a vector bin-op are both constants.
9;
10; With that wrong change, this test started failing because of a
11; 'fatal error in the backend':
12;   Cannot select: 0x2e329d0: v4i32 = BUILD_VECTOR 0x2e2ea00, 0x2e2ea00, 0x2e2ea00, 0x2e2ea00
13;       0x2e2ea00: i32 = Constant<1> [ID=4]
14;       0x2e2ea00: i32 = Constant<1> [ID=4]
15;       0x2e2ea00: i32 = Constant<1> [ID=4]
16;       0x2e2ea00: i32 = Constant<1> [ID=4]
17
18define <8 x i32> @reduced_test_case() {
19  %Shuff = shufflevector <8 x i32> zeroinitializer, <8 x i32> zeroinitializer, <8 x i32> <i32 1, i32 3, i32 undef, i32 7, i32 9, i32 11, i32 13, i32 15>
20  %B23 = sub <8 x i32> %Shuff, <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>
21  ret <8 x i32> %B23
22}
23
24