Skip to content

Commit 3c3f6d8

Browse files
authored
[AMDGPU][AsmParser][NFC] Eliminate Match_PreferE32. (#92159)
Was added in 88e0b25 and is unused since fcef407.
1 parent eacefba commit 3c3f6d8

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,9 +1388,6 @@ class AMDGPUAsmParser : public MCTargetAsmParser {
13881388
bool IsAtomic);
13891389

13901390
public:
1391-
enum AMDGPUMatchResultTy {
1392-
Match_PreferE32 = FIRST_TARGET_MATCH_RESULT_TY
1393-
};
13941391
enum OperandMode {
13951392
OperandMode_Default,
13961393
OperandMode_NSA,
@@ -5262,15 +5259,11 @@ bool AMDGPUAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
52625259
Variant);
52635260
// We order match statuses from least to most specific. We use most specific
52645261
// status as resulting
5265-
// Match_MnemonicFail < Match_InvalidOperand < Match_MissingFeature < Match_PreferE32
5266-
if ((R == Match_Success) ||
5267-
(R == Match_PreferE32) ||
5268-
(R == Match_MissingFeature && Result != Match_PreferE32) ||
5269-
(R == Match_InvalidOperand && Result != Match_MissingFeature
5270-
&& Result != Match_PreferE32) ||
5271-
(R == Match_MnemonicFail && Result != Match_InvalidOperand
5272-
&& Result != Match_MissingFeature
5273-
&& Result != Match_PreferE32)) {
5262+
// Match_MnemonicFail < Match_InvalidOperand < Match_MissingFeature
5263+
if (R == Match_Success || R == Match_MissingFeature ||
5264+
(R == Match_InvalidOperand && Result != Match_MissingFeature) ||
5265+
(R == Match_MnemonicFail && Result != Match_InvalidOperand &&
5266+
Result != Match_MissingFeature)) {
52745267
Result = R;
52755268
ErrorInfo = EI;
52765269
}
@@ -5316,9 +5309,6 @@ bool AMDGPUAsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
53165309
return Error(ErrorLoc, "invalid operand for instruction");
53175310
}
53185311

5319-
case Match_PreferE32:
5320-
return Error(IDLoc, "internal error: instruction without _e64 suffix "
5321-
"should be encoded as e32");
53225312
case Match_MnemonicFail:
53235313
llvm_unreachable("Invalid instructions should have been handled already");
53245314
}

0 commit comments

Comments
 (0)