[llvm] d374546 - [X86][NFC] Assert MRMr0 format from emitREXPrefix
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 17 22:15:53 PST 2023
Author: Shengchen Kan
Date: 2023-02-18T14:15:31+08:00
New Revision: d3745461dacbf2e158a9e5fb47c0a518d64a936b
URL: https://github.com/llvm/llvm-project/commit/d3745461dacbf2e158a9e5fb47c0a518d64a936b
DIFF: https://github.com/llvm/llvm-project/commit/d3745461dacbf2e158a9e5fb47c0a518d64a936b.diff
LOG: [X86][NFC] Assert MRMr0 format from emitREXPrefix
The only instruction of this format is VEX encoding
Added:
Modified:
llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
index cbdcba12f86d..5e9aaeff8b48 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
@@ -1247,8 +1247,7 @@ PrefixKind X86MCCodeEmitter::emitREXPrefix(int MemOperand, const MCInst &MI,
Prefix.setB(MI, CurOp++);
break;
case X86II::MRMr0:
- Prefix.setR(MI, CurOp++);
- break;
+ llvm_unreachable("MRMr0 format never need REX prefix!");
case X86II::MRMDestMemFSIB:
llvm_unreachable("FSIB format never need REX prefix!");
}
More information about the llvm-commits
mailing list