Skip to content

Commit 07cb6a2

Browse files
committed
widenBuildVector - early out
1 parent e85b51c commit 07cb6a2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8910,13 +8910,11 @@ static SDValue widenBuildVector(BuildVectorSDNode *BVOp, SDLoc const &DL,
89108910
continue;
89118911
}
89128912

8913-
break;
8913+
return SDValue();
89148914
}
89158915

8916-
if (WideOps.size() == (NumElts / 2))
8917-
return DAG.getBitcast(VT, DAG.getBuildVector(WideVT, DL, WideOps));
8918-
8919-
return SDValue();
8916+
assert(WideOps.size() == (NumElts / 2) && "Failed to widen build vector");
8917+
return DAG.getBitcast(VT, DAG.getBuildVector(WideVT, DL, WideOps));
89208918
}
89218919

89228920
/// Create a vector constant without a load. SSE/AVX provide the bare minimum

0 commit comments

Comments
 (0)