Skip to content

Commit 9efa4cd

Browse files
committed
[Clang][RISCV] Reduce boilerplate under RVVEmitter::createHeader. NFC
Signed-off by: eop Chen <[email protected]>
1 parent 65f40cb commit 9efa4cd

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

clang/utils/TableGen/RISCVVEmitter.cpp

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -377,25 +377,13 @@ void RVVEmitter::createHeader(raw_ostream &OS) {
377377
}
378378
}
379379

380-
for (int Log2LMUL : Log2LMULs) {
381-
auto T = TypeCache.computeType(BasicType::Float16, Log2LMUL,
382-
PrototypeDescriptor::Vector);
383-
if (T)
384-
printType(*T);
385-
}
386-
387-
for (int Log2LMUL : Log2LMULs) {
388-
auto T = TypeCache.computeType(BasicType::Float32, Log2LMUL,
389-
PrototypeDescriptor::Vector);
390-
if (T)
391-
printType(*T);
392-
}
393-
394-
for (int Log2LMUL : Log2LMULs) {
395-
auto T = TypeCache.computeType(BasicType::Float64, Log2LMUL,
396-
PrototypeDescriptor::Vector);
397-
if (T)
398-
printType(*T);
380+
for (BasicType BT :
381+
{BasicType::Float16, BasicType::Float32, BasicType::Float64}) {
382+
for (int Log2LMUL : Log2LMULs) {
383+
auto T = TypeCache.computeType(BT, Log2LMUL, PrototypeDescriptor::Vector);
384+
if (T)
385+
printType(*T);
386+
}
399387
}
400388

401389
OS << "#define __riscv_v_intrinsic_overloading 1\n";

0 commit comments

Comments
 (0)