[llvm] 8b03b3b - MIPS: Avoid MCSymbol::isUnset
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 3 20:03:25 PDT 2025
Author: Fangrui Song
Date: 2025-08-03T20:03:20-07:00
New Revision: 8b03b3bd4df62af2de659434495419be2a2f4a45
URL: https://github.com/llvm/llvm-project/commit/8b03b3bd4df62af2de659434495419be2a2f4a45
DIFF: https://github.com/llvm/llvm-project/commit/8b03b3bd4df62af2de659434495419be2a2f4a45.diff
LOG: MIPS: Avoid MCSymbol::isUnset
The unset state will be merged into the undefined state,
so isUnset should be avoided.
The code used by register equating uses the inaccurate condition.
```
.set r1, $4
```
For now just use isUndefined. GNU Assembler has a warning:
```
Warning: register value used as expression
```
Added:
Modified:
llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
index f8457dfa94535..7b2ee832ae7db 100644
--- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
@@ -6654,7 +6654,7 @@ bool MipsAsmParser::searchSymbolAlias(OperandVector &Operands) {
llvm_unreachable("Should never fail");
}
}
- } else if (Sym->isUnset()) {
+ } else if (Sym->isUndefined()) {
// If symbol is unset, it might be created in the `parseSetAssignment`
// routine as an alias for a numeric register name.
// Lookup in the aliases list.
More information about the llvm-commits
mailing list