[llvm] Update condition about ExplicitVEXPrefix refactor in PR 72835 (PR #73312)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 24 02:35:49 PST 2023
https://github.com/XinWang10 created https://github.com/llvm/llvm-project/pull/73312
After 72835, ExplicitVEXPrefix has changed and it is not a bit now, but in scope ExplicitOpPrefix, so the bitwise op of ExplicitVEXPrefix may need to update.
>From 19be1df8e95df487b5ce38d12a99714018ab2930 Mon Sep 17 00:00:00 2001
From: XinWang10 <xin10.wang at intel.com>
Date: Fri, 24 Nov 2023 18:16:46 +0800
Subject: [PATCH] Update condition about ExplicitVEXPrefix refactor in PR 72835
---
llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp | 3 ++-
llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp b/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
index f6fe7c9be7e4f46..6c6ef95f92754d2 100644
--- a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -3973,7 +3973,8 @@ unsigned X86AsmParser::checkTargetMatchPredicate(MCInst &Inst) {
(MCID.TSFlags & X86II::EncodingMask) != X86II::VEX)
return Match_Unsupported;
- if (MCID.TSFlags & X86II::ExplicitVEXPrefix &&
+ if ((MCID.TSFlags & X86II::ExplicitOpPrefixMask) ==
+ X86II::ExplicitVEXPrefix &&
(ForcedVEXEncoding != VEXEncoding_VEX &&
ForcedVEXEncoding != VEXEncoding_VEX2 &&
ForcedVEXEncoding != VEXEncoding_VEX3))
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp
index 1db55851e8f766b..b140f932afb3594 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp
@@ -370,7 +370,8 @@ void X86InstPrinterCommon::printInstFlags(const MCInst *MI, raw_ostream &O,
O << "\trep\t";
// These all require a pseudo prefix
- if ((Flags & X86::IP_USE_VEX) || (TSFlags & X86II::ExplicitVEXPrefix))
+ if ((Flags & X86::IP_USE_VEX) ||
+ ((TSFlags & X86II::ExplicitOpPrefixMask) == X86II::ExplicitVEXPrefix))
O << "\t{vex}";
else if (Flags & X86::IP_USE_VEX2)
O << "\t{vex2}";
More information about the llvm-commits
mailing list