Skip to content

Commit ddb56d9

Browse files
committed
rename AppendExtraBoolArg
1 parent aebd47a commit ddb56d9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18291,8 +18291,10 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID,
1829118291
// D = A * B + C
1829218292
// We need to specify one type for matrices AB and one for matrices CD.
1829318293
SmallVector<unsigned, 2> ArgsForMatchingMatrixTypes;
18294-
// Some intrinsics expect "false" as an extra bool argument.
18295-
bool AppendExtraBoolArg = false;
18294+
// On GFX12, the intrinsics with 16-bit accumulator use a packed layout.
18295+
// There is no need for the variable opsel argument, so always set it to
18296+
// "false".
18297+
bool AppendFalseForOpselArg = false;
1829618298
unsigned BuiltinWMMAOp;
1829718299

1829818300
switch (BuiltinID) {
@@ -18312,7 +18314,7 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID,
1831218314
break;
1831318315
case AMDGPU::BI__builtin_amdgcn_wmma_f16_16x16x16_f16_w32_gfx12:
1831418316
case AMDGPU::BI__builtin_amdgcn_wmma_f16_16x16x16_f16_w64_gfx12:
18315-
AppendExtraBoolArg = true;
18317+
AppendFalseForOpselArg = true;
1831618318
LLVM_FALLTHROUGH;
1831718319
case AMDGPU::BI__builtin_amdgcn_wmma_f16_16x16x16_f16_w32:
1831818320
case AMDGPU::BI__builtin_amdgcn_wmma_f16_16x16x16_f16_w64:
@@ -18321,7 +18323,7 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID,
1832118323
break;
1832218324
case AMDGPU::BI__builtin_amdgcn_wmma_bf16_16x16x16_bf16_w32_gfx12:
1832318325
case AMDGPU::BI__builtin_amdgcn_wmma_bf16_16x16x16_bf16_w64_gfx12:
18324-
AppendExtraBoolArg = true;
18326+
AppendFalseForOpselArg = true;
1832518327
LLVM_FALLTHROUGH;
1832618328
case AMDGPU::BI__builtin_amdgcn_wmma_bf16_16x16x16_bf16_w32:
1832718329
case AMDGPU::BI__builtin_amdgcn_wmma_bf16_16x16x16_bf16_w64:
@@ -18437,7 +18439,7 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID,
1843718439
SmallVector<Value *, 6> Args;
1843818440
for (int i = 0, e = E->getNumArgs(); i != e; ++i)
1843918441
Args.push_back(EmitScalarExpr(E->getArg(i)));
18440-
if (AppendExtraBoolArg)
18442+
if (AppendFalseForOpselArg)
1844118443
Args.push_back(Builder.getFalse());
1844218444

1844318445
SmallVector<llvm::Type *, 6> ArgTypes;

0 commit comments

Comments
 (0)