Skip to content

Commit c41456e

Browse files
committed
Fix comment again
1 parent da27407 commit c41456e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27526,9 +27526,11 @@ static SDValue scalarizeBinOpOfSplats(SDNode *N, SelectionDAG &DAG,
2752627526
if ((Opcode == ISD::MULHS || Opcode == ISD::MULHU) && !TLI.isTypeLegal(EltVT))
2752727527
return SDValue();
2752827528

27529-
// If all result lanes but 1 are undefined, no need to splat the scalar
27530-
// result.
2753127529
if (N0.getOpcode() == ISD::BUILD_VECTOR && N0.getOpcode() == N1.getOpcode()) {
27530+
// All but one element should have an undef input, which will fold to a
27531+
// constant or undef. Avoid splatting which would over-define potentially
27532+
// undefined elements.
27533+
2753227534
// bo (build_vec ..undef, X, undef...), (build_vec ..undef, Y, undef...) -->
2753327535
// build_vec ..undef, (bo X, Y), undef...
2753427536
SmallVector<SDValue, 16> EltsX, EltsY, EltsResult;

0 commit comments

Comments
 (0)