[RISCV] Re-generate memcmp test checks missed in #121530. NFC
[llvm-project.git] / llvm / unittests / tools / llvm-mca / X86 / X86TestBase.cpp
blob6672c29a7de65b28640bbe27f49b3e5eada7a21f
1 #include "X86TestBase.h"
2 #include "MCTargetDesc/X86MCTargetDesc.h"
3 #include "llvm/MC/MCInstBuilder.h"
4 #include "llvm/Support/TargetSelect.h"
6 using namespace llvm;
7 using namespace mca;
9 X86TestBase::X86TestBase() : MCATestBase("x86_64-unknown-linux", "skylake") {
10 LLVMInitializeX86TargetInfo();
11 LLVMInitializeX86TargetMC();
12 LLVMInitializeX86Target();
13 LLVMInitializeX86AsmPrinter();
16 void X86TestBase::getSimpleInsts(SmallVectorImpl<MCInst> &Insts,
17 unsigned Repeats) {
18 for (unsigned i = 0U; i < Repeats; ++i) {
19 // vmulps %xmm0, %xmm1, %xmm2
20 Insts.push_back(MCInstBuilder(X86::VMULPSrr)
21 .addReg(X86::XMM2)
22 .addReg(X86::XMM1)
23 .addReg(X86::XMM0));
24 // vhaddps %xmm2, %xmm2, %xmm3
25 Insts.push_back(MCInstBuilder(X86::VHADDPSrr)
26 .addReg(X86::XMM3)
27 .addReg(X86::XMM2)
28 .addReg(X86::XMM2));
29 // vhaddps %xmm3, %xmm3, %xmm4
30 Insts.push_back(MCInstBuilder(X86::VHADDPSrr)
31 .addReg(X86::XMM4)
32 .addReg(X86::XMM3)
33 .addReg(X86::XMM3));