[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 02:56:24 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd6f4cfdbd792: [llvm-exegesis] Add support for AVX512 explicit rounding operands. (authored by courbet).
Changed prior to commit:
https://reviews.llvm.org/D73083?vs=239261&id=239265#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73083/new/
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,24 @@
}
}
+TEST_F(SerialSnippetGeneratorTest, 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);
+ auto Configs =
+ Generator.generateConfigurations(Instr, State.getRATC().emptyRegisters());
+ ASSERT_FALSE(Configs.takeError());
+ 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(ParallelSnippetGeneratorTest, 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.239265.patch
Type: text/x-patch
Size: 1811 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200121/2718691a/attachment.bin>
More information about the llvm-commits
mailing list