File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -12535,9 +12535,10 @@ SDValue DAGCombiner::foldVSelectOfConstants(SDNode *N) {
1253512535 for (unsigned i = 0; i != Elts; ++i) {
1253612536 SDValue N1Elt = N1.getOperand(i);
1253712537 SDValue N2Elt = N2.getOperand(i);
12538- if (N1Elt.isUndef() || N2Elt.isUndef() )
12538+ if (N1Elt.isUndef())
1253912539 continue;
12540- if (N1Elt.getValueType() != N2Elt.getValueType()) {
12540+ // N2 should not contain undef values since it will be reused in the fold.
12541+ if (N2Elt.isUndef() || N1Elt.getValueType() != N2Elt.getValueType()) {
1254112542 AllAddOne = false;
1254212543 AllSubOne = false;
1254312544 break;
Original file line number Diff line number Diff line change @@ -306,10 +306,12 @@ define i32 @wrong_min_signbits(<2 x i16> %x) {
306306define i32 @pr129181 () {
307307; SSE-LABEL: pr129181:
308308; SSE: # %bb.0: # %entry
309+ ; SSE-NEXT: xorl %eax, %eax
309310; SSE-NEXT: retq
310311;
311312; AVX-LABEL: pr129181:
312313; AVX: # %bb.0: # %entry
314+ ; AVX-NEXT: xorl %eax, %eax
313315; AVX-NEXT: retq
314316entry:
315317 %x = insertelement <4 x i32 > zeroinitializer , i32 0 , i32 0
You can’t perform that action at this time.
0 commit comments