Skip to content

Commit 23e5c38

Browse files
[AMDGPU] Resolving comments 2
1 parent 3f52226 commit 23e5c38

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

llvm/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ template <size_t N>
2525
static StringRef getNameFromOperandTable(const CustomOperand (&Table)[N],
2626
unsigned Encoding,
2727
const MCSubtargetInfo &STI) {
28-
auto IsValid = [&](const CustomOperand &Entry) {
29-
return Entry.Encoding == Encoding && !Entry.Name.empty() &&
30-
(!Entry.Cond || Entry.Cond(STI));
31-
};
32-
3328
// Find the first entry with the target encoding
3429
auto First =
3530
std::lower_bound(Table, Table + N, Encoding,
@@ -39,7 +34,7 @@ static StringRef getNameFromOperandTable(const CustomOperand (&Table)[N],
3934

4035
// Search through entries with the same encoding to find the first valid one
4136
for (auto It = First; It != Table + N && It->Encoding == Encoding; ++It)
42-
if (IsValid(*It))
37+
if (It->Encoding == Encoding && (!It->Cond || It->Cond(STI)))
4338
return It->Name;
4439

4540
return "";

0 commit comments

Comments
 (0)