Skip to content

Commit

Permalink
rename AppendExtraBoolArg
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrkusanin committed Jan 12, 2024
1 parent aebd47a commit ddb56d9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions clang/lib/CodeGen/CGBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18291,8 +18291,10 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID,
// D = A * B + C
// We need to specify one type for matrices AB and one for matrices CD.
SmallVector<unsigned, 2> ArgsForMatchingMatrixTypes;
// Some intrinsics expect "false" as an extra bool argument.
bool AppendExtraBoolArg = false;
// On GFX12, the intrinsics with 16-bit accumulator use a packed layout.
// There is no need for the variable opsel argument, so always set it to
// "false".
bool AppendFalseForOpselArg = false;
unsigned BuiltinWMMAOp;

switch (BuiltinID) {
Expand All @@ -18312,7 +18314,7 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID,
break;
case AMDGPU::BI__builtin_amdgcn_wmma_f16_16x16x16_f16_w32_gfx12:
case AMDGPU::BI__builtin_amdgcn_wmma_f16_16x16x16_f16_w64_gfx12:
AppendExtraBoolArg = true;
AppendFalseForOpselArg = true;
LLVM_FALLTHROUGH;
case AMDGPU::BI__builtin_amdgcn_wmma_f16_16x16x16_f16_w32:
case AMDGPU::BI__builtin_amdgcn_wmma_f16_16x16x16_f16_w64:
Expand All @@ -18321,7 +18323,7 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID,
break;
case AMDGPU::BI__builtin_amdgcn_wmma_bf16_16x16x16_bf16_w32_gfx12:
case AMDGPU::BI__builtin_amdgcn_wmma_bf16_16x16x16_bf16_w64_gfx12:
AppendExtraBoolArg = true;
AppendFalseForOpselArg = true;
LLVM_FALLTHROUGH;
case AMDGPU::BI__builtin_amdgcn_wmma_bf16_16x16x16_bf16_w32:
case AMDGPU::BI__builtin_amdgcn_wmma_bf16_16x16x16_bf16_w64:
Expand Down Expand Up @@ -18437,7 +18439,7 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID,
SmallVector<Value *, 6> Args;
for (int i = 0, e = E->getNumArgs(); i != e; ++i)
Args.push_back(EmitScalarExpr(E->getArg(i)));
if (AppendExtraBoolArg)
if (AppendFalseForOpselArg)
Args.push_back(Builder.getFalse());

SmallVector<llvm::Type *, 6> ArgTypes;
Expand Down

0 comments on commit ddb56d9

Please sign in to comment.