Skip to content

Commit e0638d1

Browse files
committed
actually make clang format happy
1 parent d9a4777 commit e0638d1

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

clang/lib/CodeGen/CGExpr.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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;

clang/lib/CodeGen/CodeGenTypes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ llvm::Type *CodeGenTypes::ConvertTypeForMem(QualType T) {
112112
// Check for the boolean vector case.
113113
if (T->isExtVectorBoolType()) {
114114
auto *FixedVT = cast<llvm::FixedVectorType>(R);
115-
115+
116116
if (Context.getLangOpts().HLSL) {
117117
llvm::Type *IRElemTy = ConvertTypeForMem(Context.BoolTy);
118118
return llvm::FixedVectorType::get(IRElemTy, FixedVT->getNumElements());
119119
}
120-
120+
121121
// Pad to at least one byte.
122122
uint64_t BytePadded = std::max<uint64_t>(FixedVT->getNumElements(), 8);
123123
return llvm::IntegerType::get(FixedVT->getContext(), BytePadded);

0 commit comments

Comments
 (0)