Skip to content

Commit ea73541

Browse files
committed
Fix comment again
1 parent ac0df73 commit ea73541

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
@@ -27525,9 +27525,11 @@ static SDValue scalarizeBinOpOfSplats(SDNode *N, SelectionDAG &DAG,
2752527525
if ((Opcode == ISD::MULHS || Opcode == ISD::MULHU) && !TLI.isTypeLegal(EltVT))
2752627526
return SDValue();
2752727527

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

0 commit comments

Comments
 (0)