@@ -1987,8 +1987,8 @@ llvm::Value *CodeGenFunction::EmitLoadOfScalar(Address Addr, bool Volatile,
19871987 // Boolean vectors use `iN` as storage type.
19881988 if (ClangVecTy->isExtVectorBoolType ()) {
19891989 if (getLangOpts ().HLSL ) {
1990- llvm::Value *Value = Builder.CreateLoad (Addr, Volatile, " load_boolvec" );
1991- return EmitFromMemory (Value, Ty);
1990+ llvm::Value *Value = Builder.CreateLoad (Addr, Volatile, " load_boolvec" );
1991+ return EmitFromMemory (Value, Ty);
19921992 }
19931993 llvm::Type *ValTy = ConvertType (Ty);
19941994 unsigned ValNumElems =
@@ -2090,7 +2090,7 @@ llvm::Value *CodeGenFunction::EmitFromMemory(llvm::Value *Value, QualType Ty) {
20902090 const auto *RawIntTy = Value->getType ();
20912091 if (getLangOpts ().HLSL )
20922092 return Builder.CreateTrunc (Value, ConvertType (Ty), " loadedv" );
2093-
2093+
20942094 // Bitcast iP --> <P x i1>.
20952095 auto *PaddedVecTy = llvm::FixedVectorType::get (
20962096 Builder.getInt1Ty (), RawIntTy->getPrimitiveSizeInBits ());
@@ -2429,9 +2429,10 @@ void CodeGenFunction::EmitStoreThroughLValue(RValue Src, LValue Dst,
24292429 Dst.isVolatileQualified ());
24302430 llvm::Type *OldVecTy = Vec->getType ();
24312431 if (getLangOpts ().HLSL && Dst.getType ()->isExtVectorBoolType ())
2432-
2433- Vec = Builder.CreateTrunc (Vec, ConvertType (Dst.getType ()), " truncboolv" );
2434-
2432+
2433+ Vec =
2434+ Builder.CreateTrunc (Vec, ConvertType (Dst.getType ()), " truncboolv" );
2435+
24352436 auto *IRStoreTy = dyn_cast<llvm::IntegerType>(Vec->getType ());
24362437 if (IRStoreTy) {
24372438 auto *IRVecTy = llvm::FixedVectorType::get (
@@ -2447,8 +2448,8 @@ void CodeGenFunction::EmitStoreThroughLValue(RValue Src, LValue Dst,
24472448 }
24482449
24492450 if (getLangOpts ().HLSL && Dst.getType ()->isExtVectorBoolType ())
2450- Vec = Builder.CreateZExt (Vec, OldVecTy);
2451-
2451+ Vec = Builder.CreateZExt (Vec, OldVecTy);
2452+
24522453 Builder.CreateStore (Vec, Dst.getVectorAddress (),
24532454 Dst.isVolatileQualified ());
24542455 return ;
0 commit comments