Skip to content

Commit 89ceeb7

Browse files
committed
move code back that broke tests
1 parent f924b13 commit 89ceeb7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang/lib/Sema/SemaHLSL.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2814,13 +2814,14 @@ bool SemaHLSL::CanPerformSplat(Expr *Src, QualType DestTy) {
28142814
return false;
28152815

28162816
const VectorType *SrcVecTy = SrcTy->getAs<VectorType>();
2817-
if (SrcVecTy)
2818-
SrcTy = SrcVecTy->getElementType();
28192817

28202818
// Src isn't a scalar or a vector of length 1
28212819
if (!SrcTy->isScalarType() && !(SrcVecTy && SrcVecTy->getNumElements() == 1))
28222820
return false;
28232821

2822+
if (SrcVecTy)
2823+
SrcTy = SrcVecTy->getElementType();
2824+
28242825
llvm::SmallVector<QualType> DestTypes;
28252826
BuildFlattenedTypeList(DestTy, DestTypes);
28262827

0 commit comments

Comments
 (0)