Skip to content

Commit 2091947

Browse files
Addressing review comments
1 parent 571e9a5 commit 2091947

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

llvm/tools/llvm-exegesis/lib/RISCV/Target.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,8 @@ bool ExegesisRISCVTarget::checkOpcodeSupported(
101101
FeatureBitset AvailableFeatures =
102102
RISCV_MC::computeAvailableFeatures(Features);
103103
FeatureBitset RequiredFeatures = RISCV_MC::computeRequiredFeatures(Opcode);
104-
FeatureBitset MissingFeatures =
105-
(AvailableFeatures & RequiredFeatures) ^ RequiredFeatures;
106-
return !(MissingFeatures.none());
104+
FeatureBitset MissingFeatures = RequiredFeatures & ~AvailableFeatures;
105+
return MissingFeatures.none();
107106
}
108107

109108
#define GET_REGISTER_MATCHER

llvm/tools/llvm-exegesis/lib/SerialSnippetGenerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ computeAliasingInstructions(const LLVMState &State, const Instruction *Instr,
5252
continue;
5353
if (OtherOpcode == Instr->Description.getOpcode())
5454
continue;
55-
if (State.getExegesisTarget().checkOpcodeSupported(
55+
if (!State.getExegesisTarget().checkOpcodeSupported(
5656
OtherOpcode, State.getSubtargetInfo()))
5757
continue;
5858
const Instruction &OtherInstr = State.getIC().getInstr(OtherOpcode);

0 commit comments

Comments
 (0)