[PATCH] D73083: [llvm-exegesis] Add support for AVX512 explicit rounding operands.
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 21 01:17:05 PST 2020
courbet created this revision.
courbet added a reviewer: gchatelet.
Herald added subscribers: mstojanovic, tschuett.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73083
Files:
llvm/tools/llvm-exegesis/lib/X86/Target.cpp
llvm/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
Index: llvm/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
===================================================================
--- llvm/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
+++ llvm/unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
@@ -198,6 +198,22 @@
}
}
+TEST_F(LatencySnippetGeneratorTest, VCVTUSI642SDZrrb_Int) {
+ // - VCVTUSI642SDZrrb_Int
+ // - Op0 Explicit Def RegClass(VR128X)
+ // - Op1 Explicit Use RegClass(VR128X)
+ // - Op2 Explicit Use STATIC_ROUNDING
+ // - Op2 Explicit Use RegClass(GR64)
+ // - Op4 Implicit Use Reg(MXSCR)
+ const unsigned Opcode = X86::VCVTUSI642SDZrrb_Int;
+ const Instruction &Instr = State.getIC().getInstr(Opcode);
+ const auto Configs = *Generator.generateConfigurations(Instr, State.getRATC().emptyRegisters());
+ ASSERT_THAT(Configs, SizeIs(1));
+ const BenchmarkCode& BC = Configs[0];
+ ASSERT_THAT(BC.Key.Instructions, SizeIs(1));
+ ASSERT_TRUE(BC.Key.Instructions[0].getOperand(3).isImm());
+}
+
TEST_F(UopsSnippetGeneratorTest, ParallelInstruction) {
// - BNDCL32rr
// - Op0 Explicit Use RegClass(BNDR)
Index: llvm/tools/llvm-exegesis/lib/X86/Target.cpp
===================================================================
--- llvm/tools/llvm-exegesis/lib/X86/Target.cpp
+++ llvm/tools/llvm-exegesis/lib/X86/Target.cpp
@@ -636,6 +636,10 @@
const Operand &Op = Instr.getPrimaryOperand(Var);
switch (Op.getExplicitOperandInfo().OperandType) {
+ case X86::OperandType::OPERAND_ROUNDING_CONTROL:
+ AssignedValue =
+ MCOperand::createImm(randomIndex(X86::STATIC_ROUNDING::NO_EXC));
+ break;
case X86::OperandType::OPERAND_COND_CODE:
AssignedValue =
MCOperand::createImm(randomIndex(X86::CondCode::LAST_VALID_COND));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73083.239247.patch
Type: text/x-patch
Size: 1766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200121/58eec689/attachment.bin>
More information about the llvm-commits
mailing list