[llvm] [RISCV] Introduce VLOptimizer pass (PR #108640)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 08:39:35 PDT 2024


https://github.com/michaelmaitland updated https://github.com/llvm/llvm-project/pull/108640

>From 7c2ac13f46ce363516f140889fbc1f999a9f2fcd Mon Sep 17 00:00:00 2001
From: Michael Maitland <michaeltmaitland at gmail.com>
Date: Tue, 27 Jun 2023 09:19:36 -0700
Subject: [PATCH 01/12] [RISCV] Add VLOptimizer pass

The purpose of this optimization is to make the VL argument, for instructions
that have a VL argument, as small as possible. This is implemented by
visiting each instruction in reverse order and checking that if it has a VL
argument, whether the VL can be reduced.

This is done before vsetvli insertion to reduce the number of generated
vsetvlis. It can also reduce the number of vsetvli instructions that toggle
the VL (the vtype may still need to get set).

The list of supported instructions is currently whitelisted for
safety. In the future, we could add more instructions to isSupportedInstr
to support even more VL optimization.

Co-authored-by: Craig Topper <craig.topper at sifive.com>
Co-authored-by: Kito Cheng <kito.cheng at sifive.com>
---
 llvm/lib/Target/RISCV/CMakeLists.txt          |    1 +
 llvm/lib/Target/RISCV/RISCV.h                 |    3 +
 llvm/lib/Target/RISCV/RISCVTargetMachine.cpp  |    9 +-
 llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp    | 1569 +++++++++++++++++
 llvm/test/CodeGen/RISCV/O3-pipeline.ll        |    3 +-
 .../CodeGen/RISCV/rvv/narrow-shift-extend.ll  |   54 +-
 llvm/test/CodeGen/RISCV/rvv/setcc-int-vp.ll   |   54 +-
 llvm/test/CodeGen/RISCV/rvv/vdiv-vp.ll        |    2 -
 llvm/test/CodeGen/RISCV/rvv/vdivu-vp.ll       |    2 -
 llvm/test/CodeGen/RISCV/rvv/vfwmacc-vp.ll     |   42 +-
 llvm/test/CodeGen/RISCV/rvv/vfwmsac-vp.ll     |   36 +-
 llvm/test/CodeGen/RISCV/rvv/vfwnmacc-vp.ll    |   45 +-
 llvm/test/CodeGen/RISCV/rvv/vfwnmsac-vp.ll    |   45 +-
 llvm/test/CodeGen/RISCV/rvv/vl-opt-op-info.ll |    6 +-
 llvm/test/CodeGen/RISCV/rvv/vmax-vp.ll        |    2 -
 llvm/test/CodeGen/RISCV/rvv/vmaxu-vp.ll       |    2 -
 llvm/test/CodeGen/RISCV/rvv/vmin-vp.ll        |    2 -
 llvm/test/CodeGen/RISCV/rvv/vminu-vp.ll       |    2 -
 llvm/test/CodeGen/RISCV/rvv/vmul-vp.ll        |    7 +-
 .../test/CodeGen/RISCV/rvv/vpgather-sdnode.ll |  408 ++---
 .../CodeGen/RISCV/rvv/vpscatter-sdnode.ll     |  434 ++---
 llvm/test/CodeGen/RISCV/rvv/vrem-vp.ll        |    2 -
 llvm/test/CodeGen/RISCV/rvv/vremu-vp.ll       |    2 -
 .../RISCV/rvv/vsetvli-insert-crossbb.ll       |    3 -
 llvm/test/CodeGen/RISCV/rvv/vshl-vp.ll        |    3 +-
 llvm/test/CodeGen/RISCV/rvv/vsra-sdnode.ll    |    4 +-
 llvm/test/CodeGen/RISCV/rvv/vsra-vp.ll        |    2 -
 llvm/test/CodeGen/RISCV/rvv/vsrl-vp.ll        |    2 -
 llvm/test/CodeGen/RISCV/rvv/vssub-vp.ll       |    3 +-
 llvm/test/CodeGen/RISCV/rvv/vssubu-vp.ll      |    3 +-
 llvm/test/CodeGen/RISCV/rvv/vwsll-vp.ll       |   90 +-
 31 files changed, 2098 insertions(+), 744 deletions(-)
 create mode 100644 llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp

diff --git a/llvm/lib/Target/RISCV/CMakeLists.txt b/llvm/lib/Target/RISCV/CMakeLists.txt
index 7d02d630a28199..34c0f2a26701cc 100644
--- a/llvm/lib/Target/RISCV/CMakeLists.txt
+++ b/llvm/lib/Target/RISCV/CMakeLists.txt
@@ -61,6 +61,7 @@ add_llvm_target(RISCVCodeGen
   RISCVTargetObjectFile.cpp
   RISCVTargetTransformInfo.cpp
   RISCVVectorPeephole.cpp
+  RISCVVLOptimizer.cpp
   GISel/RISCVCallLowering.cpp
   GISel/RISCVInstructionSelector.cpp
   GISel/RISCVLegalizerInfo.cpp
diff --git a/llvm/lib/Target/RISCV/RISCV.h b/llvm/lib/Target/RISCV/RISCV.h
index 561e4895e19428..a1050c1fbc26ec 100644
--- a/llvm/lib/Target/RISCV/RISCV.h
+++ b/llvm/lib/Target/RISCV/RISCV.h
@@ -102,6 +102,9 @@ void initializeRISCVPreLegalizerCombinerPass(PassRegistry &);
 
 FunctionPass *createRISCVPostLegalizerLowering();
 void initializeRISCVPostLegalizerLoweringPass(PassRegistry &);
+
+FunctionPass *createRISCVVLOptimizerPass();
+void initializeRISCVVLOptimizerPass(PassRegistry &);
 } // namespace llvm
 
 #endif
diff --git a/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp b/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
index 5cb9fbc8a9eb98..80c9d6f8e04657 100644
--- a/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
+++ b/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
@@ -103,6 +103,10 @@ static cl::opt<bool> EnableVSETVLIAfterRVVRegAlloc(
     cl::desc("Insert vsetvls after vector register allocation"),
     cl::init(true));
 
+static cl::opt<bool> EnableVLOptimizer("riscv-enable-vloptimizer",
+                                       cl::desc("Enable the VL Optimizer pass"),
+                                       cl::init(true), cl::Hidden);
+
 extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeRISCVTarget() {
   RegisterTargetMachine<RISCVTargetMachine> X(getTheRISCV32Target());
   RegisterTargetMachine<RISCVTargetMachine> Y(getTheRISCV64Target());
@@ -552,8 +556,11 @@ void RISCVPassConfig::addMachineSSAOptimization() {
 
 void RISCVPassConfig::addPreRegAlloc() {
   addPass(createRISCVPreRAExpandPseudoPass());
-  if (TM->getOptLevel() != CodeGenOptLevel::None)
+  if (TM->getOptLevel() != CodeGenOptLevel::None) {
     addPass(createRISCVMergeBaseOffsetOptPass());
+    if (EnableVLOptimizer)
+      addPass(createRISCVVLOptimizerPass());
+  }
 
   addPass(createRISCVInsertReadWriteCSRPass());
   addPass(createRISCVInsertWriteVXRMPass());
diff --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
new file mode 100644
index 00000000000000..ae23d5dda5eb04
--- /dev/null
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -0,0 +1,1569 @@
+//===-------------- RISCVVLOptimizer.cpp - VL Optimizer -------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===---------------------------------------------------------------------===//
+//
+// This pass reduces the VL where possible at the MI level, before VSETVLI
+// instructions are inserted.
+//
+// The purpose of this optimization is to make the VL argument, for instructions
+// that have a VL argument, as small as possible. This is implemented by
+// visiting each instruction in reverse order and checking that if it has a VL
+// argument, whether the VL can be reduced.
+//
+//===---------------------------------------------------------------------===//
+
+#include "RISCV.h"
+#include "RISCVMachineFunctionInfo.h"
+#include "RISCVSubtarget.h"
+#include "llvm/ADT/SetVector.h"
+#include "llvm/CodeGen/MachineDominators.h"
+#include "llvm/CodeGen/MachineFunctionPass.h"
+#include "llvm/InitializePasses.h"
+
+#include <algorithm>
+
+using namespace llvm;
+
+#define DEBUG_TYPE "riscv-vl-optimizer"
+
+namespace {
+
+class RISCVVLOptimizer : public MachineFunctionPass {
+  const MachineRegisterInfo *MRI;
+  const MachineDominatorTree *MDT;
+
+public:
+  static char ID;
+
+  RISCVVLOptimizer() : MachineFunctionPass(ID) { }
+
+  bool runOnMachineFunction(MachineFunction &MF) override;
+
+  void getAnalysisUsage(AnalysisUsage &AU) const override {
+    AU.setPreservesCFG();
+    AU.addRequired<MachineDominatorTreeWrapperPass>();
+    MachineFunctionPass::getAnalysisUsage(AU);
+  }
+
+  StringRef getPassName() const override { return "RISC-V VL Optimizer"; }
+
+private:
+  bool tryReduceVL(MachineInstr &MI);
+  bool isCandidate(const MachineInstr &MI) const;
+};
+
+} // end anonymous namespace
+
+char RISCVVLOptimizer::ID = 0;
+INITIALIZE_PASS_BEGIN(RISCVVLOptimizer, DEBUG_TYPE, "RISC-V VL Optimizer",
+                      false, false)
+INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
+INITIALIZE_PASS_END(RISCVVLOptimizer, DEBUG_TYPE, "RISC-V VL Optimizer", false,
+                    false)
+
+FunctionPass *llvm::createRISCVVLOptimizerPass() {
+  return new RISCVVLOptimizer();
+}
+
+/// Return true if R is a physical or virtual vector register, false otherwise.
+static bool isVectorRegClass(Register R, const MachineRegisterInfo *MRI) {
+  if (R.isPhysical())
+    return RISCV::VRRegClass.contains(R);
+  const TargetRegisterClass *RC = MRI->getRegClass(R);
+  return RISCV::VRRegClass.hasSubClassEq(RC) ||
+         RISCV::VRM2RegClass.hasSubClassEq(RC) ||
+         RISCV::VRM4RegClass.hasSubClassEq(RC) ||
+         RISCV::VRM8RegClass.hasSubClassEq(RC);
+}
+
+/// Represents the EMUL and EEW of a MachineOperand.
+struct OperandInfo {
+  enum class State {
+    Unknown,
+    Known,
+  } S;
+
+  // Represent as 1,2,4,8, ... and fractional indicator. This is because
+  // EMUL can take on values that don't map to RISCVII::VLMUL values exactly.
+  // For example, a mask operand can have an EMUL less than MF8.
+  std::pair<unsigned, bool> EMUL;
+
+  unsigned Log2EEW;
+
+  OperandInfo(RISCVII::VLMUL EMUL, unsigned Log2EEW)
+      : S(State::Known), EMUL(RISCVVType::decodeVLMUL(EMUL)), Log2EEW(Log2EEW) {
+  }
+
+  OperandInfo(std::pair<unsigned, bool> EMUL, unsigned Log2EEW)
+      : S(State::Known), EMUL(EMUL), Log2EEW(Log2EEW) {}
+
+  OperandInfo(State S) : S(S) {
+    assert(S != State::Known &&
+           "This constructor may only be used to construct "
+           "an Unknown OperandInfo");
+  }
+
+  bool isUnknown() const { return S == State::Unknown; }
+  bool isKnown() const { return S == State::Known; }
+
+  static bool EMULAndEEWAreEqual(const OperandInfo &A, const OperandInfo &B) {
+    assert(A.isKnown() && B.isKnown() && "Both operands must be known");
+    return A.Log2EEW == B.Log2EEW && A.EMUL.first == B.EMUL.first &&
+           A.EMUL.second == B.EMUL.second;
+  }
+
+  void print(raw_ostream &OS) const {
+    if (isUnknown()) {
+      OS << "Unknown";
+      return;
+    }
+    OS << "EMUL: ";
+    if (EMUL.second)
+      OS << "m";
+    OS << "f" << EMUL.first;
+    OS << ", EEW: " << (1 << Log2EEW);
+  }
+};
+
+static raw_ostream &operator<<(raw_ostream &OS, const OperandInfo &OI) {
+  OI.print(OS);
+  return OS;
+}
+
+/// Return the RISCVII::VLMUL that is two times VLMul.
+/// Precondition: VLMul is not LMUL_RESERVED or LMUL_8.
+static RISCVII::VLMUL twoTimesVLMUL(RISCVII::VLMUL VLMul) {
+  switch (VLMul) {
+  case RISCVII::VLMUL::LMUL_F8:
+    return RISCVII::VLMUL::LMUL_F4;
+  case RISCVII::VLMUL::LMUL_F4:
+    return RISCVII::VLMUL::LMUL_F2;
+  case RISCVII::VLMUL::LMUL_F2:
+    return RISCVII::VLMUL::LMUL_1;
+  case RISCVII::VLMUL::LMUL_1:
+    return RISCVII::VLMUL::LMUL_2;
+  case RISCVII::VLMUL::LMUL_2:
+    return RISCVII::VLMUL::LMUL_4;
+  case RISCVII::VLMUL::LMUL_4:
+    return RISCVII::VLMUL::LMUL_8;
+  case RISCVII::VLMUL::LMUL_8:
+  default:
+    llvm_unreachable("Could not multiply VLMul by 2");
+  }
+}
+
+/// Return the RISCVII::VLMUL that is VLMul / 2.
+/// Precondition: VLMul is not LMUL_RESERVED or LMUL_MF8.
+static RISCVII::VLMUL halfVLMUL(RISCVII::VLMUL VLMul) {
+  switch (VLMul) {
+  case RISCVII::VLMUL::LMUL_F4:
+    return RISCVII::VLMUL::LMUL_F8;
+  case RISCVII::VLMUL::LMUL_F2:
+    return RISCVII::VLMUL::LMUL_F4;
+  case RISCVII::VLMUL::LMUL_1:
+    return RISCVII::VLMUL::LMUL_F2;
+  case RISCVII::VLMUL::LMUL_2:
+    return RISCVII::VLMUL::LMUL_1;
+  case RISCVII::VLMUL::LMUL_4:
+    return RISCVII::VLMUL::LMUL_2;
+  case RISCVII::VLMUL::LMUL_8:
+    return RISCVII::VLMUL::LMUL_4;
+  case RISCVII::VLMUL::LMUL_F8:
+  default:
+    llvm_unreachable("Could not divide VLMul by 2");
+  }
+}
+
+/// Return EMUL = (EEW / SEW) * LMUL where EEW comes from Log2EEW and LMUL and
+/// SEW are from the TSFlags of MI.
+static std::pair<unsigned, bool>
+getEMULEqualsEEWDivSEWTimesLMUL(unsigned Log2EEW, const MachineInstr &MI) {
+  RISCVII::VLMUL MIVLMUL = RISCVII::getLMul(MI.getDesc().TSFlags);
+  auto [MILMUL, MILMULIsFractional] = RISCVVType::decodeVLMUL(MIVLMUL);
+  unsigned MILog2SEW =
+      MI.getOperand(RISCVII::getSEWOpNum(MI.getDesc())).getImm();
+  unsigned MISEW = 1 << MILog2SEW;
+
+  unsigned EEW = 1 << Log2EEW;
+  // Calculate (EEW/SEW)*LMUL preserving fractions less than 1. Use GCD
+  // to put fraction in simplest form.
+  unsigned Num = EEW, Denom = MISEW;
+  int GCD = MILMULIsFractional ? std::gcd(Num, Denom * MILMUL)
+                               : std::gcd(Num * MILMUL, Denom);
+  Num = MILMULIsFractional ? Num / GCD : Num * MILMUL / GCD;
+  Denom = MILMULIsFractional ? Denom * MILMUL / GCD : Denom / GCD;
+  return std::make_pair(Num > Denom ? Num : Denom, Denom > Num);
+}
+
+static bool isOpN(const MachineOperand &MO, unsigned OpN) {
+  const MachineInstr &MI = *MO.getParent();
+  bool HasPassthru = RISCVII::isFirstDefTiedToFirstUse(MI.getDesc());
+
+  if (HasPassthru)
+    return MO.getOperandNo() == OpN + 1;
+
+  return MO.getOperandNo() == OpN;
+}
+
+/// An index segment load or store operand has the form v.*seg<nf>ei<eeew>.v.
+/// Data has EEW=SEW, EMUL=LMUL. Index has EEW=<eew>, EMUL=(EEW/SEW)*LMUL. LMUL
+/// and SEW comes from TSFlags of MI.
+static OperandInfo getIndexSegmentLoadStoreOperandInfo(unsigned Log2EEW,
+                                                       const MachineInstr &MI,
+                                                       const MachineOperand &MO,
+                                                       bool IsLoad) {
+  // Operand 0 is data register
+  // Data vector register group has EEW=SEW, EMUL=LMUL.
+  if (MO.getOperandNo() == 0) {
+    RISCVII::VLMUL MIVLMul = RISCVII::getLMul(MI.getDesc().TSFlags);
+    unsigned MILog2SEW =
+        MI.getOperand(RISCVII::getSEWOpNum(MI.getDesc())).getImm();
+    return OperandInfo(MIVLMul, MILog2SEW);
+  }
+
+  // Operand 2 is index vector register
+  // v.*seg<nf>ei<eeew>.v
+  // Index vector register group has EEW=<eew>, EMUL=(EEW/SEW)*LMUL.
+  if (isOpN(MO, 2))
+    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(Log2EEW, MI), Log2EEW);
+
+  llvm_unreachable("Could not get OperandInfo for non-vector register of an "
+                   "indexed segment load or store instruction");
+}
+
+/// Dest has EEW=SEW and EMUL=LMUL. Source EEW=SEW/Factor (i.e. F2 => EEW/2).
+/// Source has EMUL=(EEW/SEW)*LMUL. LMUL and SEW comes from TSFlags of MI.
+static OperandInfo getIntegerExtensionOperandInfo(unsigned Factor,
+                                                  const MachineInstr &MI,
+                                                  const MachineOperand &MO) {
+  RISCVII::VLMUL MIVLMul = RISCVII::getLMul(MI.getDesc().TSFlags);
+  unsigned MILog2SEW =
+      MI.getOperand(RISCVII::getSEWOpNum(MI.getDesc())).getImm();
+
+  if (MO.getOperandNo() == 0)
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  unsigned MISEW = 1 << MILog2SEW;
+  unsigned EEW = MISEW / Factor;
+  unsigned Log2EEW = Log2_32(EEW);
+
+  return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(Log2EEW, MI), Log2EEW);
+}
+
+/// Check whether MO is a mask operand of MI.
+static bool isMaskOperand(const MachineInstr &MI, const MachineOperand &MO,
+                          const MachineRegisterInfo *MRI) {
+
+  if (!MO.isReg() || !isVectorRegClass(MO.getReg(), MRI))
+    return false;
+
+  const MCInstrDesc &Desc = MI.getDesc();
+  return Desc.operands()[MO.getOperandNo()].RegClass == RISCV::VMV0RegClassID;
+}
+
+/// Return the OperandInfo for MO, which is an operand of MI.
+static OperandInfo getOperandInfo(const MachineInstr &MI,
+                                  const MachineOperand &MO,
+                                  const MachineRegisterInfo *MRI) {
+  const RISCVVPseudosTable::PseudoInfo *RVV =
+      RISCVVPseudosTable::getPseudoInfo(MI.getOpcode());
+  assert(RVV && "Could not find MI in PseudoTable");
+
+  // MI has a VLMUL and SEW associated with it. The RVV specification defines
+  // the LMUL and SEW of each operand and definition in relation to MI.VLMUL and
+  // MI.SEW.
+  RISCVII::VLMUL MIVLMul = RISCVII::getLMul(MI.getDesc().TSFlags);
+  unsigned MILog2SEW =
+      MI.getOperand(RISCVII::getSEWOpNum(MI.getDesc())).getImm();
+
+  const bool HasPassthru = RISCVII::isFirstDefTiedToFirstUse(MI.getDesc());
+
+  // We bail out early for instructions that have passthru with non NoRegister,
+  // which means they are using TU policy. We are not interested in these
+  // since they must preserve the entire register content.
+  if (HasPassthru && MO.getOperandNo() == MI.getNumExplicitDefs() &&
+      (MO.getReg() != RISCV::NoRegister))
+    return OperandInfo(OperandInfo::State::Unknown);
+
+  bool IsMODef = MO.getOperandNo() == 0;
+  bool IsOp1 = isOpN(MO, 1);
+  bool IsOp2 = isOpN(MO, 2);
+  bool IsOp3 = isOpN(MO, 3);
+
+  // All mask operands have EEW=1, EMUL=(EEW/SEW)*LMUL
+  if (isMaskOperand(MI, MO, MRI))
+    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
+
+  // switch against BaseInstr to reduce number of cases that need to be
+  // considered.
+  switch (RVV->BaseInstr) {
+
+  // 6. Configuration-Setting Instructions
+  // Configuration setting instructions do not read or write vector registers
+  case RISCV::VSETIVLI:
+  case RISCV::VSETVL:
+  case RISCV::VSETVLI:
+    llvm_unreachable("Configuration setting instructions do not read or write "
+                     "vector registers");
+
+  // 7. Vector Loads and Stores
+  // 7.4. Vector Unit-Stride Instructions
+  // 7.5. Vector Strided Instructions
+  // 7.7. Unit-stride Fault-Only-First Loads
+  /// Dest EEW encoded in the instruction and EMUL=(EEW/SEW)*LMUL
+  case RISCV::VLE8_V:
+  case RISCV::VSE8_V:
+  case RISCV::VLM_V:
+  case RISCV::VSM_V:
+  case RISCV::VLSE8_V:
+  case RISCV::VSSE8_V:
+  case RISCV::VLE8FF_V:
+    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(3, MI), 3);
+  case RISCV::VLE16_V:
+  case RISCV::VSE16_V:
+  case RISCV::VLSE16_V:
+  case RISCV::VSSE16_V:
+  case RISCV::VLE16FF_V:
+    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(4, MI), 4);
+  case RISCV::VLE32_V:
+  case RISCV::VSE32_V:
+  case RISCV::VLSE32_V:
+  case RISCV::VSSE32_V:
+  case RISCV::VLE32FF_V:
+    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(5, MI), 5);
+  case RISCV::VLE64_V:
+  case RISCV::VSE64_V:
+  case RISCV::VLSE64_V:
+  case RISCV::VSSE64_V:
+  case RISCV::VLE64FF_V:
+    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(6, MI), 6);
+
+  // 7.6. Vector Indexed Instructions
+  // Data EEW=SEW, EMUL=LMUL. Index EEW=<eew> and EMUL=(EEW/SEW)*LMUL
+  case RISCV::VLUXEI8_V:
+  case RISCV::VLOXEI8_V:
+  case RISCV::VSUXEI8_V:
+  case RISCV::VSOXEI8_V:
+    if (MO.getOperandNo() == 0)
+      return OperandInfo(MIVLMul, MILog2SEW);
+    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(3, MI), 3);
+  case RISCV::VLUXEI16_V:
+  case RISCV::VLOXEI16_V:
+  case RISCV::VSUXEI16_V:
+  case RISCV::VSOXEI16_V:
+    if (MO.getOperandNo() == 0)
+      return OperandInfo(MIVLMul, MILog2SEW);
+    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(4, MI), 4);
+  case RISCV::VLUXEI32_V:
+  case RISCV::VLOXEI32_V:
+  case RISCV::VSUXEI32_V:
+  case RISCV::VSOXEI32_V:
+    if (MO.getOperandNo() == 0)
+      return OperandInfo(MIVLMul, MILog2SEW);
+    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(5, MI), 5);
+  case RISCV::VLUXEI64_V:
+  case RISCV::VLOXEI64_V:
+  case RISCV::VSUXEI64_V:
+  case RISCV::VSOXEI64_V:
+    if (MO.getOperandNo() == 0)
+      return OperandInfo(MIVLMul, MILog2SEW);
+    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(6, MI), 6);
+
+  // 7.8. Vector Load/Store Segment Instructions
+  // 7.8.1. Vector Unit-Stride Segment Loads and Stores
+  // v.*seg<nf>e<eew>.*
+  // EEW=eew, EMUL=LMUL
+  case RISCV::VLSEG2E8_V:
+  case RISCV::VLSEG2E8FF_V:
+  case RISCV::VLSEG3E8_V:
+  case RISCV::VLSEG3E8FF_V:
+  case RISCV::VLSEG4E8_V:
+  case RISCV::VLSEG4E8FF_V:
+  case RISCV::VLSEG5E8_V:
+  case RISCV::VLSEG5E8FF_V:
+  case RISCV::VLSEG6E8_V:
+  case RISCV::VLSEG6E8FF_V:
+  case RISCV::VLSEG7E8_V:
+  case RISCV::VLSEG7E8FF_V:
+  case RISCV::VLSEG8E8_V:
+  case RISCV::VLSEG8E8FF_V:
+  case RISCV::VSSEG2E8_V:
+  case RISCV::VSSEG3E8_V:
+  case RISCV::VSSEG4E8_V:
+  case RISCV::VSSEG5E8_V:
+  case RISCV::VSSEG6E8_V:
+  case RISCV::VSSEG7E8_V:
+  case RISCV::VSSEG8E8_V:
+    return OperandInfo(MIVLMul, 3);
+  case RISCV::VLSEG2E16_V:
+  case RISCV::VLSEG2E16FF_V:
+  case RISCV::VLSEG3E16_V:
+  case RISCV::VLSEG3E16FF_V:
+  case RISCV::VLSEG4E16_V:
+  case RISCV::VLSEG4E16FF_V:
+  case RISCV::VLSEG5E16_V:
+  case RISCV::VLSEG5E16FF_V:
+  case RISCV::VLSEG6E16_V:
+  case RISCV::VLSEG6E16FF_V:
+  case RISCV::VLSEG7E16_V:
+  case RISCV::VLSEG7E16FF_V:
+  case RISCV::VLSEG8E16_V:
+  case RISCV::VLSEG8E16FF_V:
+  case RISCV::VSSEG2E16_V:
+  case RISCV::VSSEG3E16_V:
+  case RISCV::VSSEG4E16_V:
+  case RISCV::VSSEG5E16_V:
+  case RISCV::VSSEG6E16_V:
+  case RISCV::VSSEG7E16_V:
+  case RISCV::VSSEG8E16_V:
+    return OperandInfo(MIVLMul, 4);
+  case RISCV::VLSEG2E32_V:
+  case RISCV::VLSEG2E32FF_V:
+  case RISCV::VLSEG3E32_V:
+  case RISCV::VLSEG3E32FF_V:
+  case RISCV::VLSEG4E32_V:
+  case RISCV::VLSEG4E32FF_V:
+  case RISCV::VLSEG5E32_V:
+  case RISCV::VLSEG5E32FF_V:
+  case RISCV::VLSEG6E32_V:
+  case RISCV::VLSEG6E32FF_V:
+  case RISCV::VLSEG7E32_V:
+  case RISCV::VLSEG7E32FF_V:
+  case RISCV::VLSEG8E32_V:
+  case RISCV::VLSEG8E32FF_V:
+  case RISCV::VSSEG2E32_V:
+  case RISCV::VSSEG3E32_V:
+  case RISCV::VSSEG4E32_V:
+  case RISCV::VSSEG5E32_V:
+  case RISCV::VSSEG6E32_V:
+  case RISCV::VSSEG7E32_V:
+  case RISCV::VSSEG8E32_V:
+    return OperandInfo(MIVLMul, 5);
+  case RISCV::VLSEG2E64_V:
+  case RISCV::VLSEG2E64FF_V:
+  case RISCV::VLSEG3E64_V:
+  case RISCV::VLSEG3E64FF_V:
+  case RISCV::VLSEG4E64_V:
+  case RISCV::VLSEG4E64FF_V:
+  case RISCV::VLSEG5E64_V:
+  case RISCV::VLSEG5E64FF_V:
+  case RISCV::VLSEG6E64_V:
+  case RISCV::VLSEG6E64FF_V:
+  case RISCV::VLSEG7E64_V:
+  case RISCV::VLSEG7E64FF_V:
+  case RISCV::VLSEG8E64_V:
+  case RISCV::VLSEG8E64FF_V:
+  case RISCV::VSSEG2E64_V:
+  case RISCV::VSSEG3E64_V:
+  case RISCV::VSSEG4E64_V:
+  case RISCV::VSSEG5E64_V:
+  case RISCV::VSSEG6E64_V:
+  case RISCV::VSSEG7E64_V:
+  case RISCV::VSSEG8E64_V:
+    return OperandInfo(MIVLMul, 6);
+
+  // 7.8.2. Vector Strided Segment Loads and Stores
+  case RISCV::VLSSEG2E8_V:
+  case RISCV::VLSSEG3E8_V:
+  case RISCV::VLSSEG4E8_V:
+  case RISCV::VLSSEG5E8_V:
+  case RISCV::VLSSEG6E8_V:
+  case RISCV::VLSSEG7E8_V:
+  case RISCV::VLSSEG8E8_V:
+  case RISCV::VSSSEG2E8_V:
+  case RISCV::VSSSEG3E8_V:
+  case RISCV::VSSSEG4E8_V:
+  case RISCV::VSSSEG5E8_V:
+  case RISCV::VSSSEG6E8_V:
+  case RISCV::VSSSEG7E8_V:
+  case RISCV::VSSSEG8E8_V:
+    return OperandInfo(MIVLMul, 3);
+  case RISCV::VLSSEG2E16_V:
+  case RISCV::VLSSEG3E16_V:
+  case RISCV::VLSSEG4E16_V:
+  case RISCV::VLSSEG5E16_V:
+  case RISCV::VLSSEG6E16_V:
+  case RISCV::VLSSEG7E16_V:
+  case RISCV::VLSSEG8E16_V:
+  case RISCV::VSSSEG2E16_V:
+  case RISCV::VSSSEG3E16_V:
+  case RISCV::VSSSEG4E16_V:
+  case RISCV::VSSSEG5E16_V:
+  case RISCV::VSSSEG6E16_V:
+  case RISCV::VSSSEG7E16_V:
+  case RISCV::VSSSEG8E16_V:
+    return OperandInfo(MIVLMul, 4);
+  case RISCV::VLSSEG2E32_V:
+  case RISCV::VLSSEG3E32_V:
+  case RISCV::VLSSEG4E32_V:
+  case RISCV::VLSSEG5E32_V:
+  case RISCV::VLSSEG6E32_V:
+  case RISCV::VLSSEG7E32_V:
+  case RISCV::VLSSEG8E32_V:
+  case RISCV::VSSSEG2E32_V:
+  case RISCV::VSSSEG3E32_V:
+  case RISCV::VSSSEG4E32_V:
+  case RISCV::VSSSEG5E32_V:
+  case RISCV::VSSSEG6E32_V:
+  case RISCV::VSSSEG7E32_V:
+  case RISCV::VSSSEG8E32_V:
+    return OperandInfo(MIVLMul, 5);
+  case RISCV::VLSSEG2E64_V:
+  case RISCV::VLSSEG3E64_V:
+  case RISCV::VLSSEG4E64_V:
+  case RISCV::VLSSEG5E64_V:
+  case RISCV::VLSSEG6E64_V:
+  case RISCV::VLSSEG7E64_V:
+  case RISCV::VLSSEG8E64_V:
+  case RISCV::VSSSEG2E64_V:
+  case RISCV::VSSSEG3E64_V:
+  case RISCV::VSSSEG4E64_V:
+  case RISCV::VSSSEG5E64_V:
+  case RISCV::VSSSEG6E64_V:
+  case RISCV::VSSSEG7E64_V:
+  case RISCV::VSSSEG8E64_V:
+    return OperandInfo(MIVLMul, 6);
+
+  // 7.8.3. Vector Indexed Segment Loads and Stores
+  case RISCV::VLUXSEG2EI8_V:
+  case RISCV::VLUXSEG3EI8_V:
+  case RISCV::VLUXSEG4EI8_V:
+  case RISCV::VLUXSEG5EI8_V:
+  case RISCV::VLUXSEG6EI8_V:
+  case RISCV::VLUXSEG7EI8_V:
+  case RISCV::VLUXSEG8EI8_V:
+  case RISCV::VLOXSEG2EI8_V:
+  case RISCV::VLOXSEG3EI8_V:
+  case RISCV::VLOXSEG4EI8_V:
+  case RISCV::VLOXSEG5EI8_V:
+  case RISCV::VLOXSEG6EI8_V:
+  case RISCV::VLOXSEG7EI8_V:
+  case RISCV::VLOXSEG8EI8_V:
+    return getIndexSegmentLoadStoreOperandInfo(3, MI, MO, /* IsLoad */ true);
+  case RISCV::VSUXSEG2EI8_V:
+  case RISCV::VSUXSEG3EI8_V:
+  case RISCV::VSUXSEG4EI8_V:
+  case RISCV::VSUXSEG5EI8_V:
+  case RISCV::VSUXSEG6EI8_V:
+  case RISCV::VSUXSEG7EI8_V:
+  case RISCV::VSUXSEG8EI8_V:
+  case RISCV::VSOXSEG2EI8_V:
+  case RISCV::VSOXSEG3EI8_V:
+  case RISCV::VSOXSEG4EI8_V:
+  case RISCV::VSOXSEG5EI8_V:
+  case RISCV::VSOXSEG6EI8_V:
+  case RISCV::VSOXSEG7EI8_V:
+  case RISCV::VSOXSEG8EI8_V:
+    return getIndexSegmentLoadStoreOperandInfo(3, MI, MO, /* IsLoad */ false);
+  case RISCV::VLUXSEG2EI16_V:
+  case RISCV::VLUXSEG3EI16_V:
+  case RISCV::VLUXSEG4EI16_V:
+  case RISCV::VLUXSEG5EI16_V:
+  case RISCV::VLUXSEG6EI16_V:
+  case RISCV::VLUXSEG7EI16_V:
+  case RISCV::VLUXSEG8EI16_V:
+  case RISCV::VLOXSEG2EI16_V:
+  case RISCV::VLOXSEG3EI16_V:
+  case RISCV::VLOXSEG4EI16_V:
+  case RISCV::VLOXSEG5EI16_V:
+  case RISCV::VLOXSEG6EI16_V:
+  case RISCV::VLOXSEG7EI16_V:
+  case RISCV::VLOXSEG8EI16_V:
+    return getIndexSegmentLoadStoreOperandInfo(4, MI, MO, /* IsLoad */ true);
+  case RISCV::VSUXSEG2EI16_V:
+  case RISCV::VSUXSEG3EI16_V:
+  case RISCV::VSUXSEG4EI16_V:
+  case RISCV::VSUXSEG5EI16_V:
+  case RISCV::VSUXSEG6EI16_V:
+  case RISCV::VSUXSEG7EI16_V:
+  case RISCV::VSUXSEG8EI16_V:
+  case RISCV::VSOXSEG2EI16_V:
+  case RISCV::VSOXSEG3EI16_V:
+  case RISCV::VSOXSEG4EI16_V:
+  case RISCV::VSOXSEG5EI16_V:
+  case RISCV::VSOXSEG6EI16_V:
+  case RISCV::VSOXSEG7EI16_V:
+  case RISCV::VSOXSEG8EI16_V:
+    return getIndexSegmentLoadStoreOperandInfo(4, MI, MO, /* IsLoad */ false);
+  case RISCV::VLUXSEG2EI32_V:
+  case RISCV::VLUXSEG3EI32_V:
+  case RISCV::VLUXSEG4EI32_V:
+  case RISCV::VLUXSEG5EI32_V:
+  case RISCV::VLUXSEG6EI32_V:
+  case RISCV::VLUXSEG7EI32_V:
+  case RISCV::VLUXSEG8EI32_V:
+  case RISCV::VLOXSEG2EI32_V:
+  case RISCV::VLOXSEG3EI32_V:
+  case RISCV::VLOXSEG4EI32_V:
+  case RISCV::VLOXSEG5EI32_V:
+  case RISCV::VLOXSEG6EI32_V:
+  case RISCV::VLOXSEG7EI32_V:
+  case RISCV::VLOXSEG8EI32_V:
+    return getIndexSegmentLoadStoreOperandInfo(5, MI, MO, /* IsLoad */ true);
+  case RISCV::VSUXSEG2EI32_V:
+  case RISCV::VSUXSEG3EI32_V:
+  case RISCV::VSUXSEG4EI32_V:
+  case RISCV::VSUXSEG5EI32_V:
+  case RISCV::VSUXSEG6EI32_V:
+  case RISCV::VSUXSEG7EI32_V:
+  case RISCV::VSUXSEG8EI32_V:
+  case RISCV::VSOXSEG2EI32_V:
+  case RISCV::VSOXSEG3EI32_V:
+  case RISCV::VSOXSEG4EI32_V:
+  case RISCV::VSOXSEG5EI32_V:
+  case RISCV::VSOXSEG6EI32_V:
+  case RISCV::VSOXSEG7EI32_V:
+  case RISCV::VSOXSEG8EI32_V:
+    return getIndexSegmentLoadStoreOperandInfo(5, MI, MO, /* IsLoad */ false);
+  case RISCV::VLUXSEG2EI64_V:
+  case RISCV::VLUXSEG3EI64_V:
+  case RISCV::VLUXSEG4EI64_V:
+  case RISCV::VLUXSEG5EI64_V:
+  case RISCV::VLUXSEG6EI64_V:
+  case RISCV::VLUXSEG7EI64_V:
+  case RISCV::VLUXSEG8EI64_V:
+  case RISCV::VLOXSEG2EI64_V:
+  case RISCV::VLOXSEG3EI64_V:
+  case RISCV::VLOXSEG4EI64_V:
+  case RISCV::VLOXSEG5EI64_V:
+  case RISCV::VLOXSEG6EI64_V:
+  case RISCV::VLOXSEG7EI64_V:
+  case RISCV::VLOXSEG8EI64_V:
+    return getIndexSegmentLoadStoreOperandInfo(6, MI, MO, /* IsLoad */ true);
+  case RISCV::VSUXSEG2EI64_V:
+  case RISCV::VSUXSEG3EI64_V:
+  case RISCV::VSUXSEG4EI64_V:
+  case RISCV::VSUXSEG5EI64_V:
+  case RISCV::VSUXSEG6EI64_V:
+  case RISCV::VSUXSEG7EI64_V:
+  case RISCV::VSUXSEG8EI64_V:
+  case RISCV::VSOXSEG2EI64_V:
+  case RISCV::VSOXSEG3EI64_V:
+  case RISCV::VSOXSEG4EI64_V:
+  case RISCV::VSOXSEG5EI64_V:
+  case RISCV::VSOXSEG6EI64_V:
+  case RISCV::VSOXSEG7EI64_V:
+  case RISCV::VSOXSEG8EI64_V:
+    return getIndexSegmentLoadStoreOperandInfo(6, MI, MO, /* IsLoad */ false);
+
+  // 7.9. Vector Load/Store Whole Register Instructions
+  // EMUL=nr. EEW=eew. Since in-register byte layouts are idential to in-memory
+  // byte layouts, the same data is writen to destination register regardless
+  // of EEW. eew is just a hint to the hardware and has not functional impact.
+  // Therefore, it is be okay if we ignore eew and always use the same EEW to
+  // create more optimization opportunities.
+  // FIXME: Instead of using any SEW, we really ought to return the SEW in the
+  // instruction and add a field to OperandInfo that says the SEW is just a hint
+  // so that this optimization can use any sew to construct a ratio.
+  case RISCV::VL1RE8_V:
+  case RISCV::VL1RE16_V:
+  case RISCV::VL1RE32_V:
+  case RISCV::VL1RE64_V:
+  case RISCV::VS1R_V:
+    return OperandInfo(RISCVII::VLMUL::LMUL_1, 0);
+  case RISCV::VL2RE8_V:
+  case RISCV::VL2RE16_V:
+  case RISCV::VL2RE32_V:
+  case RISCV::VL2RE64_V:
+  case RISCV::VS2R_V:
+    return OperandInfo(RISCVII::VLMUL::LMUL_2, 0);
+  case RISCV::VL4RE8_V:
+  case RISCV::VL4RE16_V:
+  case RISCV::VL4RE32_V:
+  case RISCV::VL4RE64_V:
+  case RISCV::VS4R_V:
+    return OperandInfo(RISCVII::VLMUL::LMUL_4, 0);
+  case RISCV::VL8RE8_V:
+  case RISCV::VL8RE16_V:
+  case RISCV::VL8RE32_V:
+  case RISCV::VL8RE64_V:
+  case RISCV::VS8R_V:
+    return OperandInfo(RISCVII::VLMUL::LMUL_8, 0);
+
+  // 11. Vector Integer Arithmetic Instructions
+  // 11.1. Vector Single-Width Integer Add and Subtract
+  case RISCV::VADD_VI:
+  case RISCV::VADD_VV:
+  case RISCV::VADD_VX:
+  case RISCV::VSUB_VV:
+  case RISCV::VSUB_VX:
+  case RISCV::VRSUB_VI:
+  case RISCV::VRSUB_VX:
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 11.2. Vector Widening Integer Add/Subtract
+  // Def uses EEW=2*SEW and EMUL=2*LMUL. Operands use EEW=SEW and EMUL=LMUL.
+  case RISCV::VWADDU_VV:
+  case RISCV::VWADDU_VX:
+  case RISCV::VWSUBU_VV:
+  case RISCV::VWSUBU_VX:
+  case RISCV::VWADD_VV:
+  case RISCV::VWADD_VX:
+  case RISCV::VWSUB_VV:
+  case RISCV::VWSUB_VX:
+  case RISCV::VWSLL_VI: {
+    unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
+    RISCVII::VLMUL EMUL = IsMODef ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    return OperandInfo(EMUL, Log2EEW);
+  }
+  // Def and Op1 uses EEW=2*SEW and EMUL=2*LMUL. Op2 uses EEW=SEW and EMUL=LMUL
+  case RISCV::VWADDU_WV:
+  case RISCV::VWADDU_WX:
+  case RISCV::VWSUBU_WV:
+  case RISCV::VWSUBU_WX:
+  case RISCV::VWADD_WV:
+  case RISCV::VWADD_WX:
+  case RISCV::VWSUB_WV:
+  case RISCV::VWSUB_WX: {
+    bool TwoTimes = IsMODef || IsOp1;
+    unsigned Log2EEW = TwoTimes ? MILog2SEW + 1 : MILog2SEW;
+    RISCVII::VLMUL EMUL = TwoTimes ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    return OperandInfo(EMUL, Log2EEW);
+  }
+  // 11.3. Vector Integer Extension
+  case RISCV::VZEXT_VF2:
+  case RISCV::VSEXT_VF2:
+    return getIntegerExtensionOperandInfo(2, MI, MO);
+  case RISCV::VZEXT_VF4:
+  case RISCV::VSEXT_VF4:
+    return getIntegerExtensionOperandInfo(4, MI, MO);
+  case RISCV::VZEXT_VF8:
+  case RISCV::VSEXT_VF8:
+    return getIntegerExtensionOperandInfo(8, MI, MO);
+
+  // 11.4. Vector Integer Add-with-Carry / Subtract-with-Borrow Instructions
+  // EEW=SEW and EMUL=LMUL. Mask Operand EEW=1 and EMUL=(EEW/SEW)*LMUL
+  case RISCV::VADC_VIM:
+  case RISCV::VADC_VVM:
+  case RISCV::VADC_VXM:
+  case RISCV::VSBC_VVM:
+  case RISCV::VSBC_VXM:
+    return MO.getOperandNo() == 3
+               ? OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0)
+               : OperandInfo(MIVLMul, MILog2SEW);
+  // Dest EEW=1 and EMUL=(EEW/SEW)*LMUL. Source EEW=SEW and EMUL=LMUL. Mask
+  // operand EEW=1 and EMUL=(EEW/SEW)*LMUL
+  case RISCV::VMADC_VIM:
+  case RISCV::VMADC_VVM:
+  case RISCV::VMADC_VXM:
+  case RISCV::VMSBC_VVM:
+  case RISCV::VMSBC_VXM:
+    return IsMODef || MO.getOperandNo() == 3
+               ? OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0)
+               : OperandInfo(MIVLMul, MILog2SEW);
+  // Dest EEW=1 and EMUL=(EEW/SEW)*LMUL. Source EEW=SEW and EMUL=LMUL.
+  case RISCV::VMADC_VV:
+  case RISCV::VMADC_VI:
+  case RISCV::VMADC_VX:
+  case RISCV::VMSBC_VV:
+  case RISCV::VMSBC_VX:
+    return IsMODef ? OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0)
+                   : OperandInfo(MIVLMul, MILog2SEW);
+
+  // 11.5. Vector Bitwise Logical Instructions
+  // 11.6. Vector Single-Width Shift Instructions
+  // EEW=SEW. EMUL=LMUL.
+  case RISCV::VAND_VI:
+  case RISCV::VAND_VV:
+  case RISCV::VAND_VX:
+  case RISCV::VOR_VI:
+  case RISCV::VOR_VV:
+  case RISCV::VOR_VX:
+  case RISCV::VXOR_VI:
+  case RISCV::VXOR_VV:
+  case RISCV::VXOR_VX:
+  case RISCV::VSLL_VI:
+  case RISCV::VSLL_VV:
+  case RISCV::VSLL_VX:
+  case RISCV::VSRL_VI:
+  case RISCV::VSRL_VV:
+  case RISCV::VSRL_VX:
+  case RISCV::VSRA_VI:
+  case RISCV::VSRA_VV:
+  case RISCV::VSRA_VX:
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 11.7. Vector Narrowing Integer Right Shift Instructions
+  // Destination EEW=SEW and EMUL=LMUL, Op 1 has EEW=2*SEW EMUL=2*LMUL. Op2 has
+  // EEW=SEW EMUL=LMUL.
+  case RISCV::VNSRL_WX:
+  case RISCV::VNSRL_WI:
+  case RISCV::VNSRL_WV:
+  case RISCV::VNSRA_WI:
+  case RISCV::VNSRA_WV:
+  case RISCV::VNSRA_WX: {
+    bool TwoTimes = IsOp1;
+    unsigned Log2EEW = TwoTimes ? MILog2SEW + 1 : MILog2SEW;
+    RISCVII::VLMUL EMUL = TwoTimes ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    return OperandInfo(EMUL, Log2EEW);
+  }
+  // 11.8. Vector Integer Compare Instructions
+  // Dest EEW=1 and EMUL=(EEW/SEW)*LMUL. Source EEW=SEW and EMUL=LMUL.
+  case RISCV::VMSEQ_VI:
+  case RISCV::VMSEQ_VV:
+  case RISCV::VMSEQ_VX:
+  case RISCV::VMSNE_VI:
+  case RISCV::VMSNE_VV:
+  case RISCV::VMSNE_VX:
+  case RISCV::VMSLTU_VV:
+  case RISCV::VMSLTU_VX:
+  case RISCV::VMSLT_VV:
+  case RISCV::VMSLT_VX:
+  case RISCV::VMSLEU_VV:
+  case RISCV::VMSLEU_VI:
+  case RISCV::VMSLEU_VX:
+  case RISCV::VMSLE_VV:
+  case RISCV::VMSLE_VI:
+  case RISCV::VMSLE_VX:
+  case RISCV::VMSGTU_VI:
+  case RISCV::VMSGTU_VX:
+  case RISCV::VMSGT_VI:
+  case RISCV::VMSGT_VX:
+    if (IsMODef)
+      return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 11.9. Vector Integer Min/Max Instructions
+  // EEW=SEW. EMUL=LMUL.
+  case RISCV::VMINU_VV:
+  case RISCV::VMINU_VX:
+  case RISCV::VMIN_VV:
+  case RISCV::VMIN_VX:
+  case RISCV::VMAXU_VV:
+  case RISCV::VMAXU_VX:
+  case RISCV::VMAX_VV:
+  case RISCV::VMAX_VX:
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 11.10. Vector Single-Width Integer Multiply Instructions
+  // Source and Dest EEW=SEW and EMUL=LMUL.
+  case RISCV::VMUL_VV:
+  case RISCV::VMUL_VX:
+  case RISCV::VMULH_VV:
+  case RISCV::VMULH_VX:
+  case RISCV::VMULHU_VV:
+  case RISCV::VMULHU_VX:
+  case RISCV::VMULHSU_VV:
+  case RISCV::VMULHSU_VX: {
+    return OperandInfo(MIVLMul, MILog2SEW);
+  }
+  // 11.11. Vector Integer Divide Instructions
+  // EEW=SEW. EMUL=LMUL.
+  case RISCV::VDIVU_VV:
+  case RISCV::VDIVU_VX:
+  case RISCV::VDIV_VV:
+  case RISCV::VDIV_VX:
+  case RISCV::VREMU_VV:
+  case RISCV::VREMU_VX:
+  case RISCV::VREM_VV:
+  case RISCV::VREM_VX:
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 11.12. Vector Widening Integer Multiply Instructions
+  // Source and Destination EMUL=LMUL. Destination EEW=2*SEW. Source EEW=SEW.
+  case RISCV::VWMUL_VV:
+  case RISCV::VWMUL_VX:
+  case RISCV::VWMULSU_VV:
+  case RISCV::VWMULSU_VX:
+  case RISCV::VWMULU_VV:
+  case RISCV::VWMULU_VX: {
+    unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
+    RISCVII::VLMUL EMUL = IsMODef ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    return OperandInfo(EMUL, Log2EEW);
+  }
+  // 11.13. Vector Single-Width Integer Multiply-Add Instructions
+  // EEW=SEW. EMUL=LMUL.
+  case RISCV::VMACC_VV:
+  case RISCV::VMACC_VX:
+  case RISCV::VNMSAC_VV:
+  case RISCV::VNMSAC_VX:
+  case RISCV::VMADD_VV:
+  case RISCV::VMADD_VX:
+  case RISCV::VNMSUB_VV:
+  case RISCV::VNMSUB_VX:
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 11.14. Vector Widening Integer Multiply-Add Instructions
+  // Destination EEW=2*SEW and EMUL=2*LMUL. Source EEW=SEW and EMUL=LMUL.
+  // Even though the add is a 2*SEW addition, the operands of the add are the
+  // Dest which is 2*SEW and the result of the multiply which is 2*SEW.
+  case RISCV::VWMACCU_VV:
+  case RISCV::VWMACCU_VX:
+  case RISCV::VWMACC_VV:
+  case RISCV::VWMACC_VX:
+  case RISCV::VWMACCSU_VV:
+  case RISCV::VWMACCSU_VX:
+  case RISCV::VWMACCUS_VX: {
+    // Operand 0 is destination as a def and Operand 1 is destination as a use
+    // due to SSA.
+    bool TwoTimes = IsMODef || IsOp1;
+    unsigned Log2EEW = TwoTimes ? MILog2SEW + 1 : MILog2SEW;
+    RISCVII::VLMUL EMUL = TwoTimes ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    return OperandInfo(EMUL, Log2EEW);
+  }
+  // 11.15. Vector Integer Merge Instructions
+  // EEW=SEW and EMUL=LMUL, except the mask operand has EEW=1 and EMUL=
+  // (EEW/SEW)*LMUL.
+  case RISCV::VMERGE_VIM:
+  case RISCV::VMERGE_VVM:
+  case RISCV::VMERGE_VXM:
+    if (MO.getOperandNo() == 3)
+      return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 11.16. Vector Integer Move Instructions
+  // 12. Vector Fixed-Point Arithmetic Instructions
+  // 12.1. Vector Single-Width Saturating Add and Subtract
+  // 12.2. Vector Single-Width Averaging Add and Subtract
+  // EEW=SEW. EMUL=LMUL.
+  case RISCV::VMV_V_I:
+  case RISCV::VMV_V_V:
+  case RISCV::VMV_V_X:
+  case RISCV::VSADDU_VI:
+  case RISCV::VSADDU_VV:
+  case RISCV::VSADDU_VX:
+  case RISCV::VSADD_VI:
+  case RISCV::VSADD_VV:
+  case RISCV::VSADD_VX:
+  case RISCV::VSSUBU_VV:
+  case RISCV::VSSUBU_VX:
+  case RISCV::VSSUB_VV:
+  case RISCV::VSSUB_VX:
+  case RISCV::VAADDU_VV:
+  case RISCV::VAADDU_VX:
+  case RISCV::VAADD_VV:
+  case RISCV::VAADD_VX:
+  case RISCV::VASUBU_VV:
+  case RISCV::VASUBU_VX:
+  case RISCV::VASUB_VV:
+  case RISCV::VASUB_VX:
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 12.3. Vector Single-Width Fractional Multiply with Rounding and Saturation
+  // Destination EEW=2*SEW and EMUL=2*EMUL. Source EEW=SEW and EMUL=LMUL.
+  case RISCV::VSMUL_VV:
+  case RISCV::VSMUL_VX: {
+    unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
+    RISCVII::VLMUL EMUL = IsMODef ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    return OperandInfo(EMUL, Log2EEW);
+  }
+  // 12.4. Vector Single-Width Scaling Shift Instructions
+  // EEW=SEW. EMUL=LMUL.
+  case RISCV::VSSRL_VI:
+  case RISCV::VSSRL_VV:
+  case RISCV::VSSRL_VX:
+  case RISCV::VSSRA_VI:
+  case RISCV::VSSRA_VV:
+  case RISCV::VSSRA_VX:
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 12.5. Vector Narrowing Fixed-Point Clip Instructions
+  // Destination and Op1 EEW=SEW and EMUL=LMUL. Op2 EEW=2*SEW and EMUL=2*LMUL
+  case RISCV::VNCLIPU_WI:
+  case RISCV::VNCLIPU_WV:
+  case RISCV::VNCLIPU_WX:
+  case RISCV::VNCLIP_WI:
+  case RISCV::VNCLIP_WV:
+  case RISCV::VNCLIP_WX: {
+    bool TwoTimes = !IsMODef && IsOp1;
+    unsigned Log2EEW = TwoTimes ? MILog2SEW + 1 : MILog2SEW;
+    RISCVII::VLMUL EMUL = TwoTimes ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    return OperandInfo(EMUL, Log2EEW);
+  }
+  // 13. Vector Floating-Point Instructions
+  // 13.2. Vector Single-Width Floating-Point Add/Subtract Instructions
+  // EEW=SEW. EMUL=LMUL.
+  case RISCV::VFADD_VF:
+  case RISCV::VFADD_VV:
+  case RISCV::VFSUB_VF:
+  case RISCV::VFSUB_VV:
+  case RISCV::VFRSUB_VF:
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 13.3. Vector Widening Floating-Point Add/Subtract Instructions
+  // Dest EEW=2*SEW and EMUL=2*LMUL. Source EEW=SEW and EMUL=LMUL.
+  case RISCV::VFWADD_VV:
+  case RISCV::VFWADD_VF:
+  case RISCV::VFWSUB_VV:
+  case RISCV::VFWSUB_VF: {
+    unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
+    RISCVII::VLMUL EMUL = IsMODef ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    return OperandInfo(EMUL, Log2EEW);
+  }
+  // Dest and Op1 EEW=2*SEW and EMUL=2*LMUL. Op2 EEW=SEW and EMUL=LMUL.
+  case RISCV::VFWADD_WF:
+  case RISCV::VFWADD_WV:
+  case RISCV::VFWSUB_WF:
+  case RISCV::VFWSUB_WV: {
+    bool TwoTimes = IsMODef || IsOp1;
+    unsigned Log2EEW = TwoTimes ? MILog2SEW + 1 : MILog2SEW;
+    RISCVII::VLMUL EMUL = TwoTimes ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    return OperandInfo(EMUL, Log2EEW);
+  }
+  // 13.4. Vector Single-Width Floating-Point Multiply/Divide Instructions
+  // EEW=SEW. EMUL=LMUL.
+  case RISCV::VFMUL_VF:
+  case RISCV::VFMUL_VV:
+  case RISCV::VFDIV_VF:
+  case RISCV::VFDIV_VV:
+  case RISCV::VFRDIV_VF:
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 13.5. Vector Widening Floating-Point Multiply
+  case RISCV::VFWMUL_VF:
+  case RISCV::VFWMUL_VV:
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 13.6. Vector Single-Width Floating-Point Fused Multiply-Add Instructions
+  // EEW=SEW. EMUL=LMUL.
+  // TODO: FMA instructions reads 3 registers but MC layer only reads 2
+  // registers since its missing that the output operand should be part of the
+  // input operand list.
+  case RISCV::VFMACC_VF:
+  case RISCV::VFMACC_VV:
+  case RISCV::VFNMACC_VF:
+  case RISCV::VFNMACC_VV:
+  case RISCV::VFMSAC_VF:
+  case RISCV::VFMSAC_VV:
+  case RISCV::VFNMSAC_VF:
+  case RISCV::VFNMSAC_VV:
+  case RISCV::VFMADD_VF:
+  case RISCV::VFMADD_VV:
+  case RISCV::VFNMADD_VF:
+  case RISCV::VFNMADD_VV:
+  case RISCV::VFMSUB_VF:
+  case RISCV::VFMSUB_VV:
+  case RISCV::VFNMSUB_VF:
+  case RISCV::VFNMSUB_VV:
+    return OperandInfo(OperandInfo::State::Unknown);
+
+  // 13.7. Vector Widening Floating-Point Fused Multiply-Add Instructions
+  // Dest EEW=2*SEW and EMUL=2*LMUL. Source EEW=SEW EMUL=LMUL.
+  case RISCV::VFWMACC_VF:
+  case RISCV::VFWMACC_VV:
+  case RISCV::VFWNMACC_VF:
+  case RISCV::VFWNMACC_VV:
+  case RISCV::VFWMSAC_VF:
+  case RISCV::VFWMSAC_VV:
+  case RISCV::VFWNMSAC_VF:
+  case RISCV::VFWNMSAC_VV: {
+    // Operand 0 is destination as a def and Operand 1 is destination as a use
+    // due to SSA.
+    bool TwoTimes = IsMODef || IsOp1;
+    unsigned Log2EEW = TwoTimes ? MILog2SEW + 1 : MILog2SEW;
+    RISCVII::VLMUL EMUL = TwoTimes ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    return OperandInfo(EMUL, Log2EEW);
+  }
+  // 13.8. Vector Floating-Point Square-Root Instruction
+  // 13.9. Vector Floating-Point Reciprocal Square-Root Estimate Instruction
+  // 13.10. Vector Floating-Point Reciprocal Estimate Instruction
+  // 13.11. Vector Floating-Point MIN/MAX Instructions
+  // 13.12. Vector Floating-Point Sign-Injection Instructions
+  // 13.14. Vector Floating-Point Classify Instruction
+  // 13.16. Vector Floating-Point Move Instruction
+  // 13.17. Single-Width Floating-Point/Integer Type-Convert Instructions
+  // EEW=SEW. EMUL=LMUL.
+  case RISCV::VFSQRT_V:
+  case RISCV::VFRSQRT7_V:
+  case RISCV::VFREC7_V:
+  case RISCV::VFMIN_VF:
+  case RISCV::VFMIN_VV:
+  case RISCV::VFMAX_VF:
+  case RISCV::VFMAX_VV:
+  case RISCV::VFSGNJ_VF:
+  case RISCV::VFSGNJ_VV:
+  case RISCV::VFSGNJN_VV:
+  case RISCV::VFSGNJN_VF:
+  case RISCV::VFSGNJX_VF:
+  case RISCV::VFSGNJX_VV:
+  case RISCV::VFCLASS_V:
+  case RISCV::VFMV_V_F:
+  case RISCV::VFCVT_XU_F_V:
+  case RISCV::VFCVT_X_F_V:
+  case RISCV::VFCVT_RTZ_XU_F_V:
+  case RISCV::VFCVT_RTZ_X_F_V:
+  case RISCV::VFCVT_F_XU_V:
+  case RISCV::VFCVT_F_X_V:
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 13.13. Vector Floating-Point Compare Instructions
+  // Dest EEW=1 and EMUL=(EEW/SEW)*LMUL. Source EEW=SEW EMUL=LMUL.
+  case RISCV::VMFEQ_VF:
+  case RISCV::VMFEQ_VV:
+  case RISCV::VMFNE_VF:
+  case RISCV::VMFNE_VV:
+  case RISCV::VMFLT_VF:
+  case RISCV::VMFLT_VV:
+  case RISCV::VMFLE_VF:
+  case RISCV::VMFLE_VV:
+  case RISCV::VMFGT_VF:
+  case RISCV::VMFGE_VF:
+    if (IsMODef)
+      return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 13.15. Vector Floating-Point Merge Instruction
+  // EEW=SEW and EMUL=LMUL, except the mask operand has EEW=1 and EMUL=
+  // (EEW/SEW)*LMUL.
+  case RISCV::VFMERGE_VFM:
+    if (IsOp3)
+      return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 13.18. Widening Floating-Point/Integer Type-Convert Instructions
+  // Dest EEW=2*SEW and EMUL=2*LMUL. Source EEW=SEW and EMUL=LMUL.
+  case RISCV::VFWCVT_XU_F_V:
+  case RISCV::VFWCVT_X_F_V:
+  case RISCV::VFWCVT_RTZ_XU_F_V:
+  case RISCV::VFWCVT_RTZ_X_F_V:
+  case RISCV::VFWCVT_F_XU_V:
+  case RISCV::VFWCVT_F_X_V:
+  case RISCV::VFWCVT_F_F_V: {
+    unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
+    RISCVII::VLMUL EMUL = IsMODef ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    return OperandInfo(EMUL, Log2EEW);
+  }
+  // 13.19. Narrowing Floating-Point/Integer Type-Convert Instructions
+  // EMUL=LMUL. Dest EEW=SEW/2. Source EEW=SEW EMUL=LMUL.
+  case RISCV::VFNCVT_XU_F_W:
+  case RISCV::VFNCVT_X_F_W:
+  case RISCV::VFNCVT_RTZ_XU_F_W:
+  case RISCV::VFNCVT_RTZ_X_F_W:
+  case RISCV::VFNCVT_F_XU_W:
+  case RISCV::VFNCVT_F_X_W:
+  case RISCV::VFNCVT_F_F_W:
+  case RISCV::VFNCVT_ROD_F_F_W: {
+    unsigned Log2EEW = IsMODef ? MILog2SEW - 1 : MILog2SEW;
+    RISCVII::VLMUL EMUL = IsMODef ? halfVLMUL(MIVLMul) : MIVLMul;
+    return OperandInfo(EMUL, Log2EEW);
+  }
+  // 14. Vector Reduction Operations
+  // 14.1. Vector Single-Width Integer Reduction Instructions
+  // We need to return Unknown since only element 0 of reduction is valid but it
+  // was generated by reducing over all of the input elements. There are 3
+  // vector sources for reductions. One for scalar, one for tail value, and one
+  // for the elements to reduce over. Only the one with the elements to reduce
+  // over obeys VL. The other two only read element 0 from the register.
+  case RISCV::VREDAND_VS:
+  case RISCV::VREDMAX_VS:
+  case RISCV::VREDMAXU_VS:
+  case RISCV::VREDMIN_VS:
+  case RISCV::VREDMINU_VS:
+  case RISCV::VREDOR_VS:
+  case RISCV::VREDSUM_VS:
+  case RISCV::VREDXOR_VS:
+    return OperandInfo(OperandInfo::State::Unknown);
+
+  // 14.2. Vector Widening Integer Reduction Instructions
+  // Dest EEW=2*SEW and EMUL=2*LMUL. Source EEW=SEW EMUL=LMUL. Source is zero
+  // extended to 2*SEW in order to generate 2*SEW Dest.
+  case RISCV::VWREDSUM_VS:
+  case RISCV::VWREDSUMU_VS: {
+    unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
+    RISCVII::VLMUL EMUL = IsMODef ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    return OperandInfo(EMUL, Log2EEW);
+  }
+  // 14.3. Vector Single-Width Floating-Point Reduction Instructions
+  // EMUL=LMUL. EEW=SEW.
+  case RISCV::VFREDMAX_VS:
+  case RISCV::VFREDMIN_VS:
+  case RISCV::VFREDOSUM_VS:
+  case RISCV::VFREDUSUM_VS:
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 14.4. Vector Widening Floating-Point Reduction Instructions
+  // Source EEW=SEW and EMUL=LMUL. Dest EEW=2*SEW and EMUL=2*LMUL.
+  case RISCV::VFWREDOSUM_VS:
+  case RISCV::VFWREDUSUM_VS: {
+    unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
+    RISCVII::VLMUL EMUL = IsMODef ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    return OperandInfo(EMUL, Log2EEW);
+  }
+
+  // 15. Vector Mask Instructions
+  // 15.2. Vector count population in mask vcpop.m
+  // 15.3. vfirst find-first-set mask bit
+  // 15.4. vmsbf.m set-before-first mask bit
+  // 15.6. vmsof.m set-only-first mask bit
+  // EEW=1 and EMUL= (EEW/SEW)*LMUL
+  case RISCV::VMAND_MM:
+  case RISCV::VMNAND_MM:
+  case RISCV::VMANDN_MM:
+  case RISCV::VMXOR_MM:
+  case RISCV::VMOR_MM:
+  case RISCV::VMNOR_MM:
+  case RISCV::VMORN_MM:
+  case RISCV::VMXNOR_MM:
+  case RISCV::VCPOP_M:
+  case RISCV::VFIRST_M:
+  case RISCV::VMSBF_M:
+  case RISCV::VMSIF_M:
+  case RISCV::VMSOF_M: {
+    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
+  }
+  // 15.8. Vector Iota Instruction
+  // Dest and Op1 EEW=SEW and EMUL=LMUL. Op2 EEW=1 and EMUL(EEW/SEW)*LMUL.
+  case RISCV::VIOTA_M: {
+    bool IsDefOrOp1 = IsMODef || IsOp1;
+    unsigned Log2EEW = IsDefOrOp1 ? 0 : MILog2SEW;
+    if (IsDefOrOp1)
+      return OperandInfo(MIVLMul, Log2EEW);
+    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(MILog2SEW, MI), Log2EEW);
+  }
+  // 15.9. Vector Element Index Instruction
+  // Dest EEW=SEW EMUL=LMUL. Mask Operand EEW=1 and EMUL(EEW/SEW)*LMUL.
+  case RISCV::VID_V: {
+    unsigned Log2EEW = IsMODef ? MILog2SEW : 0;
+    if (IsMODef)
+      return OperandInfo(MIVLMul, Log2EEW);
+    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(Log2EEW, MI), Log2EEW);
+  }
+  // 16. Vector Permutation Instructions
+  // 16.1. Integer Scalar Move Instructions
+  // 16.2. Floating-Point Scalar Move Instructions
+  // EMUL=LMUL. EEW=SEW.
+  case RISCV::VMV_X_S:
+  case RISCV::VMV_S_X:
+  case RISCV::VFMV_F_S:
+  case RISCV::VFMV_S_F:
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 16.3. Vector Slide Instructions
+  // EMUL=LMUL. EEW=SEW.
+  case RISCV::VSLIDEUP_VI:
+  case RISCV::VSLIDEUP_VX:
+  case RISCV::VSLIDEDOWN_VI:
+  case RISCV::VSLIDEDOWN_VX:
+  case RISCV::VSLIDE1UP_VX:
+  case RISCV::VFSLIDE1UP_VF:
+  case RISCV::VSLIDE1DOWN_VX:
+  case RISCV::VFSLIDE1DOWN_VF:
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 16.4. Vector Register Gather Instructions
+  // EMUL=LMUL. EEW=SEW. For mask operand, EMUL=1 and EEW=1.
+  case RISCV::VRGATHER_VI:
+  case RISCV::VRGATHER_VV:
+  case RISCV::VRGATHER_VX:
+    return OperandInfo(MIVLMul, MILog2SEW);
+  // Destination EMUL=LMUL and EEW=SEW. Op2 EEW=SEW and EMUL=LMUL. Op1 EEW=16
+  // and EMUL=(16/SEW)*LMUL.
+  case RISCV::VRGATHEREI16_VV: {
+    if (IsMODef || IsOp2)
+      return OperandInfo(MIVLMul, MILog2SEW);
+    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(4, MI), 4);
+  }
+  // 16.5. Vector Compress Instruction
+  // EMUL=LMUL. EEW=SEW.
+  case RISCV::VCOMPRESS_VM:
+    return OperandInfo(MIVLMul, MILog2SEW);
+
+  // 16.6. Whole Vector Register Move
+  case RISCV::VMV1R_V:
+  case RISCV::VMV2R_V:
+  case RISCV::VMV4R_V:
+  case RISCV::VMV8R_V:
+    llvm_unreachable("These instructions don't have pseudo versions so they "
+                     "don't have an SEW operand.");
+
+  default:
+    return OperandInfo(OperandInfo::State::Unknown);
+  }
+}
+
+/// Return true if this optimization should consider MI for VL reduction. This
+/// white-list approach simplifies this optimization for instructions that may
+/// have more complex semantics with relation to how it uses VL.
+static bool isSupportedInstr(const MachineInstr &MI) {
+  const RISCVVPseudosTable::PseudoInfo *RVV =
+      RISCVVPseudosTable::getPseudoInfo(MI.getOpcode());
+
+  if (!RVV)
+    return false;
+
+  switch (RVV->BaseInstr) {
+  case RISCV::VADD_VI:
+  case RISCV::VADD_VV:
+  case RISCV::VADD_VX:
+  case RISCV::VMUL_VV:
+  case RISCV::VMUL_VX:
+  case RISCV::VSLL_VI:
+  case RISCV::VSEXT_VF2:
+  case RISCV::VSEXT_VF4:
+  case RISCV::VSEXT_VF8:
+  case RISCV::VZEXT_VF2:
+  case RISCV::VZEXT_VF4:
+  case RISCV::VZEXT_VF8:
+  case RISCV::VMV_V_I:
+  case RISCV::VMV_V_X:
+  case RISCV::VNSRL_WI:
+  case RISCV::VWADD_VV:
+  case RISCV::VWADDU_VV:
+  case RISCV::VWMACC_VX:
+  case RISCV::VWMACCU_VX:
+  case RISCV::VWSLL_VI:
+    return true;
+  }
+
+  return false;
+}
+
+/// Return true if MO is a vector operand but is used as a scalar operand.
+static bool isVectorOpUsedAsScalarOp(MachineOperand &MO) {
+  MachineInstr *MI = MO.getParent();
+  const RISCVVPseudosTable::PseudoInfo *RVV =
+      RISCVVPseudosTable::getPseudoInfo(MI->getOpcode());
+
+  if (!RVV)
+    return false;
+
+  switch (RVV->BaseInstr) {
+  // Reductions only use vs1[0] of vs1
+  case RISCV::VREDAND_VS:
+  case RISCV::VREDMAX_VS:
+  case RISCV::VREDMAXU_VS:
+  case RISCV::VREDMIN_VS:
+  case RISCV::VREDMINU_VS:
+  case RISCV::VREDOR_VS:
+  case RISCV::VREDSUM_VS:
+  case RISCV::VREDXOR_VS:
+  case RISCV::VWREDSUM_VS:
+  case RISCV::VWREDSUMU_VS:
+  case RISCV::VFREDMAX_VS:
+  case RISCV::VFREDMIN_VS:
+  case RISCV::VFREDOSUM_VS:
+  case RISCV::VFREDUSUM_VS:
+  case RISCV::VFWREDOSUM_VS:
+  case RISCV::VFWREDUSUM_VS: {
+    return isOpN(MO, 2);
+  }
+  default:
+    return false;
+  }
+}
+
+static bool safeToPropgateVL(const MachineInstr &MI) {
+  const RISCVVPseudosTable::PseudoInfo *RVV =
+      RISCVVPseudosTable::getPseudoInfo(MI.getOpcode());
+  if (!RVV)
+    return false;
+
+  switch (RVV->BaseInstr) {
+  // vslidedown instructions may use the higher part of the input operand beyond
+  // the VL.
+  case RISCV::VSLIDEDOWN_VI:
+  case RISCV::VSLIDEDOWN_VX:
+  case RISCV::VSLIDE1DOWN_VX:
+  case RISCV::VFSLIDE1DOWN_VF:
+
+  // vrgather instructions may index beyond the VL.
+  case RISCV::VRGATHER_VI:
+  case RISCV::VRGATHER_VV:
+  case RISCV::VRGATHER_VX:
+  case RISCV::VRGATHEREI16_VV:
+    return false;
+
+  default:
+    return true;
+  }
+}
+
+bool RISCVVLOptimizer::isCandidate(const MachineInstr &MI) const {
+
+  LLVM_DEBUG(
+      dbgs() << "Check whether the instruction is a candidate for reducing VL:"
+             << MI << "\n");
+
+  const MCInstrDesc &Desc = MI.getDesc();
+  if (!RISCVII::hasVLOp(Desc.TSFlags) || !RISCVII::hasSEWOp(Desc.TSFlags)) {
+    LLVM_DEBUG(dbgs() << "  Not a candidate due to lack of vl op or sew op\n");
+    return false;
+  }
+
+  if (MI.getNumDefs() != 1) {
+    LLVM_DEBUG(dbgs() << " Not a candidate due to it def more than one\n");
+    return false;
+  }
+  unsigned VLOpNum = RISCVII::getVLOpNum(Desc);
+  const MachineOperand &VLOp = MI.getOperand(VLOpNum);
+  if (!VLOp.isImm() || VLOp.getImm() != RISCV::VLMaxSentinel) {
+    LLVM_DEBUG(dbgs() << "  Not a candidate due to VL is not VLMAX\n");
+    return false;
+  }
+
+  // Some instructions that produce vectors have semantics that make it more
+  // difficult to determine whether the VL can be reduced. For example, some
+  // instructions, such as reductions, may write lanes past VL to a scalar
+  // register. Other instructions, such as some loads or stores, may write
+  // lower lanes using data from higher lanes. There may be other complex
+  // semantics not mentioned here that make it hard to determine whether
+  // the VL can be optimized. As a result, a white-list of supported
+  // instructions is used. Over time, more instructions cam be supported
+  // upon careful examination of their semantics under the logic in this
+  // optimization.
+  // TODO: Use a better approach than a white-list, such as adding
+  // properties to instructions using something like TSFlags.
+  if (!isSupportedInstr(MI)) {
+    LLVM_DEBUG(dbgs() << "  Not a candidate due to unsupported instruction\n");
+    return false;
+  }
+
+  return true;
+}
+
+bool RISCVVLOptimizer::tryReduceVL(MachineInstr &OrigMI) {
+  SetVector<MachineInstr *> Worklist;
+  Worklist.insert(&OrigMI);
+
+  bool MadeChange = false;
+  while (!Worklist.empty()) {
+    MachineInstr &MI = *Worklist.pop_back_val();
+    LLVM_DEBUG(dbgs() << "Try reduce VL for " << MI << "\n");
+    std::optional<Register> CommonVL;
+    bool CanReduceVL = true;
+    for (auto &UserOp : MRI->use_operands(MI.getOperand(0).getReg())) {
+      const MachineInstr &UserMI = *UserOp.getParent();
+      LLVM_DEBUG(dbgs() << "  Check user: " << UserMI << "\n");
+
+      // Instructions like reductions may use a vector register as a scalar
+      // register. In this case, we should treat it like a scalar register which
+      // does not impact the decision on whether to optimize VL.
+      if (isVectorOpUsedAsScalarOp(UserOp)) {
+        [[maybe_unused]] Register R = UserOp.getReg();
+        [[maybe_unused]] const TargetRegisterClass *RC = MRI->getRegClass(R);
+        assert(RISCV::VRRegClass.hasSubClassEq(RC) &&
+               "Expect LMUL 1 register class for vector as scalar operands!");
+        LLVM_DEBUG(dbgs() << "    Use this operand as a scalar operand\n");
+        continue;
+      }
+
+      if (!safeToPropgateVL(UserMI)) {
+        LLVM_DEBUG(dbgs() << "    Abort due to used by unsafe instruction\n");
+        CanReduceVL = false;
+        break;
+      }
+
+      // Tied operands might pass through.
+      if (UserOp.isTied()) {
+        LLVM_DEBUG(dbgs() << "    Abort due to user use it as tied operand\n");
+        CanReduceVL = false;
+        break;
+      }
+
+      const MCInstrDesc &Desc = UserMI.getDesc();
+      if (!RISCVII::hasVLOp(Desc.TSFlags) || !RISCVII::hasSEWOp(Desc.TSFlags)) {
+        LLVM_DEBUG(dbgs() << "    Abort due to lack of VL or SEW, assume that"
+                             " use VLMAX.\n");
+        CanReduceVL = false;
+        break;
+      }
+
+      unsigned VLOpNum = RISCVII::getVLOpNum(Desc);
+      const MachineOperand &VLOp = UserMI.getOperand(VLOpNum);
+      // Looking for a register VL that isn't X0.
+      if (!VLOp.isReg() || VLOp.getReg() == RISCV::X0) {
+        LLVM_DEBUG(dbgs() << "    Abort due to user use X0 as VL.\n");
+        CanReduceVL = false;
+        break;
+      }
+
+      if (!CommonVL) {
+        CommonVL = VLOp.getReg();
+      } else if (*CommonVL != VLOp.getReg()) {
+        LLVM_DEBUG(dbgs() << "    Abort due to users have different VL!\n");
+        CanReduceVL = false;
+        break;
+      }
+
+      // The SEW and LMUL of destination and source registers need to match.
+
+      // If the produced Dest is not a vector register, then it has no EEW or
+      // EMUL, so there is no need to check that producer and consumer LMUL and
+      // SEW match. We've already checked above that UserOp is a vector
+      // register.
+      if (!isVectorRegClass(MI.getOperand(0).getReg(), MRI)) {
+        LLVM_DEBUG(dbgs() << "    Abort due to register class mismatch between "
+                             "USE and DEF\n");
+        continue;
+      }
+
+      OperandInfo ConsumerInfo = getOperandInfo(UserMI, UserOp, MRI);
+      OperandInfo ProducerInfo = getOperandInfo(MI, MI.getOperand(0), MRI);
+      if (ConsumerInfo.isUnknown() || ProducerInfo.isUnknown() ||
+          !OperandInfo::EMULAndEEWAreEqual(ConsumerInfo, ProducerInfo)) {
+        LLVM_DEBUG(dbgs() << "    Abort due to incompatible or unknown "
+                             "information for EMUL or EEW.\n");
+        LLVM_DEBUG(dbgs() << "      ConsumerInfo is: " << ConsumerInfo << "\n");
+        LLVM_DEBUG(dbgs() << "      ProducerInfo is: " << ProducerInfo << "\n");
+        CanReduceVL = false;
+        break;
+      }
+    }
+
+    if (!CanReduceVL || !CommonVL)
+      continue;
+
+    if (!CommonVL->isVirtual()) {
+      LLVM_DEBUG(
+          dbgs() << "    Abort due to new VL is not virtual register.\n");
+      continue;
+    }
+
+    const MachineInstr *VLMI = MRI->getVRegDef(*CommonVL);
+    if (!MDT->dominates(VLMI, &MI))
+      continue;
+
+    // All our checks passed. We can reduce VL.
+    unsigned VLOpNum = RISCVII::getVLOpNum(MI.getDesc());
+    MachineOperand &VLOp = MI.getOperand(VLOpNum);
+    VLOp.ChangeToRegister(*CommonVL, false);
+    MadeChange = true;
+
+    // Now add all inputs to this instruction to the worklist.
+    for (auto &Op : MI.operands()) {
+      if (!Op.isReg() || !Op.isUse() || !Op.getReg().isVirtual())
+        continue;
+
+      if (!isVectorRegClass(Op.getReg(), MRI))
+        continue;
+
+      MachineInstr *DefMI = MRI->getVRegDef(Op.getReg());
+
+      if (!isCandidate(*DefMI))
+        continue;
+
+      Worklist.insert(DefMI);
+    }
+  }
+
+  return MadeChange;
+}
+
+bool RISCVVLOptimizer::runOnMachineFunction(MachineFunction &MF) {
+  if (skipFunction(MF.getFunction()))
+    return false;
+
+  MRI = &MF.getRegInfo();
+  MDT = &getAnalysis<MachineDominatorTreeWrapperPass>().getDomTree();
+
+  const RISCVSubtarget &ST = MF.getSubtarget<RISCVSubtarget>();
+  if (!ST.hasVInstructions())
+    return false;
+
+  bool MadeChange = false;
+  for (MachineBasicBlock &MBB : MF) {
+    // Visit instructions in reverse order.
+    for (auto &MI : make_range(MBB.rbegin(), MBB.rend())) {
+      if (!isCandidate(MI))
+        continue;
+
+      MadeChange |= tryReduceVL(MI);
+    }
+  }
+
+  return MadeChange;
+}
diff --git a/llvm/test/CodeGen/RISCV/O3-pipeline.ll b/llvm/test/CodeGen/RISCV/O3-pipeline.ll
index 5d14d14d216244..4d24d3333f0467 100644
--- a/llvm/test/CodeGen/RISCV/O3-pipeline.ll
+++ b/llvm/test/CodeGen/RISCV/O3-pipeline.ll
@@ -118,6 +118,8 @@
 ; RV64-NEXT:        RISC-V Optimize W Instructions
 ; CHECK-NEXT:       RISC-V Pre-RA pseudo instruction expansion pass
 ; CHECK-NEXT:       RISC-V Merge Base Offset
+; CHECK-NEXT:       MachineDominator Tree Construction
+; CHECK-NEXT:       RISC-V VL Optimizer
 ; CHECK-NEXT:       RISC-V Insert Read/Write CSR Pass
 ; CHECK-NEXT:       RISC-V Insert Write VXRM Pass
 ; CHECK-NEXT:       RISC-V Landing Pad Setup
@@ -128,7 +130,6 @@
 ; CHECK-NEXT:       Live Variable Analysis
 ; CHECK-NEXT:       Eliminate PHI nodes for register allocation
 ; CHECK-NEXT:       Two-Address instruction pass
-; CHECK-NEXT:       MachineDominator Tree Construction
 ; CHECK-NEXT:       Slot index numbering
 ; CHECK-NEXT:       Live Interval Analysis
 ; CHECK-NEXT:       Register Coalescer
diff --git a/llvm/test/CodeGen/RISCV/rvv/narrow-shift-extend.ll b/llvm/test/CodeGen/RISCV/rvv/narrow-shift-extend.ll
index e47517abacb4d3..63212e7cd5e004 100644
--- a/llvm/test/CodeGen/RISCV/rvv/narrow-shift-extend.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/narrow-shift-extend.ll
@@ -10,10 +10,10 @@ declare <vscale x 4 x i32> @llvm.riscv.vloxei.nxv4i32.nxv4i64(
 define <vscale x 4 x i32> @test_vloxei(ptr %ptr, <vscale x 4 x i8> %offset, i64 %vl) {
 ; CHECK-LABEL: test_vloxei:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    vsetvli a2, zero, e64, m4, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
 ; CHECK-NEXT:    vzext.vf8 v12, v8
 ; CHECK-NEXT:    vsll.vi v12, v12, 4
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vloxei64.v v8, (a0), v12
 ; CHECK-NEXT:    ret
 entry:
@@ -30,10 +30,10 @@ entry:
 define <vscale x 4 x i32> @test_vloxei2(ptr %ptr, <vscale x 4 x i8> %offset, i64 %vl) {
 ; CHECK-LABEL: test_vloxei2:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    vsetvli a2, zero, e64, m4, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
 ; CHECK-NEXT:    vzext.vf8 v12, v8
 ; CHECK-NEXT:    vsll.vi v12, v12, 14
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vloxei64.v v8, (a0), v12
 ; CHECK-NEXT:    ret
 entry:
@@ -50,10 +50,10 @@ entry:
 define <vscale x 4 x i32> @test_vloxei3(ptr %ptr, <vscale x 4 x i8> %offset, i64 %vl) {
 ; CHECK-LABEL: test_vloxei3:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    vsetvli a2, zero, e64, m4, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
 ; CHECK-NEXT:    vzext.vf8 v12, v8
 ; CHECK-NEXT:    vsll.vi v12, v12, 26
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vloxei64.v v8, (a0), v12
 ; CHECK-NEXT:    ret
 entry:
@@ -74,9 +74,8 @@ define <vscale x 4 x i32> @test_vloxei4(ptr %ptr, <vscale x 4 x i8> %offset, <vs
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
 ; CHECK-NEXT:    vzext.vf8 v12, v8, v0.t
-; CHECK-NEXT:    vsetvli a2, zero, e64, m4, ta, ma
 ; CHECK-NEXT:    vsll.vi v12, v12, 4
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vloxei64.v v8, (a0), v12
 ; CHECK-NEXT:    ret
 entry:
@@ -100,10 +99,10 @@ declare <vscale x 4 x i32> @llvm.riscv.vloxei.nxv4i32.nxv4i16(
 define <vscale x 4 x i32> @test_vloxei5(ptr %ptr, <vscale x 4 x i8> %offset, i64 %vl) {
 ; CHECK-LABEL: test_vloxei5:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e16, m1, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v9, v8
 ; CHECK-NEXT:    vsll.vi v10, v9, 12
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vloxei16.v v8, (a0), v10
 ; CHECK-NEXT:    ret
 entry:
@@ -123,10 +122,10 @@ define <vscale x 4 x i32> @test_vloxei6(ptr %ptr, <vscale x 4 x i7> %offset, i64
 ; CHECK-NEXT:    li a2, 127
 ; CHECK-NEXT:    vsetvli a3, zero, e8, mf2, ta, ma
 ; CHECK-NEXT:    vand.vx v8, v8, a2
-; CHECK-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
 ; CHECK-NEXT:    vzext.vf8 v12, v8
 ; CHECK-NEXT:    vsll.vi v12, v12, 4
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vloxei64.v v8, (a0), v12
 ; CHECK-NEXT:    ret
 entry:
@@ -146,8 +145,9 @@ define <vscale x 4 x i32> @test_vloxei7(ptr %ptr, <vscale x 4 x i1> %offset, i64
 ; CHECK-NEXT:    vsetvli a2, zero, e64, m4, ta, ma
 ; CHECK-NEXT:    vmv.v.i v8, 0
 ; CHECK-NEXT:    vmerge.vim v8, v8, 1, v0
+; CHECK-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
 ; CHECK-NEXT:    vsll.vi v12, v8, 2
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vloxei64.v v8, (a0), v12
 ; CHECK-NEXT:    ret
 entry:
@@ -172,10 +172,10 @@ declare <vscale x 4 x i32> @llvm.riscv.vloxei.mask.nxv4i32.nxv4i64(
 define <vscale x 4 x i32> @test_vloxei_mask(ptr %ptr, <vscale x 4 x i8> %offset, <vscale x 4 x i1> %m, i64 %vl) {
 ; CHECK-LABEL: test_vloxei_mask:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    vsetvli a2, zero, e64, m4, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
 ; CHECK-NEXT:    vzext.vf8 v12, v8
 ; CHECK-NEXT:    vsll.vi v12, v12, 4
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vloxei64.v v8, (a0), v12, v0.t
 ; CHECK-NEXT:    ret
 entry:
@@ -199,10 +199,10 @@ declare <vscale x 4 x i32> @llvm.riscv.vluxei.nxv4i32.nxv4i64(
 define <vscale x 4 x i32> @test_vluxei(ptr %ptr, <vscale x 4 x i8> %offset, i64 %vl) {
 ; CHECK-LABEL: test_vluxei:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    vsetvli a2, zero, e64, m4, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
 ; CHECK-NEXT:    vzext.vf8 v12, v8
 ; CHECK-NEXT:    vsll.vi v12, v12, 4
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vluxei64.v v8, (a0), v12
 ; CHECK-NEXT:    ret
 entry:
@@ -227,10 +227,10 @@ declare <vscale x 4 x i32> @llvm.riscv.vluxei.mask.nxv4i32.nxv4i64(
 define <vscale x 4 x i32> @test_vluxei_mask(ptr %ptr, <vscale x 4 x i8> %offset, <vscale x 4 x i1> %m, i64 %vl) {
 ; CHECK-LABEL: test_vluxei_mask:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    vsetvli a2, zero, e64, m4, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
 ; CHECK-NEXT:    vzext.vf8 v12, v8
 ; CHECK-NEXT:    vsll.vi v12, v12, 4
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vluxei64.v v8, (a0), v12, v0.t
 ; CHECK-NEXT:    ret
 entry:
@@ -254,10 +254,10 @@ declare void @llvm.riscv.vsoxei.nxv4i32.nxv4i64(
 define void @test_vsoxei(<vscale x 4 x i32> %val, ptr %ptr, <vscale x 4 x i8> %offset, i64 %vl) {
 ; CHECK-LABEL: test_vsoxei:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    vsetvli a2, zero, e64, m4, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
 ; CHECK-NEXT:    vzext.vf8 v12, v10
 ; CHECK-NEXT:    vsll.vi v12, v12, 4
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vsoxei64.v v8, (a0), v12
 ; CHECK-NEXT:    ret
 entry:
@@ -281,10 +281,10 @@ declare void @llvm.riscv.vsoxei.mask.nxv4i32.nxv4i64(
 define void @test_vsoxei_mask(<vscale x 4 x i32> %val, ptr %ptr, <vscale x 4 x i8> %offset, <vscale x 4 x i1> %m, i64 %vl) {
 ; CHECK-LABEL: test_vsoxei_mask:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    vsetvli a2, zero, e64, m4, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
 ; CHECK-NEXT:    vzext.vf8 v12, v10
 ; CHECK-NEXT:    vsll.vi v12, v12, 4
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vsoxei64.v v8, (a0), v12, v0.t
 ; CHECK-NEXT:    ret
 entry:
@@ -308,10 +308,10 @@ declare void @llvm.riscv.vsuxei.nxv4i32.nxv4i64(
 define void @test_vsuxei(<vscale x 4 x i32> %val, ptr %ptr, <vscale x 4 x i8> %offset, i64 %vl) {
 ; CHECK-LABEL: test_vsuxei:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    vsetvli a2, zero, e64, m4, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
 ; CHECK-NEXT:    vzext.vf8 v12, v10
 ; CHECK-NEXT:    vsll.vi v12, v12, 4
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vsuxei64.v v8, (a0), v12
 ; CHECK-NEXT:    ret
 entry:
@@ -335,10 +335,10 @@ declare void @llvm.riscv.vsuxei.mask.nxv4i32.nxv4i64(
 define void @test_vsuxei_mask(<vscale x 4 x i32> %val, ptr %ptr, <vscale x 4 x i8> %offset, <vscale x 4 x i1> %m, i64 %vl) {
 ; CHECK-LABEL: test_vsuxei_mask:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    vsetvli a2, zero, e64, m4, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
 ; CHECK-NEXT:    vzext.vf8 v12, v10
 ; CHECK-NEXT:    vsll.vi v12, v12, 4
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vsuxei64.v v8, (a0), v12, v0.t
 ; CHECK-NEXT:    ret
 entry:
diff --git a/llvm/test/CodeGen/RISCV/rvv/setcc-int-vp.ll b/llvm/test/CodeGen/RISCV/rvv/setcc-int-vp.ll
index eb8c58d2d37790..073a0aecb8f732 100644
--- a/llvm/test/CodeGen/RISCV/rvv/setcc-int-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/setcc-int-vp.ll
@@ -184,9 +184,8 @@ define <vscale x 1 x i1> @icmp_uge_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1
 define <vscale x 1 x i1> @icmp_uge_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
 ; CHECK-LABEL: icmp_uge_vx_nxv1i8:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e8, mf8, ta, ma
-; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, a1, e8, mf8, ta, ma
+; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vmsleu.vv v0, v9, v8, v0.t
 ; CHECK-NEXT:    ret
   %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
@@ -348,9 +347,8 @@ define <vscale x 1 x i1> @icmp_sge_vv_nxv1i8(<vscale x 1 x i8> %va, <vscale x 1
 define <vscale x 1 x i1> @icmp_sge_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
 ; CHECK-LABEL: icmp_sge_vx_nxv1i8:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e8, mf8, ta, ma
-; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, a1, e8, mf8, ta, ma
+; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vmsle.vv v0, v9, v8, v0.t
 ; CHECK-NEXT:    ret
   %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
@@ -470,9 +468,8 @@ define <vscale x 1 x i1> @icmp_sle_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vsca
 define <vscale x 1 x i1> @icmp_sle_vx_swap_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
 ; CHECK-LABEL: icmp_sle_vx_swap_nxv1i8:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e8, mf8, ta, ma
-; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, a1, e8, mf8, ta, ma
+; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vmsle.vv v0, v9, v8, v0.t
 ; CHECK-NEXT:    ret
   %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
@@ -764,9 +761,8 @@ define <vscale x 8 x i1> @icmp_uge_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8
 define <vscale x 8 x i1> @icmp_uge_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; CHECK-LABEL: icmp_uge_vx_nxv8i8:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
-; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
+; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vmsleu.vv v0, v9, v8, v0.t
 ; CHECK-NEXT:    ret
   %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
@@ -928,9 +924,8 @@ define <vscale x 8 x i1> @icmp_sge_vv_nxv8i8(<vscale x 8 x i8> %va, <vscale x 8
 define <vscale x 8 x i1> @icmp_sge_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; CHECK-LABEL: icmp_sge_vx_nxv8i8:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
-; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
+; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vmsle.vv v0, v9, v8, v0.t
 ; CHECK-NEXT:    ret
   %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
@@ -1050,9 +1045,8 @@ define <vscale x 8 x i1> @icmp_sle_vx_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vsca
 define <vscale x 8 x i1> @icmp_sle_vx_swap_nxv8i8(<vscale x 8 x i8> %va, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; CHECK-LABEL: icmp_sle_vx_swap_nxv8i8:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
-; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
+; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vmsle.vv v0, v9, v8, v0.t
 ; CHECK-NEXT:    ret
   %elt.head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
@@ -1375,9 +1369,8 @@ define <vscale x 1 x i1> @icmp_uge_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x
 define <vscale x 1 x i1> @icmp_uge_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
 ; CHECK-LABEL: icmp_uge_vx_nxv1i32:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e32, mf2, ta, ma
-; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, a1, e32, mf2, ta, ma
+; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vmsleu.vv v0, v9, v8, v0.t
 ; CHECK-NEXT:    ret
   %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
@@ -1539,9 +1532,8 @@ define <vscale x 1 x i1> @icmp_sge_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x
 define <vscale x 1 x i1> @icmp_sge_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
 ; CHECK-LABEL: icmp_sge_vx_nxv1i32:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e32, mf2, ta, ma
-; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, a1, e32, mf2, ta, ma
+; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vmsle.vv v0, v9, v8, v0.t
 ; CHECK-NEXT:    ret
   %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
@@ -1661,9 +1653,8 @@ define <vscale x 1 x i1> @icmp_sle_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <v
 define <vscale x 1 x i1> @icmp_sle_vx_swap_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
 ; CHECK-LABEL: icmp_sle_vx_swap_nxv1i32:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e32, mf2, ta, ma
-; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, a1, e32, mf2, ta, ma
+; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vmsle.vv v0, v9, v8, v0.t
 ; CHECK-NEXT:    ret
   %elt.head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
@@ -1885,9 +1876,8 @@ define <vscale x 8 x i1> @icmp_uge_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x
 define <vscale x 8 x i1> @icmp_uge_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; CHECK-LABEL: icmp_uge_vx_nxv8i32:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
-; CHECK-NEXT:    vmv.v.x v16, a0
 ; CHECK-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; CHECK-NEXT:    vmv.v.x v16, a0
 ; CHECK-NEXT:    vmsleu.vv v12, v16, v8, v0.t
 ; CHECK-NEXT:    vmv1r.v v0, v12
 ; CHECK-NEXT:    ret
@@ -2064,9 +2054,8 @@ define <vscale x 8 x i1> @icmp_sge_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x
 define <vscale x 8 x i1> @icmp_sge_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; CHECK-LABEL: icmp_sge_vx_nxv8i32:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
-; CHECK-NEXT:    vmv.v.x v16, a0
 ; CHECK-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; CHECK-NEXT:    vmv.v.x v16, a0
 ; CHECK-NEXT:    vmsle.vv v12, v16, v8, v0.t
 ; CHECK-NEXT:    vmv1r.v v0, v12
 ; CHECK-NEXT:    ret
@@ -2197,9 +2186,8 @@ define <vscale x 8 x i1> @icmp_sle_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <v
 define <vscale x 8 x i1> @icmp_sle_vx_swap_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; CHECK-LABEL: icmp_sle_vx_swap_nxv8i32:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
-; CHECK-NEXT:    vmv.v.x v16, a0
 ; CHECK-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; CHECK-NEXT:    vmv.v.x v16, a0
 ; CHECK-NEXT:    vmsle.vv v12, v16, v8, v0.t
 ; CHECK-NEXT:    vmv1r.v v0, v12
 ; CHECK-NEXT:    ret
@@ -2633,9 +2621,8 @@ define <vscale x 1 x i1> @icmp_uge_vx_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <v
 ;
 ; RV64-LABEL: icmp_uge_vx_nxv1i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m1, ta, ma
-; RV64-NEXT:    vmv.v.x v9, a0
 ; RV64-NEXT:    vsetvli zero, a1, e64, m1, ta, ma
+; RV64-NEXT:    vmv.v.x v9, a0
 ; RV64-NEXT:    vmsleu.vv v0, v9, v8, v0.t
 ; RV64-NEXT:    ret
   %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
@@ -2881,9 +2868,8 @@ define <vscale x 1 x i1> @icmp_sge_vx_nxv1i64(<vscale x 1 x i64> %va, i64 %b, <v
 ;
 ; RV64-LABEL: icmp_sge_vx_nxv1i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m1, ta, ma
-; RV64-NEXT:    vmv.v.x v9, a0
 ; RV64-NEXT:    vsetvli zero, a1, e64, m1, ta, ma
+; RV64-NEXT:    vmv.v.x v9, a0
 ; RV64-NEXT:    vmsle.vv v0, v9, v8, v0.t
 ; RV64-NEXT:    ret
   %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
@@ -3073,9 +3059,8 @@ define <vscale x 1 x i1> @icmp_sle_vx_swap_nxv1i64(<vscale x 1 x i64> %va, i64 %
 ;
 ; RV64-LABEL: icmp_sle_vx_swap_nxv1i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m1, ta, ma
-; RV64-NEXT:    vmv.v.x v9, a0
 ; RV64-NEXT:    vsetvli zero, a1, e64, m1, ta, ma
+; RV64-NEXT:    vmv.v.x v9, a0
 ; RV64-NEXT:    vmsle.vv v0, v9, v8, v0.t
 ; RV64-NEXT:    ret
   %elt.head = insertelement <vscale x 1 x i64> poison, i64 %b, i32 0
@@ -3402,9 +3387,8 @@ define <vscale x 8 x i1> @icmp_uge_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <v
 ;
 ; RV64-LABEL: icmp_uge_vx_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
-; RV64-NEXT:    vmv.v.x v24, a0
 ; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vmv.v.x v24, a0
 ; RV64-NEXT:    vmsleu.vv v16, v24, v8, v0.t
 ; RV64-NEXT:    vmv1r.v v0, v16
 ; RV64-NEXT:    ret
@@ -3671,9 +3655,8 @@ define <vscale x 8 x i1> @icmp_sge_vx_nxv8i64(<vscale x 8 x i64> %va, i64 %b, <v
 ;
 ; RV64-LABEL: icmp_sge_vx_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
-; RV64-NEXT:    vmv.v.x v24, a0
 ; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vmv.v.x v24, a0
 ; RV64-NEXT:    vmsle.vv v16, v24, v8, v0.t
 ; RV64-NEXT:    vmv1r.v v0, v16
 ; RV64-NEXT:    ret
@@ -3879,9 +3862,8 @@ define <vscale x 8 x i1> @icmp_sle_vx_swap_nxv8i64(<vscale x 8 x i64> %va, i64 %
 ;
 ; RV64-LABEL: icmp_sle_vx_swap_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
-; RV64-NEXT:    vmv.v.x v24, a0
 ; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vmv.v.x v24, a0
 ; RV64-NEXT:    vmsle.vv v16, v24, v8, v0.t
 ; RV64-NEXT:    vmv1r.v v0, v16
 ; RV64-NEXT:    ret
diff --git a/llvm/test/CodeGen/RISCV/rvv/vdiv-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vdiv-vp.ll
index a4b7ca7f39768f..d276631c5883e8 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vdiv-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vdiv-vp.ll
@@ -12,9 +12,7 @@ define <vscale x 8 x i7> @vdiv_vx_nxv8i7(<vscale x 8 x i7> %a, i7 signext %b, <v
 ; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vsll.vi v8, v8, 1, v0.t
 ; CHECK-NEXT:    vsra.vi v8, v8, 1, v0.t
-; CHECK-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
-; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vsll.vi v9, v9, 1, v0.t
 ; CHECK-NEXT:    vsra.vi v9, v9, 1, v0.t
 ; CHECK-NEXT:    vdiv.vv v8, v8, v9, v0.t
diff --git a/llvm/test/CodeGen/RISCV/rvv/vdivu-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vdivu-vp.ll
index 67c3f9dbf2869a..7794e031d5c677 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vdivu-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vdivu-vp.ll
@@ -12,9 +12,7 @@ define <vscale x 8 x i7> @vdivu_vx_nxv8i7(<vscale x 8 x i7> %a, i7 signext %b, <
 ; CHECK-NEXT:    li a2, 127
 ; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vand.vx v8, v8, a2, v0.t
-; CHECK-NEXT:    vsetvli a3, zero, e8, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
-; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vand.vx v9, v9, a2, v0.t
 ; CHECK-NEXT:    vdivu.vv v8, v8, v9, v0.t
 ; CHECK-NEXT:    ret
diff --git a/llvm/test/CodeGen/RISCV/rvv/vfwmacc-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vfwmacc-vp.ll
index 80ada4670562d7..d4930bd2ae0396 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vfwmacc-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vfwmacc-vp.ll
@@ -143,9 +143,8 @@ define <vscale x 1 x float> @vfmacc_vf_nxv1f32(<vscale x 1 x half> %va, half %b,
 ; ZVFHMIN-LABEL: vfmacc_vf_nxv1f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, mf2, ta, ma
@@ -170,9 +169,8 @@ define <vscale x 1 x float> @vfmacc_vf_nxv1f32_commute(<vscale x 1 x half> %va,
 ; ZVFHMIN-LABEL: vfmacc_vf_nxv1f32_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v11, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v11, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v10, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v11, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, mf2, ta, ma
@@ -198,9 +196,8 @@ define <vscale x 1 x float> @vfmacc_vf_nxv1f32_unmasked(<vscale x 1 x half> %va,
 ; ZVFHMIN-LABEL: vfmacc_vf_nxv1f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, mf2, ta, ma
@@ -225,9 +222,8 @@ define <vscale x 1 x float> @vfmacc_vf_nxv1f32_tu(<vscale x 1 x half> %va, half
 ; ZVFHMIN-LABEL: vfmacc_vf_nxv1f32_tu:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, mf2, tu, mu
@@ -254,9 +250,8 @@ define <vscale x 1 x float> @vfmacc_vf_nxv1f32_commute_tu(<vscale x 1 x half> %v
 ; ZVFHMIN-LABEL: vfmacc_vf_nxv1f32_commute_tu:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, mf2, tu, mu
@@ -283,9 +278,8 @@ define <vscale x 1 x float> @vfmacc_vf_nxv1f32_unmasked_tu(<vscale x 1 x half> %
 ; ZVFHMIN-LABEL: vfmacc_vf_nxv1f32_unmasked_tu:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, mf2, tu, ma
@@ -362,9 +356,8 @@ define <vscale x 2 x float> @vfmacc_vf_nxv2f32(<vscale x 2 x half> %va, half %b,
 ; ZVFHMIN-LABEL: vfmacc_vf_nxv2f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m1, ta, ma
@@ -389,9 +382,8 @@ define <vscale x 2 x float> @vfmacc_vf_nxv2f32_unmasked(<vscale x 2 x half> %va,
 ; ZVFHMIN-LABEL: vfmacc_vf_nxv2f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m1, ta, ma
@@ -468,9 +460,8 @@ define <vscale x 4 x float> @vfmacc_vf_nxv4f32(<vscale x 4 x half> %va, half %b,
 ; ZVFHMIN-LABEL: vfmacc_vf_nxv4f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v14, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v12, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
@@ -495,9 +486,8 @@ define <vscale x 4 x float> @vfmacc_vf_nxv4f32_unmasked(<vscale x 4 x half> %va,
 ; ZVFHMIN-LABEL: vfmacc_vf_nxv4f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v14, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v12
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
@@ -574,9 +564,8 @@ define <vscale x 8 x float> @vfmacc_vf_nxv8f32(<vscale x 8 x half> %va, half %b,
 ; ZVFHMIN-LABEL: vfmacc_vf_nxv8f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v20, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v16, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
@@ -601,9 +590,8 @@ define <vscale x 8 x float> @vfmacc_vf_nxv8f32_unmasked(<vscale x 8 x half> %va,
 ; ZVFHMIN-LABEL: vfmacc_vf_nxv8f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v20, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v16
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
@@ -694,9 +682,8 @@ define <vscale x 16 x float> @vfmacc_vf_nxv16f32(<vscale x 16 x half> %va, half
 ; ZVFHMIN-LABEL: vfmacc_vf_nxv16f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v4, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v4, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v24, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v4, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m8, ta, ma
@@ -721,9 +708,8 @@ define <vscale x 16 x float> @vfmacc_vf_nxv16f32_unmasked(<vscale x 16 x half> %
 ; ZVFHMIN-LABEL: vfmacc_vf_nxv16f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v24, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v24, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v0, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v24
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m8, ta, ma
diff --git a/llvm/test/CodeGen/RISCV/rvv/vfwmsac-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vfwmsac-vp.ll
index c92a79e49c1642..94b80075ac14c5 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vfwmsac-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vfwmsac-vp.ll
@@ -120,9 +120,8 @@ define <vscale x 1 x float> @vmfsac_vf_nxv1f32(<vscale x 1 x half> %a, half %b,
 ; ZVFHMIN-LABEL: vmfsac_vf_nxv1f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, mf2, ta, ma
@@ -148,9 +147,8 @@ define <vscale x 1 x float> @vmfsac_vf_nxv1f32_commute(<vscale x 1 x half> %a, h
 ; ZVFHMIN-LABEL: vmfsac_vf_nxv1f32_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v11, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v11, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v10, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v11, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, mf2, ta, ma
@@ -177,9 +175,8 @@ define <vscale x 1 x float> @vmfsac_vf_nxv1f32_unmasked(<vscale x 1 x half> %a,
 ; ZVFHMIN-LABEL: vmfsac_vf_nxv1f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, mf2, ta, ma
@@ -255,9 +252,8 @@ define <vscale x 2 x float> @vmfsac_vf_nxv2f32(<vscale x 2 x half> %a, half %b,
 ; ZVFHMIN-LABEL: vmfsac_vf_nxv2f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m1, ta, ma
@@ -283,9 +279,8 @@ define <vscale x 2 x float> @vmfsac_vf_nxv2f32_commute(<vscale x 2 x half> %a, h
 ; ZVFHMIN-LABEL: vmfsac_vf_nxv2f32_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v11, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v11, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v10, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v11, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m1, ta, ma
@@ -312,9 +307,8 @@ define <vscale x 2 x float> @vmfsac_vf_nxv2f32_unmasked(<vscale x 2 x half> %a,
 ; ZVFHMIN-LABEL: vmfsac_vf_nxv2f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m1, ta, ma
@@ -392,9 +386,8 @@ define <vscale x 4 x float> @vmfsac_vf_nxv4f32(<vscale x 4 x half> %a, half %b,
 ; ZVFHMIN-LABEL: vmfsac_vf_nxv4f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v14, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v12, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
@@ -420,9 +413,8 @@ define <vscale x 4 x float> @vmfsac_vf_nxv4f32_commute(<vscale x 4 x half> %a, h
 ; ZVFHMIN-LABEL: vmfsac_vf_nxv4f32_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v9, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v9, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v12, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v14, v9, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
@@ -449,9 +441,8 @@ define <vscale x 4 x float> @vmfsac_vf_nxv4f32_unmasked(<vscale x 4 x half> %a,
 ; ZVFHMIN-LABEL: vmfsac_vf_nxv4f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v14, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v12
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
@@ -529,9 +520,8 @@ define <vscale x 8 x float> @vmfsac_vf_nxv8f32(<vscale x 8 x half> %a, half %b,
 ; ZVFHMIN-LABEL: vmfsac_vf_nxv8f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v20, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v16, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
@@ -557,9 +547,8 @@ define <vscale x 8 x float> @vmfsac_vf_nxv8f32_commute(<vscale x 8 x half> %a, h
 ; ZVFHMIN-LABEL: vmfsac_vf_nxv8f32_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v16, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v20, v10, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
@@ -586,9 +575,8 @@ define <vscale x 8 x float> @vmfsac_vf_nxv8f32_unmasked(<vscale x 8 x half> %a,
 ; ZVFHMIN-LABEL: vmfsac_vf_nxv8f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v20, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v16
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
diff --git a/llvm/test/CodeGen/RISCV/rvv/vfwnmacc-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vfwnmacc-vp.ll
index 6ea58a4e768736..3fc58acd504e52 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vfwnmacc-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vfwnmacc-vp.ll
@@ -71,9 +71,8 @@ define <vscale x 1 x float> @vfnmacc_vf_nxv1f32(<vscale x 1 x half> %a, half %b,
 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv1f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, mf2, ta, ma
@@ -101,9 +100,8 @@ define <vscale x 1 x float> @vfnmacc_vf_nxv1f32_commute(<vscale x 1 x half> %a,
 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv1f32_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v11, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v11, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v10, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v11, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, mf2, ta, ma
@@ -131,9 +129,8 @@ define <vscale x 1 x float> @vfnmacc_vf_nxv1f32_unmasked(<vscale x 1 x half> %a,
 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv1f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, mf2, ta, ma
@@ -212,9 +209,8 @@ define <vscale x 2 x float> @vfnmacc_vf_nxv2f32(<vscale x 2 x half> %a, half %b,
 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv2f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m1, ta, ma
@@ -242,9 +238,8 @@ define <vscale x 2 x float> @vfnmacc_vf_nxv2f32_commute(<vscale x 2 x half> %a,
 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv2f32_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v11, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v11, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v10, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v11, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m1, ta, ma
@@ -272,9 +267,8 @@ define <vscale x 2 x float> @vfnmacc_vf_nxv2f32_unmasked(<vscale x 2 x half> %a,
 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv2f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m1, ta, ma
@@ -355,9 +349,8 @@ define <vscale x 4 x float> @vfnmacc_vf_nxv4f32(<vscale x 4 x half> %a, half %b,
 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv4f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v14, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v12, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
@@ -385,9 +378,8 @@ define <vscale x 4 x float> @vfnmacc_vf_nxv4f32_commute(<vscale x 4 x half> %a,
 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv4f32_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v9, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v9, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v12, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v14, v9, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
@@ -415,9 +407,8 @@ define <vscale x 4 x float> @vfnmacc_vf_nxv4f32_unmasked(<vscale x 4 x half> %a,
 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv4f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v14, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v12
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
@@ -498,9 +489,8 @@ define <vscale x 8 x float> @vfnmacc_vf_nxv8f32(<vscale x 8 x half> %a, half %b,
 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv8f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v20, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v16, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
@@ -528,9 +518,8 @@ define <vscale x 8 x float> @vfnmacc_vf_nxv8f32_commute(<vscale x 8 x half> %a,
 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv8f32_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v16, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v20, v10, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
@@ -558,9 +547,8 @@ define <vscale x 8 x float> @vfnmacc_vf_nxv8f32_unmasked(<vscale x 8 x half> %a,
 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv8f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v20, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v16
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
@@ -655,9 +643,8 @@ define <vscale x 16 x float> @vfnmacc_vf_nxv16f32(<vscale x 16 x half> %a, half
 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv16f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v4, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v4, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v24, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v4, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m8, ta, ma
@@ -685,9 +672,8 @@ define <vscale x 16 x float> @vfnmacc_vf_nxv16f32_commute(<vscale x 16 x half> %
 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv16f32_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v4, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v4, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v24, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v4, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m8, ta, ma
@@ -715,9 +701,8 @@ define <vscale x 16 x float> @vfnmacc_vf_nxv16f32_unmasked(<vscale x 16 x half>
 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv16f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v24, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v24, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v0, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v24
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m8, ta, ma
diff --git a/llvm/test/CodeGen/RISCV/rvv/vfwnmsac-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vfwnmsac-vp.ll
index 0afbe58038c76f..692a22bde48822 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vfwnmsac-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vfwnmsac-vp.ll
@@ -69,9 +69,8 @@ define <vscale x 1 x float> @vfnmsac_vf_nxv1f32(<vscale x 1 x half> %a, half %b,
 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv1f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, mf2, ta, ma
@@ -97,9 +96,8 @@ define <vscale x 1 x float> @vfnmsac_vf_nxv1f32_commute(<vscale x 1 x half> %a,
 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv1f32_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v11, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v11, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v10, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v11, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, mf2, ta, ma
@@ -126,9 +124,8 @@ define <vscale x 1 x float> @vfnmsac_vf_nxv1f32_unmasked(<vscale x 1 x half> %a,
 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv1f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, mf2, ta, ma
@@ -204,9 +201,8 @@ define <vscale x 2 x float> @vfnmsac_vf_nxv2f32(<vscale x 2 x half> %a, half %b,
 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv2f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m1, ta, ma
@@ -232,9 +228,8 @@ define <vscale x 2 x float> @vfnmsac_vf_nxv2f32_commute(<vscale x 2 x half> %a,
 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv2f32_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v11, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v11, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v10, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v11, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m1, ta, ma
@@ -261,9 +256,8 @@ define <vscale x 2 x float> @vfnmsac_vf_nxv2f32_unmasked(<vscale x 2 x half> %a,
 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv2f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v10
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m1, ta, ma
@@ -341,9 +335,8 @@ define <vscale x 4 x float> @vfnmsac_vf_nxv4f32(<vscale x 4 x half> %a, half %b,
 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv4f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v14, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v12, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
@@ -369,9 +362,8 @@ define <vscale x 4 x float> @vfnmsac_vf_nxv4f32_commute(<vscale x 4 x half> %a,
 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv4f32_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v9, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v9, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v12, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v14, v9, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
@@ -398,9 +390,8 @@ define <vscale x 4 x float> @vfnmsac_vf_nxv4f32_unmasked(<vscale x 4 x half> %a,
 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv4f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v14, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v12
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
@@ -478,9 +469,8 @@ define <vscale x 8 x float> @vfnmsac_vf_nxv8f32(<vscale x 8 x half> %a, half %b,
 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv8f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v20, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v16, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
@@ -506,9 +496,8 @@ define <vscale x 8 x float> @vfnmsac_vf_nxv8f32_commute(<vscale x 8 x half> %a,
 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv8f32_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v16, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v20, v10, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
@@ -535,9 +524,8 @@ define <vscale x 8 x float> @vfnmsac_vf_nxv8f32_unmasked(<vscale x 8 x half> %a,
 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv8f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v20, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v16
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
@@ -629,9 +617,8 @@ define <vscale x 16 x float> @vfnmsac_vf_nxv16f32(<vscale x 16 x half> %a, half
 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv16f32:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v4, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v4, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v24, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v4, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m8, ta, ma
@@ -657,9 +644,8 @@ define <vscale x 16 x float> @vfnmsac_vf_nxv16f32_commute(<vscale x 16 x half> %
 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv16f32_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v4, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v4, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v24, v8, v0.t
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v4, v0.t
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m8, ta, ma
@@ -686,9 +672,8 @@ define <vscale x 16 x float> @vfnmsac_vf_nxv16f32_unmasked(<vscale x 16 x half>
 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv16f32_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
-; ZVFHMIN-NEXT:    vmv.v.x v24, a1
 ; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vmv.v.x v24, a1
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v0, v8
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v8, v24
 ; ZVFHMIN-NEXT:    vsetvli zero, zero, e32, m8, ta, ma
diff --git a/llvm/test/CodeGen/RISCV/rvv/vl-opt-op-info.ll b/llvm/test/CodeGen/RISCV/rvv/vl-opt-op-info.ll
index 2b3c5417b15b55..4f24da3d861afe 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vl-opt-op-info.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vl-opt-op-info.ll
@@ -36,9 +36,8 @@ declare <vscale x 2 x i16> @llvm.riscv.vnsrl.nxv2i16.nxv2i32.nxv2i16(
 define <vscale x 2 x i16> @intrinsic_vnsrl_wv_nxv2i16_nxv2i32_nxv2i16(<vscale x 2 x i16> %a, <vscale x 2 x i16> %b, iXLen %2, <vscale x 2 x i32> %3, <vscale x 2 x i32> %4, <vscale x 2 x i16> %z) nounwind {
 ; CHECK-LABEL: intrinsic_vnsrl_wv_nxv2i16_nxv2i32_nxv2i16:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    vsetvli a1, zero, e16, mf2, ta, ma
-; CHECK-NEXT:    vwadd.vv v10, v8, v9
 ; CHECK-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
+; CHECK-NEXT:    vwadd.vv v10, v8, v9
 ; CHECK-NEXT:    vnsrl.wv v8, v10, v12
 ; CHECK-NEXT:    ret
 entry:
@@ -63,10 +62,9 @@ declare <vscale x 2 x i16> @llvm.riscv.vnclip.nxv2i16.nxv2i32.nxv2i16(
 define <vscale x 2 x i16> @vnclip(<vscale x 2 x i16> %a, <vscale x 2 x i16> %b, iXLen %2, <vscale x 2 x i32> %3, <vscale x 2 x i32> %4, <vscale x 2 x i16> %z) nounwind {
 ; CHECK-LABEL: vnclip:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    vsetvli a1, zero, e16, mf2, ta, ma
+; CHECK-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; CHECK-NEXT:    vwadd.vv v10, v8, v9
 ; CHECK-NEXT:    csrwi vxrm, 0
-; CHECK-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; CHECK-NEXT:    vnclip.wv v8, v10, v12
 ; CHECK-NEXT:    ret
 entry:
diff --git a/llvm/test/CodeGen/RISCV/rvv/vmax-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vmax-vp.ll
index f65e708f5303cc..cc02f54cda21a1 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vmax-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vmax-vp.ll
@@ -12,9 +12,7 @@ define <vscale x 8 x i7> @vmax_vx_nxv8i7(<vscale x 8 x i7> %a, i7 signext %b, <v
 ; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vsll.vi v8, v8, 1, v0.t
 ; CHECK-NEXT:    vsra.vi v8, v8, 1, v0.t
-; CHECK-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
-; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vsll.vi v9, v9, 1, v0.t
 ; CHECK-NEXT:    vsra.vi v9, v9, 1, v0.t
 ; CHECK-NEXT:    vmax.vv v8, v8, v9, v0.t
diff --git a/llvm/test/CodeGen/RISCV/rvv/vmaxu-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vmaxu-vp.ll
index df1ad58e5ecbde..45dc63442f157f 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vmaxu-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vmaxu-vp.ll
@@ -12,9 +12,7 @@ define <vscale x 8 x i7> @vmaxu_vx_nxv8i7(<vscale x 8 x i7> %a, i7 signext %b, <
 ; CHECK-NEXT:    li a2, 127
 ; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vand.vx v8, v8, a2, v0.t
-; CHECK-NEXT:    vsetvli a3, zero, e8, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
-; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vand.vx v9, v9, a2, v0.t
 ; CHECK-NEXT:    vmaxu.vv v8, v8, v9, v0.t
 ; CHECK-NEXT:    ret
diff --git a/llvm/test/CodeGen/RISCV/rvv/vmin-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vmin-vp.ll
index 0bf0638633aa45..f1edd99aa0b0dc 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vmin-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vmin-vp.ll
@@ -12,9 +12,7 @@ define <vscale x 8 x i7> @vmin_vx_nxv8i7(<vscale x 8 x i7> %a, i7 signext %b, <v
 ; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vsll.vi v8, v8, 1, v0.t
 ; CHECK-NEXT:    vsra.vi v8, v8, 1, v0.t
-; CHECK-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
-; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vsll.vi v9, v9, 1, v0.t
 ; CHECK-NEXT:    vsra.vi v9, v9, 1, v0.t
 ; CHECK-NEXT:    vmin.vv v8, v8, v9, v0.t
diff --git a/llvm/test/CodeGen/RISCV/rvv/vminu-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vminu-vp.ll
index 2acebdf2e646d4..9929cc3b784556 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vminu-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vminu-vp.ll
@@ -12,9 +12,7 @@ define <vscale x 8 x i7> @vminu_vx_nxv8i7(<vscale x 8 x i7> %a, i7 signext %b, <
 ; CHECK-NEXT:    li a2, 127
 ; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vand.vx v8, v8, a2, v0.t
-; CHECK-NEXT:    vsetvli a3, zero, e8, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
-; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vand.vx v9, v9, a2, v0.t
 ; CHECK-NEXT:    vminu.vv v8, v8, v9, v0.t
 ; CHECK-NEXT:    ret
diff --git a/llvm/test/CodeGen/RISCV/rvv/vmul-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vmul-vp.ll
index 51026cbcb8c4bf..0adee0157c8f38 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vmul-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vmul-vp.ll
@@ -1440,11 +1440,10 @@ define <vscale x 8 x i64> @vmul_vadd_vx_nxv8i64_unmasked(<vscale x 8 x i64> %va,
 ; CHECK-LABEL: vmul_vadd_vx_nxv8i64_unmasked:
 ; CHECK:       # %bb.0:
 ; CHECK-NEXT:    li a1, 21
-; CHECK-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
-; CHECK-NEXT:    vmv.v.x v16, a1
-; CHECK-NEXT:    li a1, 7
 ; CHECK-NEXT:    vsetvli zero, a0, e64, m8, ta, ma
-; CHECK-NEXT:    vmadd.vx v8, a1, v16
+; CHECK-NEXT:    vmv.v.x v16, a1
+; CHECK-NEXT:    li a0, 7
+; CHECK-NEXT:    vmadd.vx v8, a0, v16
 ; CHECK-NEXT:    ret
   %head = insertelement <vscale x 8 x i1> poison, i1 true, i32 0
   %m = shufflevector <vscale x 8 x i1> %head, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
diff --git a/llvm/test/CodeGen/RISCV/rvv/vpgather-sdnode.ll b/llvm/test/CodeGen/RISCV/rvv/vpgather-sdnode.ll
index c0d7ecf74956b9..5a9265fa207b28 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vpgather-sdnode.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vpgather-sdnode.ll
@@ -231,17 +231,17 @@ define <vscale x 8 x i8> @vpgather_nxv8i8(<vscale x 8 x ptr> %ptrs, <vscale x 8
 define <vscale x 8 x i8> @vpgather_baseidx_nxv8i8(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i8:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v8
-; RV32-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e8, m1, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i8:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
-; RV64-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e8, m1, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i8, ptr %base, <vscale x 8 x i8> %idxs
@@ -264,18 +264,18 @@ define <vscale x 32 x i8> @vpgather_baseidx_nxv32i8(ptr %base, <vscale x 32 x i8
 ; RV32-NEXT:    srli a3, a3, 2
 ; RV32-NEXT:    vsetvli a5, zero, e8, mf2, ta, ma
 ; RV32-NEXT:    vslidedown.vx v0, v0, a3
-; RV32-NEXT:    vsetvli a3, zero, e32, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, a4, e32, m8, ta, ma
 ; RV32-NEXT:    vsext.vf4 v16, v10
-; RV32-NEXT:    vsetvli zero, a4, e8, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e8, m2, ta, ma
 ; RV32-NEXT:    vluxei32.v v10, (a0), v16, v0.t
 ; RV32-NEXT:    bltu a1, a2, .LBB12_2
 ; RV32-NEXT:  # %bb.1:
 ; RV32-NEXT:    mv a1, a2
 ; RV32-NEXT:  .LBB12_2:
-; RV32-NEXT:    vsetvli a2, zero, e32, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m8, ta, ma
 ; RV32-NEXT:    vsext.vf4 v16, v8
 ; RV32-NEXT:    vmv1r.v v0, v12
-; RV32-NEXT:    vsetvli zero, a1, e8, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e8, m2, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
@@ -298,18 +298,18 @@ define <vscale x 32 x i8> @vpgather_baseidx_nxv32i8(ptr %base, <vscale x 32 x i8
 ; RV64-NEXT:    srli a4, a2, 3
 ; RV64-NEXT:    vsetvli a7, zero, e8, mf4, ta, ma
 ; RV64-NEXT:    vslidedown.vx v0, v13, a4
-; RV64-NEXT:    vsetvli a7, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a6, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v11
-; RV64-NEXT:    vsetvli zero, a6, e8, m1, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e8, m1, ta, ma
 ; RV64-NEXT:    vluxei64.v v11, (a0), v16, v0.t
 ; RV64-NEXT:    bltu a5, a2, .LBB12_2
 ; RV64-NEXT:  # %bb.1:
 ; RV64-NEXT:    mv a5, a2
 ; RV64-NEXT:  .LBB12_2:
-; RV64-NEXT:    vsetvli a6, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a5, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v10
 ; RV64-NEXT:    vmv1r.v v0, v13
-; RV64-NEXT:    vsetvli zero, a5, e8, m1, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e8, m1, ta, ma
 ; RV64-NEXT:    vluxei64.v v10, (a0), v16, v0.t
 ; RV64-NEXT:    bltu a1, a3, .LBB12_4
 ; RV64-NEXT:  # %bb.3:
@@ -321,18 +321,18 @@ define <vscale x 32 x i8> @vpgather_baseidx_nxv32i8(ptr %base, <vscale x 32 x i8
 ; RV64-NEXT:    and a3, a5, a3
 ; RV64-NEXT:    vsetvli a5, zero, e8, mf4, ta, ma
 ; RV64-NEXT:    vslidedown.vx v0, v12, a4
-; RV64-NEXT:    vsetvli a4, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a3, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v9
-; RV64-NEXT:    vsetvli zero, a3, e8, m1, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e8, m1, ta, ma
 ; RV64-NEXT:    vluxei64.v v9, (a0), v16, v0.t
 ; RV64-NEXT:    bltu a1, a2, .LBB12_6
 ; RV64-NEXT:  # %bb.5:
 ; RV64-NEXT:    mv a1, a2
 ; RV64-NEXT:  .LBB12_6:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
 ; RV64-NEXT:    vmv1r.v v0, v12
-; RV64-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e8, m1, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i8, ptr %base, <vscale x 32 x i8> %idxs
@@ -525,19 +525,19 @@ define <vscale x 8 x i16> @vpgather_nxv8i16(<vscale x 8 x ptr> %ptrs, <vscale x
 define <vscale x 8 x i16> @vpgather_baseidx_nxv8i8_nxv8i16(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i8_nxv8i16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v8
 ; RV32-NEXT:    vadd.vv v12, v12, v12
-; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i8_nxv8i16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
 ; RV64-NEXT:    vadd.vv v16, v16, v16
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i16, ptr %base, <vscale x 8 x i8> %idxs
@@ -548,19 +548,19 @@ define <vscale x 8 x i16> @vpgather_baseidx_nxv8i8_nxv8i16(ptr %base, <vscale x
 define <vscale x 8 x i16> @vpgather_baseidx_sext_nxv8i8_nxv8i16(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8i16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v8
 ; RV32-NEXT:    vadd.vv v12, v12, v12
-; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8i16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
 ; RV64-NEXT:    vadd.vv v16, v16, v16
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
@@ -572,17 +572,17 @@ define <vscale x 8 x i16> @vpgather_baseidx_sext_nxv8i8_nxv8i16(ptr %base, <vsca
 define <vscale x 8 x i16> @vpgather_baseidx_zext_nxv8i8_nxv8i16(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8i16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; RV32-NEXT:    vwaddu.vv v10, v8, v8
-; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV32-NEXT:    vluxei16.v v8, (a0), v10, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8i16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; RV64-NEXT:    vwaddu.vv v10, v8, v8
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vluxei16.v v8, (a0), v10, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
@@ -594,18 +594,17 @@ define <vscale x 8 x i16> @vpgather_baseidx_zext_nxv8i8_nxv8i16(ptr %base, <vsca
 define <vscale x 8 x i16> @vpgather_baseidx_nxv8i16(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; RV32-NEXT:    vwadd.vv v12, v8, v8
 ; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vwadd.vv v12, v8, v8
 ; RV32-NEXT:    vluxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v8
 ; RV64-NEXT:    vadd.vv v16, v16, v16
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i16, ptr %base, <vscale x 8 x i16> %idxs
@@ -751,19 +750,18 @@ define <vscale x 8 x i32> @vpgather_nxv8i32(<vscale x 8 x ptr> %ptrs, <vscale x
 define <vscale x 8 x i32> @vpgather_baseidx_nxv8i8_nxv8i32(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i8_nxv8i32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v8
 ; RV32-NEXT:    vsll.vi v8, v12, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v8, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i8_nxv8i32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i8> %idxs
@@ -774,19 +772,18 @@ define <vscale x 8 x i32> @vpgather_baseidx_nxv8i8_nxv8i32(ptr %base, <vscale x
 define <vscale x 8 x i32> @vpgather_baseidx_sext_nxv8i8_nxv8i32(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8i32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v8
 ; RV32-NEXT:    vsll.vi v8, v12, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v8, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8i32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
@@ -798,19 +795,19 @@ define <vscale x 8 x i32> @vpgather_baseidx_sext_nxv8i8_nxv8i32(ptr %base, <vsca
 define <vscale x 8 x i32> @vpgather_baseidx_zext_nxv8i8_nxv8i32(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8i32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV32-NEXT:    vzext.vf2 v10, v8
 ; RV32-NEXT:    vsll.vi v12, v10, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV32-NEXT:    vluxei16.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8i32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV64-NEXT:    vzext.vf2 v10, v8
 ; RV64-NEXT:    vsll.vi v12, v10, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vluxei16.v v8, (a0), v12, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
@@ -822,19 +819,18 @@ define <vscale x 8 x i32> @vpgather_baseidx_zext_nxv8i8_nxv8i32(ptr %base, <vsca
 define <vscale x 8 x i32> @vpgather_baseidx_nxv8i16_nxv8i32(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i16_nxv8i32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v12, v8
 ; RV32-NEXT:    vsll.vi v8, v12, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v8, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i16_nxv8i32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v8
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i16> %idxs
@@ -845,19 +841,18 @@ define <vscale x 8 x i32> @vpgather_baseidx_nxv8i16_nxv8i32(ptr %base, <vscale x
 define <vscale x 8 x i32> @vpgather_baseidx_sext_nxv8i16_nxv8i32(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8i32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v12, v8
 ; RV32-NEXT:    vsll.vi v8, v12, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v8, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8i32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v8
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
@@ -869,19 +864,17 @@ define <vscale x 8 x i32> @vpgather_baseidx_sext_nxv8i16_nxv8i32(ptr %base, <vsc
 define <vscale x 8 x i32> @vpgather_baseidx_zext_nxv8i16_nxv8i32(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8i32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vzext.vf2 v12, v8
 ; RV32-NEXT:    vsll.vi v8, v12, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v8, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8i32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vzext.vf2 v12, v8
 ; RV64-NEXT:    vsll.vi v8, v12, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vluxei32.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
@@ -893,18 +886,17 @@ define <vscale x 8 x i32> @vpgather_baseidx_zext_nxv8i16_nxv8i32(ptr %base, <vsc
 define <vscale x 8 x i32> @vpgather_baseidx_nxv8i32(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
-; RV32-NEXT:    vsll.vi v8, v8, 2
 ; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV32-NEXT:    vsll.vi v8, v8, 2
 ; RV32-NEXT:    vluxei32.v v8, (a0), v8, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v16, v8
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i32> %idxs
@@ -1008,19 +1000,18 @@ define <vscale x 8 x i64> @vpgather_nxv8i64(<vscale x 8 x ptr> %ptrs, <vscale x
 define <vscale x 8 x i64> @vpgather_baseidx_nxv8i8_nxv8i64(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i8_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v8
 ; RV32-NEXT:    vsll.vi v16, v12, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i8_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i8> %idxs
@@ -1031,19 +1022,18 @@ define <vscale x 8 x i64> @vpgather_baseidx_nxv8i8_nxv8i64(ptr %base, <vscale x
 define <vscale x 8 x i64> @vpgather_baseidx_sext_nxv8i8_nxv8i64(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v8
 ; RV32-NEXT:    vsll.vi v16, v12, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
@@ -1055,19 +1045,19 @@ define <vscale x 8 x i64> @vpgather_baseidx_sext_nxv8i8_nxv8i64(ptr %base, <vsca
 define <vscale x 8 x i64> @vpgather_baseidx_zext_nxv8i8_nxv8i64(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV32-NEXT:    vzext.vf2 v10, v8
 ; RV32-NEXT:    vsll.vi v16, v10, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei16.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV64-NEXT:    vzext.vf2 v10, v8
 ; RV64-NEXT:    vsll.vi v16, v10, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei16.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
@@ -1079,19 +1069,18 @@ define <vscale x 8 x i64> @vpgather_baseidx_zext_nxv8i8_nxv8i64(ptr %base, <vsca
 define <vscale x 8 x i64> @vpgather_baseidx_nxv8i16_nxv8i64(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i16_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v12, v8
 ; RV32-NEXT:    vsll.vi v16, v12, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i16_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i16> %idxs
@@ -1102,19 +1091,18 @@ define <vscale x 8 x i64> @vpgather_baseidx_nxv8i16_nxv8i64(ptr %base, <vscale x
 define <vscale x 8 x i64> @vpgather_baseidx_sext_nxv8i16_nxv8i64(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v12, v8
 ; RV32-NEXT:    vsll.vi v16, v12, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
@@ -1126,19 +1114,19 @@ define <vscale x 8 x i64> @vpgather_baseidx_sext_nxv8i16_nxv8i64(ptr %base, <vsc
 define <vscale x 8 x i64> @vpgather_baseidx_zext_nxv8i16_nxv8i64(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vzext.vf2 v12, v8
 ; RV32-NEXT:    vsll.vi v16, v12, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vzext.vf2 v12, v8
 ; RV64-NEXT:    vsll.vi v16, v12, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
@@ -1150,18 +1138,17 @@ define <vscale x 8 x i64> @vpgather_baseidx_zext_nxv8i16_nxv8i64(ptr %base, <vsc
 define <vscale x 8 x i64> @vpgather_baseidx_nxv8i32_nxv8i64(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i32_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v8, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i32_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i32> %idxs
@@ -1172,18 +1159,17 @@ define <vscale x 8 x i64> @vpgather_baseidx_nxv8i32_nxv8i64(ptr %base, <vscale x
 define <vscale x 8 x i64> @vpgather_baseidx_sext_nxv8i32_nxv8i64(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i32_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v8, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i32_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
@@ -1195,18 +1181,17 @@ define <vscale x 8 x i64> @vpgather_baseidx_sext_nxv8i32_nxv8i64(ptr %base, <vsc
 define <vscale x 8 x i64> @vpgather_baseidx_zext_nxv8i32_nxv8i64(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i32_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v8, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i32_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vzext.vf2 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
@@ -1218,18 +1203,17 @@ define <vscale x 8 x i64> @vpgather_baseidx_zext_nxv8i32_nxv8i64(ptr %base, <vsc
 define <vscale x 8 x i64> @vpgather_baseidx_nxv8i64(ptr %base, <vscale x 8 x i64> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vnsrl.wi v16, v8, 0
 ; RV32-NEXT:    vsll.vi v16, v16, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
-; RV64-NEXT:    vsll.vi v8, v8, 3
 ; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsll.vi v8, v8, 3
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %idxs
@@ -1338,19 +1322,19 @@ define <vscale x 8 x half> @vpgather_nxv8f16(<vscale x 8 x ptr> %ptrs, <vscale x
 define <vscale x 8 x half> @vpgather_baseidx_nxv8i8_nxv8f16(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i8_nxv8f16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v8
 ; RV32-NEXT:    vadd.vv v12, v12, v12
-; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i8_nxv8f16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
 ; RV64-NEXT:    vadd.vv v16, v16, v16
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds half, ptr %base, <vscale x 8 x i8> %idxs
@@ -1361,19 +1345,19 @@ define <vscale x 8 x half> @vpgather_baseidx_nxv8i8_nxv8f16(ptr %base, <vscale x
 define <vscale x 8 x half> @vpgather_baseidx_sext_nxv8i8_nxv8f16(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8f16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v8
 ; RV32-NEXT:    vadd.vv v12, v12, v12
-; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8f16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
 ; RV64-NEXT:    vadd.vv v16, v16, v16
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
@@ -1385,17 +1369,17 @@ define <vscale x 8 x half> @vpgather_baseidx_sext_nxv8i8_nxv8f16(ptr %base, <vsc
 define <vscale x 8 x half> @vpgather_baseidx_zext_nxv8i8_nxv8f16(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8f16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; RV32-NEXT:    vwaddu.vv v10, v8, v8
-; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV32-NEXT:    vluxei16.v v8, (a0), v10, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8f16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; RV64-NEXT:    vwaddu.vv v10, v8, v8
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vluxei16.v v8, (a0), v10, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
@@ -1407,18 +1391,17 @@ define <vscale x 8 x half> @vpgather_baseidx_zext_nxv8i8_nxv8f16(ptr %base, <vsc
 define <vscale x 8 x half> @vpgather_baseidx_nxv8f16(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8f16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; RV32-NEXT:    vwadd.vv v12, v8, v8
 ; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vwadd.vv v12, v8, v8
 ; RV32-NEXT:    vluxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8f16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v8
 ; RV64-NEXT:    vadd.vv v16, v16, v16
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds half, ptr %base, <vscale x 8 x i16> %idxs
@@ -1522,19 +1505,18 @@ define <vscale x 8 x float> @vpgather_nxv8f32(<vscale x 8 x ptr> %ptrs, <vscale
 define <vscale x 8 x float> @vpgather_baseidx_nxv8i8_nxv8f32(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i8_nxv8f32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v8
 ; RV32-NEXT:    vsll.vi v8, v12, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v8, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i8_nxv8f32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i8> %idxs
@@ -1545,19 +1527,18 @@ define <vscale x 8 x float> @vpgather_baseidx_nxv8i8_nxv8f32(ptr %base, <vscale
 define <vscale x 8 x float> @vpgather_baseidx_sext_nxv8i8_nxv8f32(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8f32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v8
 ; RV32-NEXT:    vsll.vi v8, v12, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v8, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8f32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
@@ -1569,19 +1550,19 @@ define <vscale x 8 x float> @vpgather_baseidx_sext_nxv8i8_nxv8f32(ptr %base, <vs
 define <vscale x 8 x float> @vpgather_baseidx_zext_nxv8i8_nxv8f32(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8f32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV32-NEXT:    vzext.vf2 v10, v8
 ; RV32-NEXT:    vsll.vi v12, v10, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV32-NEXT:    vluxei16.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8f32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV64-NEXT:    vzext.vf2 v10, v8
 ; RV64-NEXT:    vsll.vi v12, v10, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vluxei16.v v8, (a0), v12, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
@@ -1593,19 +1574,18 @@ define <vscale x 8 x float> @vpgather_baseidx_zext_nxv8i8_nxv8f32(ptr %base, <vs
 define <vscale x 8 x float> @vpgather_baseidx_nxv8i16_nxv8f32(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i16_nxv8f32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v12, v8
 ; RV32-NEXT:    vsll.vi v8, v12, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v8, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i16_nxv8f32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v8
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i16> %idxs
@@ -1616,19 +1596,18 @@ define <vscale x 8 x float> @vpgather_baseidx_nxv8i16_nxv8f32(ptr %base, <vscale
 define <vscale x 8 x float> @vpgather_baseidx_sext_nxv8i16_nxv8f32(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8f32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v12, v8
 ; RV32-NEXT:    vsll.vi v8, v12, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v8, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8f32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v8
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
@@ -1640,19 +1619,17 @@ define <vscale x 8 x float> @vpgather_baseidx_sext_nxv8i16_nxv8f32(ptr %base, <v
 define <vscale x 8 x float> @vpgather_baseidx_zext_nxv8i16_nxv8f32(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8f32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vzext.vf2 v12, v8
 ; RV32-NEXT:    vsll.vi v8, v12, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v8, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8f32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vzext.vf2 v12, v8
 ; RV64-NEXT:    vsll.vi v8, v12, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vluxei32.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
@@ -1664,18 +1641,17 @@ define <vscale x 8 x float> @vpgather_baseidx_zext_nxv8i16_nxv8f32(ptr %base, <v
 define <vscale x 8 x float> @vpgather_baseidx_nxv8f32(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8f32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
-; RV32-NEXT:    vsll.vi v8, v8, 2
 ; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV32-NEXT:    vsll.vi v8, v8, 2
 ; RV32-NEXT:    vluxei32.v v8, (a0), v8, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8f32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v16, v8
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i32> %idxs
@@ -1779,19 +1755,18 @@ define <vscale x 6 x double> @vpgather_nxv6f64(<vscale x 6 x ptr> %ptrs, <vscale
 define <vscale x 6 x double> @vpgather_baseidx_nxv6i8_nxv6f64(ptr %base, <vscale x 6 x i8> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv6i8_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v8
 ; RV32-NEXT:    vsll.vi v16, v12, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv6i8_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i8> %idxs
@@ -1802,19 +1777,18 @@ define <vscale x 6 x double> @vpgather_baseidx_nxv6i8_nxv6f64(ptr %base, <vscale
 define <vscale x 6 x double> @vpgather_baseidx_sext_nxv6i8_nxv6f64(ptr %base, <vscale x 6 x i8> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_sext_nxv6i8_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v8
 ; RV32-NEXT:    vsll.vi v16, v12, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_sext_nxv6i8_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 6 x i8> %idxs to <vscale x 6 x i64>
@@ -1826,19 +1800,19 @@ define <vscale x 6 x double> @vpgather_baseidx_sext_nxv6i8_nxv6f64(ptr %base, <v
 define <vscale x 6 x double> @vpgather_baseidx_zext_nxv6i8_nxv6f64(ptr %base, <vscale x 6 x i8> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_zext_nxv6i8_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV32-NEXT:    vzext.vf2 v10, v8
 ; RV32-NEXT:    vsll.vi v16, v10, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei16.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_zext_nxv6i8_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV64-NEXT:    vzext.vf2 v10, v8
 ; RV64-NEXT:    vsll.vi v16, v10, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei16.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 6 x i8> %idxs to <vscale x 6 x i64>
@@ -1850,19 +1824,18 @@ define <vscale x 6 x double> @vpgather_baseidx_zext_nxv6i8_nxv6f64(ptr %base, <v
 define <vscale x 6 x double> @vpgather_baseidx_nxv6i16_nxv6f64(ptr %base, <vscale x 6 x i16> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv6i16_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v12, v8
 ; RV32-NEXT:    vsll.vi v16, v12, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv6i16_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i16> %idxs
@@ -1873,19 +1846,18 @@ define <vscale x 6 x double> @vpgather_baseidx_nxv6i16_nxv6f64(ptr %base, <vscal
 define <vscale x 6 x double> @vpgather_baseidx_sext_nxv6i16_nxv6f64(ptr %base, <vscale x 6 x i16> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_sext_nxv6i16_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v12, v8
 ; RV32-NEXT:    vsll.vi v16, v12, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_sext_nxv6i16_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 6 x i16> %idxs to <vscale x 6 x i64>
@@ -1897,19 +1869,19 @@ define <vscale x 6 x double> @vpgather_baseidx_sext_nxv6i16_nxv6f64(ptr %base, <
 define <vscale x 6 x double> @vpgather_baseidx_zext_nxv6i16_nxv6f64(ptr %base, <vscale x 6 x i16> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_zext_nxv6i16_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vzext.vf2 v12, v8
 ; RV32-NEXT:    vsll.vi v16, v12, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_zext_nxv6i16_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vzext.vf2 v12, v8
 ; RV64-NEXT:    vsll.vi v16, v12, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 6 x i16> %idxs to <vscale x 6 x i64>
@@ -1921,18 +1893,17 @@ define <vscale x 6 x double> @vpgather_baseidx_zext_nxv6i16_nxv6f64(ptr %base, <
 define <vscale x 6 x double> @vpgather_baseidx_nxv6i32_nxv6f64(ptr %base, <vscale x 6 x i32> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv6i32_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v8, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv6i32_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i32> %idxs
@@ -1943,18 +1914,17 @@ define <vscale x 6 x double> @vpgather_baseidx_nxv6i32_nxv6f64(ptr %base, <vscal
 define <vscale x 6 x double> @vpgather_baseidx_sext_nxv6i32_nxv6f64(ptr %base, <vscale x 6 x i32> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_sext_nxv6i32_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v8, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_sext_nxv6i32_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 6 x i32> %idxs to <vscale x 6 x i64>
@@ -1966,18 +1936,17 @@ define <vscale x 6 x double> @vpgather_baseidx_sext_nxv6i32_nxv6f64(ptr %base, <
 define <vscale x 6 x double> @vpgather_baseidx_zext_nxv6i32_nxv6f64(ptr %base, <vscale x 6 x i32> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_zext_nxv6i32_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v8, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_zext_nxv6i32_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vzext.vf2 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 6 x i32> %idxs to <vscale x 6 x i64>
@@ -1989,18 +1958,17 @@ define <vscale x 6 x double> @vpgather_baseidx_zext_nxv6i32_nxv6f64(ptr %base, <
 define <vscale x 6 x double> @vpgather_baseidx_nxv6f64(ptr %base, <vscale x 6 x i64> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vnsrl.wi v16, v8, 0
 ; RV32-NEXT:    vsll.vi v16, v16, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
-; RV64-NEXT:    vsll.vi v8, v8, 3
 ; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsll.vi v8, v8, 3
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %idxs
@@ -2030,19 +1998,18 @@ define <vscale x 8 x double> @vpgather_nxv8f64(<vscale x 8 x ptr> %ptrs, <vscale
 define <vscale x 8 x double> @vpgather_baseidx_nxv8i8_nxv8f64(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i8_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v8
 ; RV32-NEXT:    vsll.vi v16, v12, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i8_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i8> %idxs
@@ -2053,19 +2020,18 @@ define <vscale x 8 x double> @vpgather_baseidx_nxv8i8_nxv8f64(ptr %base, <vscale
 define <vscale x 8 x double> @vpgather_baseidx_sext_nxv8i8_nxv8f64(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v8
 ; RV32-NEXT:    vsll.vi v16, v12, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i8_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
@@ -2077,19 +2043,19 @@ define <vscale x 8 x double> @vpgather_baseidx_sext_nxv8i8_nxv8f64(ptr %base, <v
 define <vscale x 8 x double> @vpgather_baseidx_zext_nxv8i8_nxv8f64(ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV32-NEXT:    vzext.vf2 v10, v8
 ; RV32-NEXT:    vsll.vi v16, v10, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei16.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i8_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV64-NEXT:    vzext.vf2 v10, v8
 ; RV64-NEXT:    vsll.vi v16, v10, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei16.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
@@ -2101,19 +2067,18 @@ define <vscale x 8 x double> @vpgather_baseidx_zext_nxv8i8_nxv8f64(ptr %base, <v
 define <vscale x 8 x double> @vpgather_baseidx_nxv8i16_nxv8f64(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i16_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v12, v8
 ; RV32-NEXT:    vsll.vi v16, v12, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i16_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i16> %idxs
@@ -2124,19 +2089,18 @@ define <vscale x 8 x double> @vpgather_baseidx_nxv8i16_nxv8f64(ptr %base, <vscal
 define <vscale x 8 x double> @vpgather_baseidx_sext_nxv8i16_nxv8f64(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v12, v8
 ; RV32-NEXT:    vsll.vi v16, v12, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i16_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
@@ -2148,19 +2112,19 @@ define <vscale x 8 x double> @vpgather_baseidx_sext_nxv8i16_nxv8f64(ptr %base, <
 define <vscale x 8 x double> @vpgather_baseidx_zext_nxv8i16_nxv8f64(ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vzext.vf2 v12, v8
 ; RV32-NEXT:    vsll.vi v16, v12, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i16_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vzext.vf2 v12, v8
 ; RV64-NEXT:    vsll.vi v16, v12, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
@@ -2172,18 +2136,17 @@ define <vscale x 8 x double> @vpgather_baseidx_zext_nxv8i16_nxv8f64(ptr %base, <
 define <vscale x 8 x double> @vpgather_baseidx_nxv8i32_nxv8f64(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8i32_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v8, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8i32_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i32> %idxs
@@ -2194,18 +2157,17 @@ define <vscale x 8 x double> @vpgather_baseidx_nxv8i32_nxv8f64(ptr %base, <vscal
 define <vscale x 8 x double> @vpgather_baseidx_sext_nxv8i32_nxv8f64(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_sext_nxv8i32_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v8, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_sext_nxv8i32_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
@@ -2217,18 +2179,17 @@ define <vscale x 8 x double> @vpgather_baseidx_sext_nxv8i32_nxv8f64(ptr %base, <
 define <vscale x 8 x double> @vpgather_baseidx_zext_nxv8i32_nxv8f64(ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_zext_nxv8i32_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v8, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_zext_nxv8i32_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vzext.vf2 v16, v8
 ; RV64-NEXT:    vsll.vi v8, v16, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
@@ -2240,18 +2201,17 @@ define <vscale x 8 x double> @vpgather_baseidx_zext_nxv8i32_nxv8f64(ptr %base, <
 define <vscale x 8 x double> @vpgather_baseidx_nxv8f64(ptr %base, <vscale x 8 x i64> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpgather_baseidx_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vnsrl.wi v16, v8, 0
 ; RV32-NEXT:    vsll.vi v16, v16, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vluxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpgather_baseidx_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
-; RV64-NEXT:    vsll.vi v8, v8, 3
 ; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsll.vi v8, v8, 3
 ; RV64-NEXT:    vluxei64.v v8, (a0), v8, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %idxs
diff --git a/llvm/test/CodeGen/RISCV/rvv/vpscatter-sdnode.ll b/llvm/test/CodeGen/RISCV/rvv/vpscatter-sdnode.ll
index 59662db42898fc..bf8653070141d9 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vpscatter-sdnode.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vpscatter-sdnode.ll
@@ -43,17 +43,15 @@ define void @vpscatter_nxv2i8(<vscale x 2 x i8> %val, <vscale x 2 x ptr> %ptrs,
 define void @vpscatter_nxv2i16_truncstore_nxv2i8(<vscale x 2 x i16> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_nxv2i16_truncstore_nxv2i8:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a1, zero, e8, mf4, ta, ma
-; RV32-NEXT:    vnsrl.wi v8, v8, 0
 ; RV32-NEXT:    vsetvli zero, a0, e8, mf4, ta, ma
+; RV32-NEXT:    vnsrl.wi v8, v8, 0
 ; RV32-NEXT:    vsoxei32.v v8, (zero), v9, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_nxv2i16_truncstore_nxv2i8:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a1, zero, e8, mf4, ta, ma
-; RV64-NEXT:    vnsrl.wi v8, v8, 0
 ; RV64-NEXT:    vsetvli zero, a0, e8, mf4, ta, ma
+; RV64-NEXT:    vnsrl.wi v8, v8, 0
 ; RV64-NEXT:    vsoxei64.v v8, (zero), v10, v0.t
 ; RV64-NEXT:    ret
   %tval = trunc <vscale x 2 x i16> %val to <vscale x 2 x i8>
@@ -64,21 +62,19 @@ define void @vpscatter_nxv2i16_truncstore_nxv2i8(<vscale x 2 x i16> %val, <vscal
 define void @vpscatter_nxv2i32_truncstore_nxv2i8(<vscale x 2 x i32> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_nxv2i32_truncstore_nxv2i8:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a1, zero, e16, mf2, ta, ma
+; RV32-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; RV32-NEXT:    vnsrl.wi v8, v8, 0
 ; RV32-NEXT:    vsetvli zero, zero, e8, mf4, ta, ma
 ; RV32-NEXT:    vnsrl.wi v8, v8, 0
-; RV32-NEXT:    vsetvli zero, a0, e8, mf4, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (zero), v9, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_nxv2i32_truncstore_nxv2i8:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a1, zero, e16, mf2, ta, ma
+; RV64-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; RV64-NEXT:    vnsrl.wi v8, v8, 0
 ; RV64-NEXT:    vsetvli zero, zero, e8, mf4, ta, ma
 ; RV64-NEXT:    vnsrl.wi v8, v8, 0
-; RV64-NEXT:    vsetvli zero, a0, e8, mf4, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (zero), v10, v0.t
 ; RV64-NEXT:    ret
   %tval = trunc <vscale x 2 x i32> %val to <vscale x 2 x i8>
@@ -89,25 +85,23 @@ define void @vpscatter_nxv2i32_truncstore_nxv2i8(<vscale x 2 x i32> %val, <vscal
 define void @vpscatter_nxv2i64_truncstore_nxv2i8(<vscale x 2 x i64> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_nxv2i64_truncstore_nxv2i8:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a1, zero, e32, m1, ta, ma
+; RV32-NEXT:    vsetvli zero, a0, e32, m1, ta, ma
 ; RV32-NEXT:    vnsrl.wi v11, v8, 0
 ; RV32-NEXT:    vsetvli zero, zero, e16, mf2, ta, ma
 ; RV32-NEXT:    vnsrl.wi v8, v11, 0
 ; RV32-NEXT:    vsetvli zero, zero, e8, mf4, ta, ma
 ; RV32-NEXT:    vnsrl.wi v8, v8, 0
-; RV32-NEXT:    vsetvli zero, a0, e8, mf4, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (zero), v10, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_nxv2i64_truncstore_nxv2i8:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a1, zero, e32, m1, ta, ma
+; RV64-NEXT:    vsetvli zero, a0, e32, m1, ta, ma
 ; RV64-NEXT:    vnsrl.wi v12, v8, 0
 ; RV64-NEXT:    vsetvli zero, zero, e16, mf2, ta, ma
 ; RV64-NEXT:    vnsrl.wi v8, v12, 0
 ; RV64-NEXT:    vsetvli zero, zero, e8, mf4, ta, ma
 ; RV64-NEXT:    vnsrl.wi v8, v8, 0
-; RV64-NEXT:    vsetvli zero, a0, e8, mf4, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (zero), v10, v0.t
 ; RV64-NEXT:    ret
   %tval = trunc <vscale x 2 x i64> %val to <vscale x 2 x i8>
@@ -170,17 +164,17 @@ define void @vpscatter_nxv8i8(<vscale x 8 x i8> %val, <vscale x 8 x ptr> %ptrs,
 define void @vpscatter_baseidx_nxv8i8(<vscale x 8 x i8> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i8:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v9
-; RV32-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e8, m1, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i8:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v9
-; RV64-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e8, m1, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i8, ptr %base, <vscale x 8 x i8> %idxs
@@ -227,17 +221,15 @@ define void @vpscatter_nxv2i16(<vscale x 2 x i16> %val, <vscale x 2 x ptr> %ptrs
 define void @vpscatter_nxv2i32_truncstore_nxv2i16(<vscale x 2 x i32> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_nxv2i32_truncstore_nxv2i16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a1, zero, e16, mf2, ta, ma
-; RV32-NEXT:    vnsrl.wi v8, v8, 0
 ; RV32-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
+; RV32-NEXT:    vnsrl.wi v8, v8, 0
 ; RV32-NEXT:    vsoxei32.v v8, (zero), v9, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_nxv2i32_truncstore_nxv2i16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a1, zero, e16, mf2, ta, ma
-; RV64-NEXT:    vnsrl.wi v8, v8, 0
 ; RV64-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
+; RV64-NEXT:    vnsrl.wi v8, v8, 0
 ; RV64-NEXT:    vsoxei64.v v8, (zero), v10, v0.t
 ; RV64-NEXT:    ret
   %tval = trunc <vscale x 2 x i32> %val to <vscale x 2 x i16>
@@ -248,21 +240,19 @@ define void @vpscatter_nxv2i32_truncstore_nxv2i16(<vscale x 2 x i32> %val, <vsca
 define void @vpscatter_nxv2i64_truncstore_nxv2i16(<vscale x 2 x i64> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_nxv2i64_truncstore_nxv2i16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a1, zero, e32, m1, ta, ma
+; RV32-NEXT:    vsetvli zero, a0, e32, m1, ta, ma
 ; RV32-NEXT:    vnsrl.wi v11, v8, 0
 ; RV32-NEXT:    vsetvli zero, zero, e16, mf2, ta, ma
 ; RV32-NEXT:    vnsrl.wi v8, v11, 0
-; RV32-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (zero), v10, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_nxv2i64_truncstore_nxv2i16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a1, zero, e32, m1, ta, ma
+; RV64-NEXT:    vsetvli zero, a0, e32, m1, ta, ma
 ; RV64-NEXT:    vnsrl.wi v12, v8, 0
 ; RV64-NEXT:    vsetvli zero, zero, e16, mf2, ta, ma
 ; RV64-NEXT:    vnsrl.wi v8, v12, 0
-; RV64-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (zero), v10, v0.t
 ; RV64-NEXT:    ret
   %tval = trunc <vscale x 2 x i64> %val to <vscale x 2 x i16>
@@ -325,19 +315,19 @@ define void @vpscatter_nxv8i16(<vscale x 8 x i16> %val, <vscale x 8 x ptr> %ptrs
 define void @vpscatter_baseidx_nxv8i8_nxv8i16(<vscale x 8 x i16> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i8_nxv8i16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v10
 ; RV32-NEXT:    vadd.vv v12, v12, v12
-; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i8_nxv8i16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v10
 ; RV64-NEXT:    vadd.vv v16, v16, v16
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i16, ptr %base, <vscale x 8 x i8> %idxs
@@ -348,19 +338,19 @@ define void @vpscatter_baseidx_nxv8i8_nxv8i16(<vscale x 8 x i16> %val, ptr %base
 define void @vpscatter_baseidx_sext_nxv8i8_nxv8i16(<vscale x 8 x i16> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8i16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v10
 ; RV32-NEXT:    vadd.vv v12, v12, v12
-; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8i16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v10
 ; RV64-NEXT:    vadd.vv v16, v16, v16
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
@@ -372,17 +362,17 @@ define void @vpscatter_baseidx_sext_nxv8i8_nxv8i16(<vscale x 8 x i16> %val, ptr
 define void @vpscatter_baseidx_zext_nxv8i8_nxv8i16(<vscale x 8 x i16> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8i16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; RV32-NEXT:    vwaddu.vv v12, v10, v10
-; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV32-NEXT:    vsoxei16.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8i16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; RV64-NEXT:    vwaddu.vv v12, v10, v10
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vsoxei16.v v8, (a0), v12, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
@@ -394,18 +384,17 @@ define void @vpscatter_baseidx_zext_nxv8i8_nxv8i16(<vscale x 8 x i16> %val, ptr
 define void @vpscatter_baseidx_nxv8i16(<vscale x 8 x i16> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; RV32-NEXT:    vwadd.vv v12, v10, v10
 ; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vwadd.vv v12, v10, v10
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v10
 ; RV64-NEXT:    vadd.vv v16, v16, v16
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i16, ptr %base, <vscale x 8 x i16> %idxs
@@ -426,9 +415,8 @@ define void @vpscatter_baseidx_vpsext_nxv8i16_nxv8i16(<vscale x 8 x i16> %val, p
 ; RV64:       # %bb.0:
 ; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vsext.vf2 v12, v10, v0.t
-; RV64-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vwadd.vv v16, v12, v12
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = call <vscale x 8 x i32> @llvm.vp.sext.nxv8i16.nxv8i32(<vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 %evl)
@@ -450,9 +438,8 @@ define void @vpscatter_baseidx_vpzext_nxv8i16_nxv8i16(<vscale x 8 x i16> %val, p
 ; RV64:       # %bb.0:
 ; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vzext.vf2 v12, v10, v0.t
-; RV64-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vwadd.vv v16, v12, v12
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = call <vscale x 8 x i32> @llvm.vp.zext.nxv8i16.nxv8i32(<vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 %evl)
@@ -467,10 +454,10 @@ define void @vpscatter_baseidx_vpsext_nxv8i32_nxv8i16(<vscale x 8 x i16> %val, p
 ; RV32:       # %bb.0:
 ; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV32-NEXT:    vsext.vf2 v16, v12, v0.t
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV32-NEXT:    vnsrl.wi v12, v16, 0
 ; RV32-NEXT:    vadd.vv v12, v12, v12
-; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
@@ -493,10 +480,10 @@ define void @vpscatter_baseidx_vpzext_nxv8i32_nxv8i16(<vscale x 8 x i16> %val, p
 ; RV32:       # %bb.0:
 ; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV32-NEXT:    vzext.vf2 v16, v12, v0.t
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV32-NEXT:    vnsrl.wi v12, v16, 0
 ; RV32-NEXT:    vadd.vv v12, v12, v12
-; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
@@ -552,17 +539,15 @@ define void @vpscatter_nxv2i32(<vscale x 2 x i32> %val, <vscale x 2 x ptr> %ptrs
 define void @vpscatter_nxv2i64_truncstore_nxv2i32(<vscale x 2 x i64> %val, <vscale x 2 x ptr> %ptrs, <vscale x 2 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_nxv2i64_truncstore_nxv2i32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a1, zero, e32, m1, ta, ma
-; RV32-NEXT:    vnsrl.wi v11, v8, 0
 ; RV32-NEXT:    vsetvli zero, a0, e32, m1, ta, ma
+; RV32-NEXT:    vnsrl.wi v11, v8, 0
 ; RV32-NEXT:    vsoxei32.v v11, (zero), v10, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_nxv2i64_truncstore_nxv2i32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a1, zero, e32, m1, ta, ma
-; RV64-NEXT:    vnsrl.wi v12, v8, 0
 ; RV64-NEXT:    vsetvli zero, a0, e32, m1, ta, ma
+; RV64-NEXT:    vnsrl.wi v12, v8, 0
 ; RV64-NEXT:    vsoxei64.v v12, (zero), v10, v0.t
 ; RV64-NEXT:    ret
   %tval = trunc <vscale x 2 x i64> %val to <vscale x 2 x i32>
@@ -625,19 +610,18 @@ define void @vpscatter_nxv8i32(<vscale x 8 x i32> %val, <vscale x 8 x ptr> %ptrs
 define void @vpscatter_baseidx_nxv8i8_nxv8i32(<vscale x 8 x i32> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i8_nxv8i32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v16, v12
 ; RV32-NEXT:    vsll.vi v12, v16, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i8_nxv8i32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v12
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i8> %idxs
@@ -648,19 +632,18 @@ define void @vpscatter_baseidx_nxv8i8_nxv8i32(<vscale x 8 x i32> %val, ptr %base
 define void @vpscatter_baseidx_sext_nxv8i8_nxv8i32(<vscale x 8 x i32> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8i32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v16, v12
 ; RV32-NEXT:    vsll.vi v12, v16, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8i32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v12
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
@@ -672,19 +655,19 @@ define void @vpscatter_baseidx_sext_nxv8i8_nxv8i32(<vscale x 8 x i32> %val, ptr
 define void @vpscatter_baseidx_zext_nxv8i8_nxv8i32(<vscale x 8 x i32> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8i32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV32-NEXT:    vzext.vf2 v14, v12
 ; RV32-NEXT:    vsll.vi v12, v14, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV32-NEXT:    vsoxei16.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8i32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV64-NEXT:    vzext.vf2 v14, v12
 ; RV64-NEXT:    vsll.vi v12, v14, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vsoxei16.v v8, (a0), v12, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
@@ -696,19 +679,18 @@ define void @vpscatter_baseidx_zext_nxv8i8_nxv8i32(<vscale x 8 x i32> %val, ptr
 define void @vpscatter_baseidx_nxv8i16_nxv8i32(<vscale x 8 x i32> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i16_nxv8i32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v16, v12
 ; RV32-NEXT:    vsll.vi v12, v16, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i16_nxv8i32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v12
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i16> %idxs
@@ -719,19 +701,18 @@ define void @vpscatter_baseidx_nxv8i16_nxv8i32(<vscale x 8 x i32> %val, ptr %bas
 define void @vpscatter_baseidx_sext_nxv8i16_nxv8i32(<vscale x 8 x i32> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8i32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v16, v12
 ; RV32-NEXT:    vsll.vi v12, v16, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8i32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v12
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
@@ -743,19 +724,17 @@ define void @vpscatter_baseidx_sext_nxv8i16_nxv8i32(<vscale x 8 x i32> %val, ptr
 define void @vpscatter_baseidx_zext_nxv8i16_nxv8i32(<vscale x 8 x i32> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8i32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vzext.vf2 v16, v12
 ; RV32-NEXT:    vsll.vi v12, v16, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8i32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vzext.vf2 v16, v12
 ; RV64-NEXT:    vsll.vi v12, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
@@ -767,18 +746,17 @@ define void @vpscatter_baseidx_zext_nxv8i16_nxv8i32(<vscale x 8 x i32> %val, ptr
 define void @vpscatter_baseidx_nxv8i32(<vscale x 8 x i32> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
-; RV32-NEXT:    vsll.vi v12, v12, 2
 ; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV32-NEXT:    vsll.vi v12, v12, 2
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v16, v12
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i32, ptr %base, <vscale x 8 x i32> %idxs
@@ -877,19 +855,18 @@ define void @vpscatter_nxv8i64(<vscale x 8 x i64> %val, <vscale x 8 x ptr> %ptrs
 define void @vpscatter_baseidx_nxv8i8_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i8_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v20, v16
 ; RV32-NEXT:    vsll.vi v16, v20, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i8_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i8> %idxs
@@ -900,19 +877,18 @@ define void @vpscatter_baseidx_nxv8i8_nxv8i64(<vscale x 8 x i64> %val, ptr %base
 define void @vpscatter_baseidx_sext_nxv8i8_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v20, v16
 ; RV32-NEXT:    vsll.vi v16, v20, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
@@ -924,19 +900,19 @@ define void @vpscatter_baseidx_sext_nxv8i8_nxv8i64(<vscale x 8 x i64> %val, ptr
 define void @vpscatter_baseidx_zext_nxv8i8_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV32-NEXT:    vzext.vf2 v18, v16
 ; RV32-NEXT:    vsll.vi v16, v18, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei16.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV64-NEXT:    vzext.vf2 v18, v16
 ; RV64-NEXT:    vsll.vi v16, v18, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei16.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
@@ -948,19 +924,18 @@ define void @vpscatter_baseidx_zext_nxv8i8_nxv8i64(<vscale x 8 x i64> %val, ptr
 define void @vpscatter_baseidx_nxv8i16_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i16_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v20, v16
 ; RV32-NEXT:    vsll.vi v16, v20, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i16_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i16> %idxs
@@ -971,19 +946,18 @@ define void @vpscatter_baseidx_nxv8i16_nxv8i64(<vscale x 8 x i64> %val, ptr %bas
 define void @vpscatter_baseidx_sext_nxv8i16_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v20, v16
 ; RV32-NEXT:    vsll.vi v16, v20, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
@@ -995,19 +969,19 @@ define void @vpscatter_baseidx_sext_nxv8i16_nxv8i64(<vscale x 8 x i64> %val, ptr
 define void @vpscatter_baseidx_zext_nxv8i16_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vzext.vf2 v20, v16
 ; RV32-NEXT:    vsll.vi v16, v20, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vzext.vf2 v20, v16
 ; RV64-NEXT:    vsll.vi v16, v20, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
@@ -1019,18 +993,17 @@ define void @vpscatter_baseidx_zext_nxv8i16_nxv8i64(<vscale x 8 x i64> %val, ptr
 define void @vpscatter_baseidx_nxv8i32_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i32_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v16, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i32_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i32> %idxs
@@ -1041,18 +1014,17 @@ define void @vpscatter_baseidx_nxv8i32_nxv8i64(<vscale x 8 x i64> %val, ptr %bas
 define void @vpscatter_baseidx_sext_nxv8i32_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i32_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v16, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i32_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
@@ -1064,18 +1036,17 @@ define void @vpscatter_baseidx_sext_nxv8i32_nxv8i64(<vscale x 8 x i64> %val, ptr
 define void @vpscatter_baseidx_zext_nxv8i32_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i32_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v16, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i32_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vzext.vf2 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
@@ -1087,18 +1058,17 @@ define void @vpscatter_baseidx_zext_nxv8i32_nxv8i64(<vscale x 8 x i64> %val, ptr
 define void @vpscatter_baseidx_nxv8i64(<vscale x 8 x i64> %val, ptr %base, <vscale x 8 x i64> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vnsrl.wi v24, v16, 0
 ; RV32-NEXT:    vsll.vi v16, v24, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
-; RV64-NEXT:    vsll.vi v16, v16, 3
 ; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsll.vi v16, v16, 3
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds i64, ptr %base, <vscale x 8 x i64> %idxs
@@ -1197,19 +1167,19 @@ define void @vpscatter_nxv8f16(<vscale x 8 x half> %val, <vscale x 8 x ptr> %ptr
 define void @vpscatter_baseidx_nxv8i8_nxv8f16(<vscale x 8 x half> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i8_nxv8f16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v10
 ; RV32-NEXT:    vadd.vv v12, v12, v12
-; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i8_nxv8f16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v10
 ; RV64-NEXT:    vadd.vv v16, v16, v16
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds half, ptr %base, <vscale x 8 x i8> %idxs
@@ -1220,19 +1190,19 @@ define void @vpscatter_baseidx_nxv8i8_nxv8f16(<vscale x 8 x half> %val, ptr %bas
 define void @vpscatter_baseidx_sext_nxv8i8_nxv8f16(<vscale x 8 x half> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8f16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v12, v10
 ; RV32-NEXT:    vadd.vv v12, v12, v12
-; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8f16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v10
 ; RV64-NEXT:    vadd.vv v16, v16, v16
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
@@ -1244,17 +1214,17 @@ define void @vpscatter_baseidx_sext_nxv8i8_nxv8f16(<vscale x 8 x half> %val, ptr
 define void @vpscatter_baseidx_zext_nxv8i8_nxv8f16(<vscale x 8 x half> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8f16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; RV32-NEXT:    vwaddu.vv v12, v10, v10
-; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV32-NEXT:    vsoxei16.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8f16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; RV64-NEXT:    vwaddu.vv v12, v10, v10
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vsoxei16.v v8, (a0), v12, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i16>
@@ -1266,18 +1236,17 @@ define void @vpscatter_baseidx_zext_nxv8i8_nxv8f16(<vscale x 8 x half> %val, ptr
 define void @vpscatter_baseidx_nxv8f16(<vscale x 8 x half> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8f16:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; RV32-NEXT:    vwadd.vv v12, v10, v10
 ; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV32-NEXT:    vwadd.vv v12, v10, v10
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8f16:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v10
 ; RV64-NEXT:    vadd.vv v16, v16, v16
-; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds half, ptr %base, <vscale x 8 x i16> %idxs
@@ -1376,19 +1345,18 @@ define void @vpscatter_nxv8f32(<vscale x 8 x float> %val, <vscale x 8 x ptr> %pt
 define void @vpscatter_baseidx_nxv8i8_nxv8f32(<vscale x 8 x float> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i8_nxv8f32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v16, v12
 ; RV32-NEXT:    vsll.vi v12, v16, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i8_nxv8f32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v12
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i8> %idxs
@@ -1399,19 +1367,18 @@ define void @vpscatter_baseidx_nxv8i8_nxv8f32(<vscale x 8 x float> %val, ptr %ba
 define void @vpscatter_baseidx_sext_nxv8i8_nxv8f32(<vscale x 8 x float> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8f32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v16, v12
 ; RV32-NEXT:    vsll.vi v12, v16, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8f32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v16, v12
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
@@ -1423,19 +1390,19 @@ define void @vpscatter_baseidx_sext_nxv8i8_nxv8f32(<vscale x 8 x float> %val, pt
 define void @vpscatter_baseidx_zext_nxv8i8_nxv8f32(<vscale x 8 x float> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8f32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV32-NEXT:    vzext.vf2 v14, v12
 ; RV32-NEXT:    vsll.vi v12, v14, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV32-NEXT:    vsoxei16.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8f32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV64-NEXT:    vzext.vf2 v14, v12
 ; RV64-NEXT:    vsll.vi v12, v14, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vsoxei16.v v8, (a0), v12, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i32>
@@ -1447,19 +1414,18 @@ define void @vpscatter_baseidx_zext_nxv8i8_nxv8f32(<vscale x 8 x float> %val, pt
 define void @vpscatter_baseidx_nxv8i16_nxv8f32(<vscale x 8 x float> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i16_nxv8f32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v16, v12
 ; RV32-NEXT:    vsll.vi v12, v16, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i16_nxv8f32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v12
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i16> %idxs
@@ -1470,19 +1436,18 @@ define void @vpscatter_baseidx_nxv8i16_nxv8f32(<vscale x 8 x float> %val, ptr %b
 define void @vpscatter_baseidx_sext_nxv8i16_nxv8f32(<vscale x 8 x float> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8f32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v16, v12
 ; RV32-NEXT:    vsll.vi v12, v16, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8f32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v16, v12
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
@@ -1494,19 +1459,17 @@ define void @vpscatter_baseidx_sext_nxv8i16_nxv8f32(<vscale x 8 x float> %val, p
 define void @vpscatter_baseidx_zext_nxv8i16_nxv8f32(<vscale x 8 x float> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8f32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vzext.vf2 v16, v12
 ; RV32-NEXT:    vsll.vi v12, v16, 2
-; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8f32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vzext.vf2 v16, v12
 ; RV64-NEXT:    vsll.vi v12, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i32>
@@ -1518,18 +1481,17 @@ define void @vpscatter_baseidx_zext_nxv8i16_nxv8f32(<vscale x 8 x float> %val, p
 define void @vpscatter_baseidx_nxv8f32(<vscale x 8 x float> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8f32:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
-; RV32-NEXT:    vsll.vi v12, v12, 2
 ; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV32-NEXT:    vsll.vi v12, v12, 2
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v12, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8f32:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v16, v12
 ; RV64-NEXT:    vsll.vi v16, v16, 2
-; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e32, m4, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds float, ptr %base, <vscale x 8 x i32> %idxs
@@ -1628,19 +1590,18 @@ define void @vpscatter_nxv6f64(<vscale x 6 x double> %val, <vscale x 6 x ptr> %p
 define void @vpscatter_baseidx_nxv6i8_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i8> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv6i8_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v20, v16
 ; RV32-NEXT:    vsll.vi v16, v20, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv6i8_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i8> %idxs
@@ -1651,19 +1612,18 @@ define void @vpscatter_baseidx_nxv6i8_nxv6f64(<vscale x 6 x double> %val, ptr %b
 define void @vpscatter_baseidx_sext_nxv6i8_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i8> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_sext_nxv6i8_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v20, v16
 ; RV32-NEXT:    vsll.vi v16, v20, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_sext_nxv6i8_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 6 x i8> %idxs to <vscale x 6 x i64>
@@ -1675,19 +1635,19 @@ define void @vpscatter_baseidx_sext_nxv6i8_nxv6f64(<vscale x 6 x double> %val, p
 define void @vpscatter_baseidx_zext_nxv6i8_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i8> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_zext_nxv6i8_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV32-NEXT:    vzext.vf2 v18, v16
 ; RV32-NEXT:    vsll.vi v16, v18, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei16.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_zext_nxv6i8_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV64-NEXT:    vzext.vf2 v18, v16
 ; RV64-NEXT:    vsll.vi v16, v18, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei16.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 6 x i8> %idxs to <vscale x 6 x i64>
@@ -1699,19 +1659,18 @@ define void @vpscatter_baseidx_zext_nxv6i8_nxv6f64(<vscale x 6 x double> %val, p
 define void @vpscatter_baseidx_nxv6i16_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i16> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv6i16_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v20, v16
 ; RV32-NEXT:    vsll.vi v16, v20, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv6i16_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i16> %idxs
@@ -1722,19 +1681,18 @@ define void @vpscatter_baseidx_nxv6i16_nxv6f64(<vscale x 6 x double> %val, ptr %
 define void @vpscatter_baseidx_sext_nxv6i16_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i16> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_sext_nxv6i16_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v20, v16
 ; RV32-NEXT:    vsll.vi v16, v20, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_sext_nxv6i16_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 6 x i16> %idxs to <vscale x 6 x i64>
@@ -1746,19 +1704,19 @@ define void @vpscatter_baseidx_sext_nxv6i16_nxv6f64(<vscale x 6 x double> %val,
 define void @vpscatter_baseidx_zext_nxv6i16_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i16> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_zext_nxv6i16_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vzext.vf2 v20, v16
 ; RV32-NEXT:    vsll.vi v16, v20, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_zext_nxv6i16_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vzext.vf2 v20, v16
 ; RV64-NEXT:    vsll.vi v16, v20, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 6 x i16> %idxs to <vscale x 6 x i64>
@@ -1770,18 +1728,17 @@ define void @vpscatter_baseidx_zext_nxv6i16_nxv6f64(<vscale x 6 x double> %val,
 define void @vpscatter_baseidx_nxv6i32_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i32> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv6i32_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v16, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv6i32_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i32> %idxs
@@ -1792,18 +1749,17 @@ define void @vpscatter_baseidx_nxv6i32_nxv6f64(<vscale x 6 x double> %val, ptr %
 define void @vpscatter_baseidx_sext_nxv6i32_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i32> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_sext_nxv6i32_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v16, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_sext_nxv6i32_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 6 x i32> %idxs to <vscale x 6 x i64>
@@ -1815,18 +1771,17 @@ define void @vpscatter_baseidx_sext_nxv6i32_nxv6f64(<vscale x 6 x double> %val,
 define void @vpscatter_baseidx_zext_nxv6i32_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i32> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_zext_nxv6i32_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v16, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_zext_nxv6i32_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vzext.vf2 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 6 x i32> %idxs to <vscale x 6 x i64>
@@ -1838,18 +1793,17 @@ define void @vpscatter_baseidx_zext_nxv6i32_nxv6f64(<vscale x 6 x double> %val,
 define void @vpscatter_baseidx_nxv6f64(<vscale x 6 x double> %val, ptr %base, <vscale x 6 x i64> %idxs, <vscale x 6 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv6f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vnsrl.wi v24, v16, 0
 ; RV32-NEXT:    vsll.vi v16, v24, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv6f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
-; RV64-NEXT:    vsll.vi v16, v16, 3
 ; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsll.vi v16, v16, 3
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 6 x i64> %idxs
@@ -1878,19 +1832,18 @@ define void @vpscatter_nxv8f64(<vscale x 8 x double> %val, <vscale x 8 x ptr> %p
 define void @vpscatter_baseidx_nxv8i8_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i8_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v20, v16
 ; RV32-NEXT:    vsll.vi v16, v20, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i8_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i8> %idxs
@@ -1901,19 +1854,18 @@ define void @vpscatter_baseidx_nxv8i8_nxv8f64(<vscale x 8 x double> %val, ptr %b
 define void @vpscatter_baseidx_sext_nxv8i8_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf4 v20, v16
 ; RV32-NEXT:    vsll.vi v16, v20, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i8_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf8 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
@@ -1925,19 +1877,19 @@ define void @vpscatter_baseidx_sext_nxv8i8_nxv8f64(<vscale x 8 x double> %val, p
 define void @vpscatter_baseidx_zext_nxv8i8_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i8> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV32-NEXT:    vzext.vf2 v18, v16
 ; RV32-NEXT:    vsll.vi v16, v18, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei16.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i8_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; RV64-NEXT:    vzext.vf2 v18, v16
 ; RV64-NEXT:    vsll.vi v16, v18, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei16.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i8> %idxs to <vscale x 8 x i64>
@@ -1949,19 +1901,18 @@ define void @vpscatter_baseidx_zext_nxv8i8_nxv8f64(<vscale x 8 x double> %val, p
 define void @vpscatter_baseidx_nxv8i16_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i16_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v20, v16
 ; RV32-NEXT:    vsll.vi v16, v20, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i16_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i16> %idxs
@@ -1972,19 +1923,18 @@ define void @vpscatter_baseidx_nxv8i16_nxv8f64(<vscale x 8 x double> %val, ptr %
 define void @vpscatter_baseidx_sext_nxv8i16_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsext.vf2 v20, v16
 ; RV32-NEXT:    vsll.vi v16, v20, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i16_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf4 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
@@ -1996,19 +1946,19 @@ define void @vpscatter_baseidx_sext_nxv8i16_nxv8f64(<vscale x 8 x double> %val,
 define void @vpscatter_baseidx_zext_nxv8i16_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i16> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vzext.vf2 v20, v16
 ; RV32-NEXT:    vsll.vi v16, v20, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i16_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV64-NEXT:    vzext.vf2 v20, v16
 ; RV64-NEXT:    vsll.vi v16, v20, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i16> %idxs to <vscale x 8 x i64>
@@ -2020,18 +1970,17 @@ define void @vpscatter_baseidx_zext_nxv8i16_nxv8f64(<vscale x 8 x double> %val,
 define void @vpscatter_baseidx_nxv8i32_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8i32_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v16, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8i32_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i32> %idxs
@@ -2042,18 +1991,17 @@ define void @vpscatter_baseidx_nxv8i32_nxv8f64(<vscale x 8 x double> %val, ptr %
 define void @vpscatter_baseidx_sext_nxv8i32_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_sext_nxv8i32_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v16, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_sext_nxv8i32_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsext.vf2 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = sext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
@@ -2065,18 +2013,17 @@ define void @vpscatter_baseidx_sext_nxv8i32_nxv8f64(<vscale x 8 x double> %val,
 define void @vpscatter_baseidx_zext_nxv8i32_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i32> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_zext_nxv8i32_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vsll.vi v16, v16, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_zext_nxv8i32_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
+; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vzext.vf2 v24, v16
 ; RV64-NEXT:    vsll.vi v16, v24, 3
-; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %eidxs = zext <vscale x 8 x i32> %idxs to <vscale x 8 x i64>
@@ -2088,18 +2035,17 @@ define void @vpscatter_baseidx_zext_nxv8i32_nxv8f64(<vscale x 8 x double> %val,
 define void @vpscatter_baseidx_nxv8f64(<vscale x 8 x double> %val, ptr %base, <vscale x 8 x i64> %idxs, <vscale x 8 x i1> %m, i32 zeroext %evl) {
 ; RV32-LABEL: vpscatter_baseidx_nxv8f64:
 ; RV32:       # %bb.0:
-; RV32-NEXT:    vsetvli a2, zero, e32, m4, ta, ma
+; RV32-NEXT:    vsetvli zero, a1, e32, m4, ta, ma
 ; RV32-NEXT:    vnsrl.wi v24, v16, 0
 ; RV32-NEXT:    vsll.vi v16, v24, 3
-; RV32-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV32-NEXT:    vsetvli zero, zero, e64, m8, ta, ma
 ; RV32-NEXT:    vsoxei32.v v8, (a0), v16, v0.t
 ; RV32-NEXT:    ret
 ;
 ; RV64-LABEL: vpscatter_baseidx_nxv8f64:
 ; RV64:       # %bb.0:
-; RV64-NEXT:    vsetvli a2, zero, e64, m8, ta, ma
-; RV64-NEXT:    vsll.vi v16, v16, 3
 ; RV64-NEXT:    vsetvli zero, a1, e64, m8, ta, ma
+; RV64-NEXT:    vsll.vi v16, v16, 3
 ; RV64-NEXT:    vsoxei64.v v8, (a0), v16, v0.t
 ; RV64-NEXT:    ret
   %ptrs = getelementptr inbounds double, ptr %base, <vscale x 8 x i64> %idxs
diff --git a/llvm/test/CodeGen/RISCV/rvv/vrem-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vrem-vp.ll
index 2ef96f4b3896fc..9304e8c58f90db 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vrem-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vrem-vp.ll
@@ -12,9 +12,7 @@ define <vscale x 8 x i7> @vrem_vx_nxv8i7(<vscale x 8 x i7> %a, i7 signext %b, <v
 ; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vsll.vi v8, v8, 1, v0.t
 ; CHECK-NEXT:    vsra.vi v8, v8, 1, v0.t
-; CHECK-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
-; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vsll.vi v9, v9, 1, v0.t
 ; CHECK-NEXT:    vsra.vi v9, v9, 1, v0.t
 ; CHECK-NEXT:    vrem.vv v8, v8, v9, v0.t
diff --git a/llvm/test/CodeGen/RISCV/rvv/vremu-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vremu-vp.ll
index 1f1ed4a1269acb..1d4ee06cb9ac85 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vremu-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vremu-vp.ll
@@ -12,9 +12,7 @@ define <vscale x 8 x i7> @vremu_vx_nxv8i7(<vscale x 8 x i7> %a, i7 signext %b, <
 ; CHECK-NEXT:    li a2, 127
 ; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vand.vx v8, v8, a2, v0.t
-; CHECK-NEXT:    vsetvli a3, zero, e8, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
-; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vand.vx v9, v9, a2, v0.t
 ; CHECK-NEXT:    vremu.vv v8, v8, v9, v0.t
 ; CHECK-NEXT:    ret
diff --git a/llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-crossbb.ll b/llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-crossbb.ll
index 027c81180d5f19..f28153d427ebfe 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-crossbb.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-crossbb.ll
@@ -1125,7 +1125,6 @@ exit:
 define <vscale x 4 x i32> @clobbered_forwarded_avl(i64 %n, <vscale x 4 x i32> %v, i1 %cmp) {
 ; CHECK-LABEL: clobbered_forwarded_avl:
 ; CHECK:       # %bb.0: # %entry
-; CHECK-NEXT:    mv a2, a0
 ; CHECK-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
 ; CHECK-NEXT:    andi a1, a1, 1
 ; CHECK-NEXT:  .LBB27_1: # %for.body
@@ -1133,9 +1132,7 @@ define <vscale x 4 x i32> @clobbered_forwarded_avl(i64 %n, <vscale x 4 x i32> %v
 ; CHECK-NEXT:    addi a0, a0, 1
 ; CHECK-NEXT:    bnez a1, .LBB27_1
 ; CHECK-NEXT:  # %bb.2: # %for.cond.cleanup
-; CHECK-NEXT:    vsetvli a0, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vadd.vv v10, v8, v8
-; CHECK-NEXT:    vsetvli zero, a2, e32, m2, ta, ma
 ; CHECK-NEXT:    vadd.vv v8, v10, v8
 ; CHECK-NEXT:    ret
 entry:
diff --git a/llvm/test/CodeGen/RISCV/rvv/vshl-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vshl-vp.ll
index 380835494ed17d..f5c46aec86b864 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vshl-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vshl-vp.ll
@@ -9,10 +9,9 @@ declare <vscale x 8 x i7> @llvm.vp.shl.nxv8i7(<vscale x 8 x i7>, <vscale x 8 x i
 define <vscale x 8 x i7> @vsll_vx_nxv8i7(<vscale x 8 x i7> %a, i7 signext %b, <vscale x 8 x i1> %mask, i32 zeroext %evl) {
 ; CHECK-LABEL: vsll_vx_nxv8i7:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    li a0, 127
-; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vand.vx v9, v9, a0, v0.t
 ; CHECK-NEXT:    vsll.vv v8, v8, v9, v0.t
 ; CHECK-NEXT:    ret
diff --git a/llvm/test/CodeGen/RISCV/rvv/vsra-sdnode.ll b/llvm/test/CodeGen/RISCV/rvv/vsra-sdnode.ll
index 382c8297473b78..68ea51845392c9 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vsra-sdnode.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vsra-sdnode.ll
@@ -944,9 +944,9 @@ define <vscale x 1 x i8> @vsra_vv_nxv1i8_sext_zext_mixed_trunc(<vscale x 1 x i8>
 ; CHECK-NEXT:    vsext.vf4 v9, v8
 ; CHECK-NEXT:    vzext.vf4 v10, v8
 ; CHECK-NEXT:    vsra.vv v8, v9, v10
-; CHECK-NEXT:    vsetvli zero, zero, e16, mf4, ta, ma
+; CHECK-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; CHECK-NEXT:    vnsrl.wi v8, v8, 0
-; CHECK-NEXT:    vsetvli zero, a0, e8, mf8, ta, ma
+; CHECK-NEXT:    vsetvli zero, zero, e8, mf8, ta, ma
 ; CHECK-NEXT:    vnsrl.wi v8, v8, 0, v0.t
 ; CHECK-NEXT:    ret
   %sexted_va = sext <vscale x 1 x i8> %va to <vscale x 1 x i32>
diff --git a/llvm/test/CodeGen/RISCV/rvv/vsra-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vsra-vp.ll
index cff8cc710d21f3..ecce91982b14a4 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vsra-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vsra-vp.ll
@@ -12,10 +12,8 @@ define <vscale x 8 x i7> @vsra_vx_nxv8i7(<vscale x 8 x i7> %a, i7 signext %b, <v
 ; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vsll.vi v8, v8, 1, v0.t
 ; CHECK-NEXT:    vsra.vi v8, v8, 1, v0.t
-; CHECK-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    li a0, 127
-; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vand.vx v9, v9, a0, v0.t
 ; CHECK-NEXT:    vsra.vv v8, v8, v9, v0.t
 ; CHECK-NEXT:    ret
diff --git a/llvm/test/CodeGen/RISCV/rvv/vsrl-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vsrl-vp.ll
index ff6771b643031f..9431b9abc91fbf 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vsrl-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vsrl-vp.ll
@@ -12,9 +12,7 @@ define <vscale x 8 x i7> @vsrl_vx_nxv8i7(<vscale x 8 x i7> %a, i7 signext %b, <v
 ; CHECK-NEXT:    li a2, 127
 ; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vand.vx v8, v8, a2, v0.t
-; CHECK-NEXT:    vsetvli a3, zero, e8, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
-; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vand.vx v9, v9, a2, v0.t
 ; CHECK-NEXT:    vsrl.vv v8, v8, v9, v0.t
 ; CHECK-NEXT:    ret
diff --git a/llvm/test/CodeGen/RISCV/rvv/vssub-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vssub-vp.ll
index 613b58b0f1b88a..bab66aad8c7e2a 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vssub-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vssub-vp.ll
@@ -62,9 +62,8 @@ define <vscale x 1 x i8> @vssub_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale
 define <vscale x 1 x i8> @vssub_vx_nxv1i8_commute(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
 ; CHECK-LABEL: vssub_vx_nxv1i8_commute:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e8, mf8, ta, ma
-; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, a1, e8, mf8, ta, ma
+; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vssub.vv v8, v9, v8, v0.t
 ; CHECK-NEXT:    ret
   %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
diff --git a/llvm/test/CodeGen/RISCV/rvv/vssubu-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vssubu-vp.ll
index 8c729d7d9bfb6e..ca56145260f51c 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vssubu-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vssubu-vp.ll
@@ -60,9 +60,8 @@ define <vscale x 1 x i8> @vssubu_vx_nxv1i8(<vscale x 1 x i8> %va, i8 %b, <vscale
 define <vscale x 1 x i8> @vssubu_vx_nxv1i8_commute(<vscale x 1 x i8> %va, i8 %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
 ; CHECK-LABEL: vssubu_vx_nxv1i8_commute:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e8, mf8, ta, ma
-; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, a1, e8, mf8, ta, ma
+; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vssubu.vv v8, v9, v8, v0.t
 ; CHECK-NEXT:    ret
   %elt.head = insertelement <vscale x 1 x i8> poison, i8 %b, i32 0
diff --git a/llvm/test/CodeGen/RISCV/rvv/vwsll-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vwsll-vp.ll
index bb3076b3a945e8..c30c4763dd46d5 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vwsll-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vwsll-vp.ll
@@ -13,10 +13,9 @@ declare <vscale x 2 x i64> @llvm.vp.shl.nxv2i64(<vscale x 2 x i64>, <vscale x 2
 define <vscale x 2 x i64> @vwsll_vv_nxv2i64_sext(<vscale x 2 x i32> %a, <vscale x 2 x i32> %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vv_nxv2i64_sext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a1, zero, e64, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, a0, e64, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsext.vf2 v12, v9
-; CHECK-NEXT:    vsetvli zero, a0, e64, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -35,10 +34,9 @@ define <vscale x 2 x i64> @vwsll_vv_nxv2i64_sext(<vscale x 2 x i32> %a, <vscale
 define <vscale x 2 x i64> @vwsll_vv_nxv2i64_zext(<vscale x 2 x i32> %a, <vscale x 2 x i32> %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vv_nxv2i64_zext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a1, zero, e64, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, a0, e64, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vzext.vf2 v12, v9
-; CHECK-NEXT:    vsetvli zero, a0, e64, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -57,17 +55,15 @@ define <vscale x 2 x i64> @vwsll_vv_nxv2i64_zext(<vscale x 2 x i32> %a, <vscale
 define <vscale x 2 x i64> @vwsll_vx_i64_nxv2i64(<vscale x 2 x i32> %a, i64 %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
 ; CHECK-RV32-LABEL: vwsll_vx_i64_nxv2i64:
 ; CHECK-RV32:       # %bb.0:
-; CHECK-RV32-NEXT:    vsetvli a1, zero, e64, m2, ta, ma
-; CHECK-RV32-NEXT:    vzext.vf2 v10, v8
 ; CHECK-RV32-NEXT:    vsetvli zero, a2, e64, m2, ta, ma
+; CHECK-RV32-NEXT:    vzext.vf2 v10, v8
 ; CHECK-RV32-NEXT:    vsll.vx v8, v10, a0, v0.t
 ; CHECK-RV32-NEXT:    ret
 ;
 ; CHECK-RV64-LABEL: vwsll_vx_i64_nxv2i64:
 ; CHECK-RV64:       # %bb.0:
-; CHECK-RV64-NEXT:    vsetvli a2, zero, e64, m2, ta, ma
-; CHECK-RV64-NEXT:    vzext.vf2 v10, v8
 ; CHECK-RV64-NEXT:    vsetvli zero, a1, e64, m2, ta, ma
+; CHECK-RV64-NEXT:    vzext.vf2 v10, v8
 ; CHECK-RV64-NEXT:    vsll.vx v8, v10, a0, v0.t
 ; CHECK-RV64-NEXT:    ret
 ;
@@ -94,12 +90,11 @@ define <vscale x 2 x i64> @vwsll_vx_i64_nxv2i64(<vscale x 2 x i32> %a, i64 %b, <
 define <vscale x 2 x i64> @vwsll_vx_i32_nxv2i64_sext(<vscale x 2 x i32> %a, i32 %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vx_i32_nxv2i64_sext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e32, m1, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e32, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, zero, e64, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsext.vf2 v12, v9
-; CHECK-NEXT:    vsetvli zero, a1, e64, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -120,12 +115,11 @@ define <vscale x 2 x i64> @vwsll_vx_i32_nxv2i64_sext(<vscale x 2 x i32> %a, i32
 define <vscale x 2 x i64> @vwsll_vx_i32_nxv2i64_zext(<vscale x 2 x i32> %a, i32 %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vx_i32_nxv2i64_zext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e32, m1, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e32, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, zero, e64, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vzext.vf2 v12, v9
-; CHECK-NEXT:    vsetvli zero, a1, e64, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -146,12 +140,11 @@ define <vscale x 2 x i64> @vwsll_vx_i32_nxv2i64_zext(<vscale x 2 x i32> %a, i32
 define <vscale x 2 x i64> @vwsll_vx_i16_nxv2i64_sext(<vscale x 2 x i32> %a, i16 %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vx_i16_nxv2i64_sext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e16, mf2, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, zero, e64, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsext.vf4 v12, v9
-; CHECK-NEXT:    vsetvli zero, a1, e64, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -172,12 +165,11 @@ define <vscale x 2 x i64> @vwsll_vx_i16_nxv2i64_sext(<vscale x 2 x i32> %a, i16
 define <vscale x 2 x i64> @vwsll_vx_i16_nxv2i64_zext(<vscale x 2 x i32> %a, i16 %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vx_i16_nxv2i64_zext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e16, mf2, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, zero, e64, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vzext.vf4 v12, v9
-; CHECK-NEXT:    vsetvli zero, a1, e64, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -198,12 +190,11 @@ define <vscale x 2 x i64> @vwsll_vx_i16_nxv2i64_zext(<vscale x 2 x i32> %a, i16
 define <vscale x 2 x i64> @vwsll_vx_i8_nxv2i64_sext(<vscale x 2 x i32> %a, i8 %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vx_i8_nxv2i64_sext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e8, mf4, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e8, mf4, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, zero, e64, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsext.vf8 v12, v9
-; CHECK-NEXT:    vsetvli zero, a1, e64, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -224,12 +215,11 @@ define <vscale x 2 x i64> @vwsll_vx_i8_nxv2i64_sext(<vscale x 2 x i32> %a, i8 %b
 define <vscale x 2 x i64> @vwsll_vx_i8_nxv2i64_zext(<vscale x 2 x i32> %a, i8 %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vx_i8_nxv2i64_zext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e8, mf4, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e8, mf4, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, zero, e64, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vzext.vf8 v12, v9
-; CHECK-NEXT:    vsetvli zero, a1, e64, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -250,9 +240,8 @@ define <vscale x 2 x i64> @vwsll_vx_i8_nxv2i64_zext(<vscale x 2 x i32> %a, i8 %b
 define <vscale x 2 x i64> @vwsll_vi_nxv2i64(<vscale x 2 x i32> %a, <vscale x 2 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vi_nxv2i64:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a1, zero, e64, m2, ta, ma
-; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsetvli zero, a0, e64, m2, ta, ma
+; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsll.vi v8, v10, 2, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -276,10 +265,9 @@ declare <vscale x 4 x i32> @llvm.vp.shl.nxv4i32(<vscale x 4 x i32>, <vscale x 4
 define <vscale x 4 x i32> @vwsll_vv_nxv4i32_sext(<vscale x 4 x i16> %a, <vscale x 4 x i16> %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vv_nxv4i32_sext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsext.vf2 v12, v9
-; CHECK-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -298,10 +286,9 @@ define <vscale x 4 x i32> @vwsll_vv_nxv4i32_sext(<vscale x 4 x i16> %a, <vscale
 define <vscale x 4 x i32> @vwsll_vv_nxv4i32_zext(<vscale x 4 x i16> %a, <vscale x 4 x i16> %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vv_nxv4i32_zext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vzext.vf2 v12, v9
-; CHECK-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -320,17 +307,15 @@ define <vscale x 4 x i32> @vwsll_vv_nxv4i32_zext(<vscale x 4 x i16> %a, <vscale
 define <vscale x 4 x i32> @vwsll_vx_i64_nxv4i32(<vscale x 4 x i16> %a, i64 %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
 ; CHECK-RV32-LABEL: vwsll_vx_i64_nxv4i32:
 ; CHECK-RV32:       # %bb.0:
-; CHECK-RV32-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
-; CHECK-RV32-NEXT:    vzext.vf2 v10, v8
 ; CHECK-RV32-NEXT:    vsetvli zero, a2, e32, m2, ta, ma
+; CHECK-RV32-NEXT:    vzext.vf2 v10, v8
 ; CHECK-RV32-NEXT:    vsll.vx v8, v10, a0, v0.t
 ; CHECK-RV32-NEXT:    ret
 ;
 ; CHECK-RV64-LABEL: vwsll_vx_i64_nxv4i32:
 ; CHECK-RV64:       # %bb.0:
-; CHECK-RV64-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
-; CHECK-RV64-NEXT:    vzext.vf2 v10, v8
 ; CHECK-RV64-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-RV64-NEXT:    vzext.vf2 v10, v8
 ; CHECK-RV64-NEXT:    vsll.vx v8, v10, a0, v0.t
 ; CHECK-RV64-NEXT:    ret
 ;
@@ -358,9 +343,8 @@ define <vscale x 4 x i32> @vwsll_vx_i64_nxv4i32(<vscale x 4 x i16> %a, i64 %b, <
 define <vscale x 4 x i32> @vwsll_vx_i32_nxv4i32(<vscale x 4 x i16> %a, i32 %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vx_i32_nxv4i32:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
-; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsll.vx v8, v10, a0, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -380,12 +364,11 @@ define <vscale x 4 x i32> @vwsll_vx_i32_nxv4i32(<vscale x 4 x i16> %a, i32 %b, <
 define <vscale x 4 x i32> @vwsll_vx_i16_nxv4i32_sext(<vscale x 4 x i16> %a, i16 %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vx_i16_nxv4i32_sext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e16, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsext.vf2 v12, v9
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -406,12 +389,11 @@ define <vscale x 4 x i32> @vwsll_vx_i16_nxv4i32_sext(<vscale x 4 x i16> %a, i16
 define <vscale x 4 x i32> @vwsll_vx_i16_nxv4i32_zext(<vscale x 4 x i16> %a, i16 %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vx_i16_nxv4i32_zext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e16, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vzext.vf2 v12, v9
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -432,12 +414,11 @@ define <vscale x 4 x i32> @vwsll_vx_i16_nxv4i32_zext(<vscale x 4 x i16> %a, i16
 define <vscale x 4 x i32> @vwsll_vx_i8_nxv4i32_sext(<vscale x 4 x i16> %a, i8 %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vx_i8_nxv4i32_sext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e8, mf2, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e8, mf2, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsext.vf4 v12, v9
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -458,12 +439,11 @@ define <vscale x 4 x i32> @vwsll_vx_i8_nxv4i32_sext(<vscale x 4 x i16> %a, i8 %b
 define <vscale x 4 x i32> @vwsll_vx_i8_nxv4i32_zext(<vscale x 4 x i16> %a, i8 %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vx_i8_nxv4i32_zext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e8, mf2, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e8, mf2, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vzext.vf4 v12, v9
-; CHECK-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -484,9 +464,8 @@ define <vscale x 4 x i32> @vwsll_vx_i8_nxv4i32_zext(<vscale x 4 x i16> %a, i8 %b
 define <vscale x 4 x i32> @vwsll_vi_nxv4i32(<vscale x 4 x i16> %a, <vscale x 4 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vi_nxv4i32:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
-; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsll.vi v8, v10, 2, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -511,10 +490,9 @@ declare <vscale x 8 x i16> @llvm.vp.shl.nxv8i16(<vscale x 8 x i16>, <vscale x 8
 define <vscale x 8 x i16> @vwsll_vv_nxv8i16_sext(<vscale x 8 x i8> %a, <vscale x 8 x i8> %b, <vscale x 8 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vv_nxv8i16_sext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a1, zero, e16, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsext.vf2 v12, v9
-; CHECK-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -533,10 +511,9 @@ define <vscale x 8 x i16> @vwsll_vv_nxv8i16_sext(<vscale x 8 x i8> %a, <vscale x
 define <vscale x 8 x i16> @vwsll_vv_nxv8i16_zext(<vscale x 8 x i8> %a, <vscale x 8 x i8> %b, <vscale x 8 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vv_nxv8i16_zext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a1, zero, e16, m2, ta, ma
+; CHECK-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vzext.vf2 v12, v9
-; CHECK-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -555,17 +532,15 @@ define <vscale x 8 x i16> @vwsll_vv_nxv8i16_zext(<vscale x 8 x i8> %a, <vscale x
 define <vscale x 8 x i16> @vwsll_vx_i64_nxv8i16(<vscale x 8 x i8> %a, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %vl) {
 ; CHECK-RV32-LABEL: vwsll_vx_i64_nxv8i16:
 ; CHECK-RV32:       # %bb.0:
-; CHECK-RV32-NEXT:    vsetvli a1, zero, e16, m2, ta, ma
-; CHECK-RV32-NEXT:    vzext.vf2 v10, v8
 ; CHECK-RV32-NEXT:    vsetvli zero, a2, e16, m2, ta, ma
+; CHECK-RV32-NEXT:    vzext.vf2 v10, v8
 ; CHECK-RV32-NEXT:    vsll.vx v8, v10, a0, v0.t
 ; CHECK-RV32-NEXT:    ret
 ;
 ; CHECK-RV64-LABEL: vwsll_vx_i64_nxv8i16:
 ; CHECK-RV64:       # %bb.0:
-; CHECK-RV64-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; CHECK-RV64-NEXT:    vzext.vf2 v10, v8
 ; CHECK-RV64-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; CHECK-RV64-NEXT:    vzext.vf2 v10, v8
 ; CHECK-RV64-NEXT:    vsll.vx v8, v10, a0, v0.t
 ; CHECK-RV64-NEXT:    ret
 ;
@@ -593,9 +568,8 @@ define <vscale x 8 x i16> @vwsll_vx_i64_nxv8i16(<vscale x 8 x i8> %a, i64 %b, <v
 define <vscale x 8 x i16> @vwsll_vx_i32_nxv8i16(<vscale x 8 x i8> %a, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vx_i32_nxv8i16:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsll.vx v8, v10, a0, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -616,9 +590,8 @@ define <vscale x 8 x i16> @vwsll_vx_i32_nxv8i16(<vscale x 8 x i8> %a, i32 %b, <v
 define <vscale x 8 x i16> @vwsll_vx_i16_nxv8i16(<vscale x 8 x i8> %a, i16 %b, <vscale x 8 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vx_i16_nxv8i16:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
-; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
+; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsll.vx v8, v10, a0, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -638,12 +611,11 @@ define <vscale x 8 x i16> @vwsll_vx_i16_nxv8i16(<vscale x 8 x i8> %a, i16 %b, <v
 define <vscale x 8 x i16> @vwsll_vx_i8_nxv8i16_sext(<vscale x 8 x i8> %a, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vx_i8_nxv8i16_sext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsext.vf2 v12, v9
-; CHECK-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -664,12 +636,11 @@ define <vscale x 8 x i16> @vwsll_vx_i8_nxv8i16_sext(<vscale x 8 x i8> %a, i8 %b,
 define <vscale x 8 x i16> @vwsll_vx_i8_nxv8i16_zext(<vscale x 8 x i8> %a, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vx_i8_nxv8i16_zext:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a2, zero, e8, m1, ta, ma
+; CHECK-NEXT:    vsetvli zero, a1, e8, m1, ta, ma
 ; CHECK-NEXT:    vmv.v.x v9, a0
 ; CHECK-NEXT:    vsetvli zero, zero, e16, m2, ta, ma
 ; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vzext.vf2 v12, v9
-; CHECK-NEXT:    vsetvli zero, a1, e16, m2, ta, ma
 ; CHECK-NEXT:    vsll.vv v8, v10, v12, v0.t
 ; CHECK-NEXT:    ret
 ;
@@ -690,9 +661,8 @@ define <vscale x 8 x i16> @vwsll_vx_i8_nxv8i16_zext(<vscale x 8 x i8> %a, i8 %b,
 define <vscale x 8 x i16> @vwsll_vi_nxv8i16(<vscale x 8 x i8> %a, <vscale x 8 x i1> %m, i32 zeroext %vl) {
 ; CHECK-LABEL: vwsll_vi_nxv8i16:
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    vsetvli a1, zero, e16, m2, ta, ma
-; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
+; CHECK-NEXT:    vzext.vf2 v10, v8
 ; CHECK-NEXT:    vsll.vi v8, v10, 2, v0.t
 ; CHECK-NEXT:    ret
 ;

>From eca0a1d736ec756fd999e41714c8e1742a1f420b Mon Sep 17 00:00:00 2001
From: Michael Maitland <michaeltmaitland at gmail.com>
Date: Fri, 13 Sep 2024 14:10:56 -0700
Subject: [PATCH 02/12] fixup! clang-format

---
 llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index ae23d5dda5eb04..63e32d8e870e27 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -39,7 +39,7 @@ class RISCVVLOptimizer : public MachineFunctionPass {
 public:
   static char ID;
 
-  RISCVVLOptimizer() : MachineFunctionPass(ID) { }
+  RISCVVLOptimizer() : MachineFunctionPass(ID) {}
 
   bool runOnMachineFunction(MachineFunction &MF) override;
 

>From 6335561ff832e4d3c03c90adeae88f0640cf6adf Mon Sep 17 00:00:00 2001
From: Michael Maitland <michaeltmaitland at gmail.com>
Date: Tue, 17 Sep 2024 09:30:58 -0700
Subject: [PATCH 03/12] fixup! respond to some comments

---
 llvm/lib/Target/RISCV/RISCVTargetMachine.cpp |   2 +-
 llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp   | 110 ++++++++------
 llvm/test/CodeGen/RISCV/rvv/vfma-vp.ll       | 144 +++++++------------
 3 files changed, 114 insertions(+), 142 deletions(-)

diff --git a/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp b/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
index 80c9d6f8e04657..108adba3691508 100644
--- a/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
+++ b/llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
@@ -103,7 +103,7 @@ static cl::opt<bool> EnableVSETVLIAfterRVVRegAlloc(
     cl::desc("Insert vsetvls after vector register allocation"),
     cl::init(true));
 
-static cl::opt<bool> EnableVLOptimizer("riscv-enable-vloptimizer",
+static cl::opt<bool> EnableVLOptimizer("riscv-enable-vl-optimizer",
                                        cl::desc("Enable the VL Optimizer pass"),
                                        cl::init(true), cl::Hidden);
 
diff --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index 63e32d8e870e27..36910f818ea249 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -29,6 +29,7 @@
 using namespace llvm;
 
 #define DEBUG_TYPE "riscv-vl-optimizer"
+#define PASS_NAME "RISC-V VL Optimizer"
 
 namespace {
 
@@ -49,7 +50,7 @@ class RISCVVLOptimizer : public MachineFunctionPass {
     MachineFunctionPass::getAnalysisUsage(AU);
   }
 
-  StringRef getPassName() const override { return "RISC-V VL Optimizer"; }
+  StringRef getPassName() const override { return PASS_NAME; }
 
 private:
   bool tryReduceVL(MachineInstr &MI);
@@ -59,11 +60,9 @@ class RISCVVLOptimizer : public MachineFunctionPass {
 } // end anonymous namespace
 
 char RISCVVLOptimizer::ID = 0;
-INITIALIZE_PASS_BEGIN(RISCVVLOptimizer, DEBUG_TYPE, "RISC-V VL Optimizer",
-                      false, false)
+INITIALIZE_PASS_BEGIN(RISCVVLOptimizer, DEBUG_TYPE, PASS_NAME, false, false)
 INITIALIZE_PASS_DEPENDENCY(MachineDominatorTreeWrapperPass)
-INITIALIZE_PASS_END(RISCVVLOptimizer, DEBUG_TYPE, "RISC-V VL Optimizer", false,
-                    false)
+INITIALIZE_PASS_END(RISCVVLOptimizer, DEBUG_TYPE, PASS_NAME, false, false)
 
 FunctionPass *llvm::createRISCVVLOptimizerPass() {
   return new RISCVVLOptimizer();
@@ -74,10 +73,7 @@ static bool isVectorRegClass(Register R, const MachineRegisterInfo *MRI) {
   if (R.isPhysical())
     return RISCV::VRRegClass.contains(R);
   const TargetRegisterClass *RC = MRI->getRegClass(R);
-  return RISCV::VRRegClass.hasSubClassEq(RC) ||
-         RISCV::VRM2RegClass.hasSubClassEq(RC) ||
-         RISCV::VRM4RegClass.hasSubClassEq(RC) ||
-         RISCV::VRM8RegClass.hasSubClassEq(RC);
+  return RISCVRI::isVRegClass(RC->TSFlags);
 }
 
 /// Represents the EMUL and EEW of a MachineOperand.
@@ -134,6 +130,8 @@ static raw_ostream &operator<<(raw_ostream &OS, const OperandInfo &OI) {
   return OS;
 }
 
+namespace llvm {
+namespace RISCVVType {
 /// Return the RISCVII::VLMUL that is two times VLMul.
 /// Precondition: VLMul is not LMUL_RESERVED or LMUL_8.
 static RISCVII::VLMUL twoTimesVLMUL(RISCVII::VLMUL VLMul) {
@@ -198,6 +196,8 @@ getEMULEqualsEEWDivSEWTimesLMUL(unsigned Log2EEW, const MachineInstr &MI) {
   Denom = MILMULIsFractional ? Denom * MILMUL / GCD : Denom / GCD;
   return std::make_pair(Num > Denom ? Num : Denom, Denom > Num);
 }
+} // end namespace RISCVVType
+} // end namespace llvm
 
 static bool isOpN(const MachineOperand &MO, unsigned OpN) {
   const MachineInstr &MI = *MO.getParent();
@@ -229,7 +229,8 @@ static OperandInfo getIndexSegmentLoadStoreOperandInfo(unsigned Log2EEW,
   // v.*seg<nf>ei<eeew>.v
   // Index vector register group has EEW=<eew>, EMUL=(EEW/SEW)*LMUL.
   if (isOpN(MO, 2))
-    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(Log2EEW, MI), Log2EEW);
+    return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(Log2EEW, MI),
+                       Log2EEW);
 
   llvm_unreachable("Could not get OperandInfo for non-vector register of an "
                    "indexed segment load or store instruction");
@@ -251,7 +252,8 @@ static OperandInfo getIntegerExtensionOperandInfo(unsigned Factor,
   unsigned EEW = MISEW / Factor;
   unsigned Log2EEW = Log2_32(EEW);
 
-  return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(Log2EEW, MI), Log2EEW);
+  return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(Log2EEW, MI),
+                     Log2EEW);
 }
 
 /// Check whether MO is a mask operand of MI.
@@ -296,7 +298,7 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
 
   // All mask operands have EEW=1, EMUL=(EEW/SEW)*LMUL
   if (isMaskOperand(MI, MO, MRI))
-    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
+    return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
 
   // switch against BaseInstr to reduce number of cases that need to be
   // considered.
@@ -322,25 +324,25 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VLSE8_V:
   case RISCV::VSSE8_V:
   case RISCV::VLE8FF_V:
-    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(3, MI), 3);
+    return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(3, MI), 3);
   case RISCV::VLE16_V:
   case RISCV::VSE16_V:
   case RISCV::VLSE16_V:
   case RISCV::VSSE16_V:
   case RISCV::VLE16FF_V:
-    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(4, MI), 4);
+    return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(4, MI), 4);
   case RISCV::VLE32_V:
   case RISCV::VSE32_V:
   case RISCV::VLSE32_V:
   case RISCV::VSSE32_V:
   case RISCV::VLE32FF_V:
-    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(5, MI), 5);
+    return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(5, MI), 5);
   case RISCV::VLE64_V:
   case RISCV::VSE64_V:
   case RISCV::VLSE64_V:
   case RISCV::VSSE64_V:
   case RISCV::VLE64FF_V:
-    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(6, MI), 6);
+    return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(6, MI), 6);
 
   // 7.6. Vector Indexed Instructions
   // Data EEW=SEW, EMUL=LMUL. Index EEW=<eew> and EMUL=(EEW/SEW)*LMUL
@@ -350,28 +352,28 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VSOXEI8_V:
     if (MO.getOperandNo() == 0)
       return OperandInfo(MIVLMul, MILog2SEW);
-    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(3, MI), 3);
+    return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(3, MI), 3);
   case RISCV::VLUXEI16_V:
   case RISCV::VLOXEI16_V:
   case RISCV::VSUXEI16_V:
   case RISCV::VSOXEI16_V:
     if (MO.getOperandNo() == 0)
       return OperandInfo(MIVLMul, MILog2SEW);
-    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(4, MI), 4);
+    return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(4, MI), 4);
   case RISCV::VLUXEI32_V:
   case RISCV::VLOXEI32_V:
   case RISCV::VSUXEI32_V:
   case RISCV::VSOXEI32_V:
     if (MO.getOperandNo() == 0)
       return OperandInfo(MIVLMul, MILog2SEW);
-    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(5, MI), 5);
+    return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(5, MI), 5);
   case RISCV::VLUXEI64_V:
   case RISCV::VLOXEI64_V:
   case RISCV::VSUXEI64_V:
   case RISCV::VSOXEI64_V:
     if (MO.getOperandNo() == 0)
       return OperandInfo(MIVLMul, MILog2SEW);
-    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(6, MI), 6);
+    return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(6, MI), 6);
 
   // 7.8. Vector Load/Store Segment Instructions
   // 7.8.1. Vector Unit-Stride Segment Loads and Stores
@@ -707,7 +709,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VWSUB_VX:
   case RISCV::VWSLL_VI: {
     unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL = IsMODef ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    RISCVII::VLMUL EMUL =
+        IsMODef ? RISCVVType::twoTimesVLMUL(MIVLMul) : MIVLMul;
     return OperandInfo(EMUL, Log2EEW);
   }
   // Def and Op1 uses EEW=2*SEW and EMUL=2*LMUL. Op2 uses EEW=SEW and EMUL=LMUL
@@ -721,7 +724,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VWSUB_WX: {
     bool TwoTimes = IsMODef || IsOp1;
     unsigned Log2EEW = TwoTimes ? MILog2SEW + 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL = TwoTimes ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    RISCVII::VLMUL EMUL =
+        TwoTimes ? RISCVVType::twoTimesVLMUL(MIVLMul) : MIVLMul;
     return OperandInfo(EMUL, Log2EEW);
   }
   // 11.3. Vector Integer Extension
@@ -743,7 +747,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VSBC_VVM:
   case RISCV::VSBC_VXM:
     return MO.getOperandNo() == 3
-               ? OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0)
+               ? OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(0, MI),
+                             0)
                : OperandInfo(MIVLMul, MILog2SEW);
   // Dest EEW=1 and EMUL=(EEW/SEW)*LMUL. Source EEW=SEW and EMUL=LMUL. Mask
   // operand EEW=1 and EMUL=(EEW/SEW)*LMUL
@@ -753,7 +758,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VMSBC_VVM:
   case RISCV::VMSBC_VXM:
     return IsMODef || MO.getOperandNo() == 3
-               ? OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0)
+               ? OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(0, MI),
+                             0)
                : OperandInfo(MIVLMul, MILog2SEW);
   // Dest EEW=1 and EMUL=(EEW/SEW)*LMUL. Source EEW=SEW and EMUL=LMUL.
   case RISCV::VMADC_VV:
@@ -761,7 +767,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VMADC_VX:
   case RISCV::VMSBC_VV:
   case RISCV::VMSBC_VX:
-    return IsMODef ? OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0)
+    return IsMODef ? OperandInfo(
+                         RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0)
                    : OperandInfo(MIVLMul, MILog2SEW);
 
   // 11.5. Vector Bitwise Logical Instructions
@@ -798,7 +805,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VNSRA_WX: {
     bool TwoTimes = IsOp1;
     unsigned Log2EEW = TwoTimes ? MILog2SEW + 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL = TwoTimes ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    RISCVII::VLMUL EMUL =
+        TwoTimes ? RISCVVType::twoTimesVLMUL(MIVLMul) : MIVLMul;
     return OperandInfo(EMUL, Log2EEW);
   }
   // 11.8. Vector Integer Compare Instructions
@@ -824,7 +832,7 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VMSGT_VI:
   case RISCV::VMSGT_VX:
     if (IsMODef)
-      return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
+      return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
     return OperandInfo(MIVLMul, MILog2SEW);
 
   // 11.9. Vector Integer Min/Max Instructions
@@ -872,7 +880,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VWMULU_VV:
   case RISCV::VWMULU_VX: {
     unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL = IsMODef ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    RISCVII::VLMUL EMUL =
+        IsMODef ? RISCVVType::twoTimesVLMUL(MIVLMul) : MIVLMul;
     return OperandInfo(EMUL, Log2EEW);
   }
   // 11.13. Vector Single-Width Integer Multiply-Add Instructions
@@ -902,7 +911,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
     // due to SSA.
     bool TwoTimes = IsMODef || IsOp1;
     unsigned Log2EEW = TwoTimes ? MILog2SEW + 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL = TwoTimes ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    RISCVII::VLMUL EMUL =
+        TwoTimes ? RISCVVType::twoTimesVLMUL(MIVLMul) : MIVLMul;
     return OperandInfo(EMUL, Log2EEW);
   }
   // 11.15. Vector Integer Merge Instructions
@@ -912,7 +922,7 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VMERGE_VVM:
   case RISCV::VMERGE_VXM:
     if (MO.getOperandNo() == 3)
-      return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
+      return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
     return OperandInfo(MIVLMul, MILog2SEW);
 
   // 11.16. Vector Integer Move Instructions
@@ -948,7 +958,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VSMUL_VV:
   case RISCV::VSMUL_VX: {
     unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL = IsMODef ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    RISCVII::VLMUL EMUL =
+        IsMODef ? RISCVVType::twoTimesVLMUL(MIVLMul) : MIVLMul;
     return OperandInfo(EMUL, Log2EEW);
   }
   // 12.4. Vector Single-Width Scaling Shift Instructions
@@ -971,7 +982,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VNCLIP_WX: {
     bool TwoTimes = !IsMODef && IsOp1;
     unsigned Log2EEW = TwoTimes ? MILog2SEW + 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL = TwoTimes ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    RISCVII::VLMUL EMUL =
+        TwoTimes ? RISCVVType::twoTimesVLMUL(MIVLMul) : MIVLMul;
     return OperandInfo(EMUL, Log2EEW);
   }
   // 13. Vector Floating-Point Instructions
@@ -991,7 +1003,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VFWSUB_VV:
   case RISCV::VFWSUB_VF: {
     unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL = IsMODef ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    RISCVII::VLMUL EMUL =
+        IsMODef ? RISCVVType::twoTimesVLMUL(MIVLMul) : MIVLMul;
     return OperandInfo(EMUL, Log2EEW);
   }
   // Dest and Op1 EEW=2*SEW and EMUL=2*LMUL. Op2 EEW=SEW and EMUL=LMUL.
@@ -1001,7 +1014,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VFWSUB_WV: {
     bool TwoTimes = IsMODef || IsOp1;
     unsigned Log2EEW = TwoTimes ? MILog2SEW + 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL = TwoTimes ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    RISCVII::VLMUL EMUL =
+        TwoTimes ? RISCVVType::twoTimesVLMUL(MIVLMul) : MIVLMul;
     return OperandInfo(EMUL, Log2EEW);
   }
   // 13.4. Vector Single-Width Floating-Point Multiply/Divide Instructions
@@ -1055,7 +1069,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
     // due to SSA.
     bool TwoTimes = IsMODef || IsOp1;
     unsigned Log2EEW = TwoTimes ? MILog2SEW + 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL = TwoTimes ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    RISCVII::VLMUL EMUL =
+        TwoTimes ? RISCVVType::twoTimesVLMUL(MIVLMul) : MIVLMul;
     return OperandInfo(EMUL, Log2EEW);
   }
   // 13.8. Vector Floating-Point Square-Root Instruction
@@ -1103,7 +1118,7 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VMFGT_VF:
   case RISCV::VMFGE_VF:
     if (IsMODef)
-      return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
+      return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
     return OperandInfo(MIVLMul, MILog2SEW);
 
   // 13.15. Vector Floating-Point Merge Instruction
@@ -1111,7 +1126,7 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   // (EEW/SEW)*LMUL.
   case RISCV::VFMERGE_VFM:
     if (IsOp3)
-      return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
+      return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
     return OperandInfo(MIVLMul, MILog2SEW);
 
   // 13.18. Widening Floating-Point/Integer Type-Convert Instructions
@@ -1124,7 +1139,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VFWCVT_F_X_V:
   case RISCV::VFWCVT_F_F_V: {
     unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL = IsMODef ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    RISCVII::VLMUL EMUL =
+        IsMODef ? RISCVVType::twoTimesVLMUL(MIVLMul) : MIVLMul;
     return OperandInfo(EMUL, Log2EEW);
   }
   // 13.19. Narrowing Floating-Point/Integer Type-Convert Instructions
@@ -1138,7 +1154,7 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VFNCVT_F_F_W:
   case RISCV::VFNCVT_ROD_F_F_W: {
     unsigned Log2EEW = IsMODef ? MILog2SEW - 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL = IsMODef ? halfVLMUL(MIVLMul) : MIVLMul;
+    RISCVII::VLMUL EMUL = IsMODef ? RISCVVType::halfVLMUL(MIVLMul) : MIVLMul;
     return OperandInfo(EMUL, Log2EEW);
   }
   // 14. Vector Reduction Operations
@@ -1164,7 +1180,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VWREDSUM_VS:
   case RISCV::VWREDSUMU_VS: {
     unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL = IsMODef ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    RISCVII::VLMUL EMUL =
+        IsMODef ? RISCVVType::twoTimesVLMUL(MIVLMul) : MIVLMul;
     return OperandInfo(EMUL, Log2EEW);
   }
   // 14.3. Vector Single-Width Floating-Point Reduction Instructions
@@ -1180,7 +1197,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VFWREDOSUM_VS:
   case RISCV::VFWREDUSUM_VS: {
     unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL = IsMODef ? twoTimesVLMUL(MIVLMul) : MIVLMul;
+    RISCVII::VLMUL EMUL =
+        IsMODef ? RISCVVType::twoTimesVLMUL(MIVLMul) : MIVLMul;
     return OperandInfo(EMUL, Log2EEW);
   }
 
@@ -1203,7 +1221,7 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VMSBF_M:
   case RISCV::VMSIF_M:
   case RISCV::VMSOF_M: {
-    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
+    return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(0, MI), 0);
   }
   // 15.8. Vector Iota Instruction
   // Dest and Op1 EEW=SEW and EMUL=LMUL. Op2 EEW=1 and EMUL(EEW/SEW)*LMUL.
@@ -1212,7 +1230,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
     unsigned Log2EEW = IsDefOrOp1 ? 0 : MILog2SEW;
     if (IsDefOrOp1)
       return OperandInfo(MIVLMul, Log2EEW);
-    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(MILog2SEW, MI), Log2EEW);
+    return OperandInfo(
+        RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(MILog2SEW, MI), Log2EEW);
   }
   // 15.9. Vector Element Index Instruction
   // Dest EEW=SEW EMUL=LMUL. Mask Operand EEW=1 and EMUL(EEW/SEW)*LMUL.
@@ -1220,7 +1239,8 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
     unsigned Log2EEW = IsMODef ? MILog2SEW : 0;
     if (IsMODef)
       return OperandInfo(MIVLMul, Log2EEW);
-    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(Log2EEW, MI), Log2EEW);
+    return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(Log2EEW, MI),
+                       Log2EEW);
   }
   // 16. Vector Permutation Instructions
   // 16.1. Integer Scalar Move Instructions
@@ -1255,7 +1275,7 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VRGATHEREI16_VV: {
     if (IsMODef || IsOp2)
       return OperandInfo(MIVLMul, MILog2SEW);
-    return OperandInfo(getEMULEqualsEEWDivSEWTimesLMUL(4, MI), 4);
+    return OperandInfo(RISCVVType::getEMULEqualsEEWDivSEWTimesLMUL(4, MI), 4);
   }
   // 16.5. Vector Compress Instruction
   // EMUL=LMUL. EEW=SEW.
diff --git a/llvm/test/CodeGen/RISCV/rvv/vfma-vp.ll b/llvm/test/CodeGen/RISCV/rvv/vfma-vp.ll
index b6bb0371121b4f..8ffceb84f53a61 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vfma-vp.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vfma-vp.ll
@@ -2847,10 +2847,9 @@ define <vscale x 1 x half> @vfnmadd_vf_nxv1f16_neg_splat(<vscale x 1 x half> %va
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv1f16_neg_splat:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1, v0.t
 ; ZVFHMIN-NEXT:    vxor.vx v9, v9, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf4, ta, ma
@@ -2880,10 +2879,9 @@ define <vscale x 1 x half> @vfnmadd_vf_nxv1f16_neg_splat_commute(<vscale x 1 x h
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv1f16_neg_splat_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1, v0.t
 ; ZVFHMIN-NEXT:    vxor.vx v9, v9, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf4, ta, ma
@@ -2913,10 +2911,9 @@ define <vscale x 1 x half> @vfnmadd_vf_nxv1f16_neg_splat_unmasked(<vscale x 1 x
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv1f16_neg_splat_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1
 ; ZVFHMIN-NEXT:    vxor.vx v9, v9, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf4, ta, ma
@@ -2946,10 +2943,9 @@ define <vscale x 1 x half> @vfnmadd_vf_nxv1f16_neg_splat_unmasked_commute(<vscal
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv1f16_neg_splat_unmasked_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1
 ; ZVFHMIN-NEXT:    vxor.vx v9, v9, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf4, ta, ma
@@ -3216,10 +3212,9 @@ define <vscale x 1 x half> @vfnmsub_vf_nxv1f16_neg_splat(<vscale x 1 x half> %va
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv1f16_neg_splat:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v10
@@ -3247,10 +3242,9 @@ define <vscale x 1 x half> @vfnmsub_vf_nxv1f16_neg_splat_commute(<vscale x 1 x h
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv1f16_neg_splat_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v10
@@ -3278,10 +3272,9 @@ define <vscale x 1 x half> @vfnmsub_vf_nxv1f16_neg_splat_unmasked(<vscale x 1 x
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv1f16_neg_splat_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v10
@@ -3309,10 +3302,9 @@ define <vscale x 1 x half> @vfnmsub_vf_nxv1f16_neg_splat_unmasked_commute(<vscal
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv1f16_neg_splat_unmasked_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf4, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v10
@@ -3764,10 +3756,9 @@ define <vscale x 2 x half> @vfnmadd_vf_nxv2f16_neg_splat(<vscale x 2 x half> %va
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv2f16_neg_splat:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1, v0.t
 ; ZVFHMIN-NEXT:    vxor.vx v9, v9, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf2, ta, ma
@@ -3797,10 +3788,9 @@ define <vscale x 2 x half> @vfnmadd_vf_nxv2f16_neg_splat_commute(<vscale x 2 x h
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv2f16_neg_splat_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1, v0.t
 ; ZVFHMIN-NEXT:    vxor.vx v9, v9, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf2, ta, ma
@@ -3830,10 +3820,9 @@ define <vscale x 2 x half> @vfnmadd_vf_nxv2f16_neg_splat_unmasked(<vscale x 2 x
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv2f16_neg_splat_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1
 ; ZVFHMIN-NEXT:    vxor.vx v9, v9, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf2, ta, ma
@@ -3863,10 +3852,9 @@ define <vscale x 2 x half> @vfnmadd_vf_nxv2f16_neg_splat_unmasked_commute(<vscal
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv2f16_neg_splat_unmasked_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1
 ; ZVFHMIN-NEXT:    vxor.vx v9, v9, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf2, ta, ma
@@ -4133,10 +4121,9 @@ define <vscale x 2 x half> @vfnmsub_vf_nxv2f16_neg_splat(<vscale x 2 x half> %va
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv2f16_neg_splat:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v10
@@ -4164,10 +4151,9 @@ define <vscale x 2 x half> @vfnmsub_vf_nxv2f16_neg_splat_commute(<vscale x 2 x h
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv2f16_neg_splat_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v10
@@ -4195,10 +4181,9 @@ define <vscale x 2 x half> @vfnmsub_vf_nxv2f16_neg_splat_unmasked(<vscale x 2 x
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv2f16_neg_splat_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v10
@@ -4226,10 +4211,9 @@ define <vscale x 2 x half> @vfnmsub_vf_nxv2f16_neg_splat_unmasked_commute(<vscal
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv2f16_neg_splat_unmasked_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, mf2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, mf2, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v11, v10
@@ -4681,10 +4665,9 @@ define <vscale x 4 x half> @vfnmadd_vf_nxv4f16_neg_splat(<vscale x 4 x half> %va
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv4f16_neg_splat:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1, v0.t
 ; ZVFHMIN-NEXT:    vxor.vx v9, v9, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m1, ta, ma
@@ -4714,10 +4697,9 @@ define <vscale x 4 x half> @vfnmadd_vf_nxv4f16_neg_splat_commute(<vscale x 4 x h
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv4f16_neg_splat_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1, v0.t
 ; ZVFHMIN-NEXT:    vxor.vx v9, v9, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m1, ta, ma
@@ -4747,10 +4729,9 @@ define <vscale x 4 x half> @vfnmadd_vf_nxv4f16_neg_splat_unmasked(<vscale x 4 x
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv4f16_neg_splat_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1
 ; ZVFHMIN-NEXT:    vxor.vx v9, v9, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m1, ta, ma
@@ -4780,10 +4761,9 @@ define <vscale x 4 x half> @vfnmadd_vf_nxv4f16_neg_splat_unmasked_commute(<vscal
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv4f16_neg_splat_unmasked_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1
 ; ZVFHMIN-NEXT:    vxor.vx v9, v9, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m1, ta, ma
@@ -5050,10 +5030,9 @@ define <vscale x 4 x half> @vfnmsub_vf_nxv4f16_neg_splat(<vscale x 4 x half> %va
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv4f16_neg_splat:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v12, v10
@@ -5081,10 +5060,9 @@ define <vscale x 4 x half> @vfnmsub_vf_nxv4f16_neg_splat_commute(<vscale x 4 x h
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv4f16_neg_splat_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v12, v10
@@ -5112,10 +5090,9 @@ define <vscale x 4 x half> @vfnmsub_vf_nxv4f16_neg_splat_unmasked(<vscale x 4 x
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv4f16_neg_splat_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v12, v10
@@ -5143,10 +5120,9 @@ define <vscale x 4 x half> @vfnmsub_vf_nxv4f16_neg_splat_unmasked_commute(<vscal
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv4f16_neg_splat_unmasked_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v10, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m1, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v12, v10
@@ -5598,10 +5574,9 @@ define <vscale x 8 x half> @vfnmadd_vf_nxv8f16_neg_splat(<vscale x 8 x half> %va
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv8f16_neg_splat:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v12, v12, a1, v0.t
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m2, ta, ma
@@ -5631,10 +5606,9 @@ define <vscale x 8 x half> @vfnmadd_vf_nxv8f16_neg_splat_commute(<vscale x 8 x h
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv8f16_neg_splat_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v12, v12, a1, v0.t
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m2, ta, ma
@@ -5664,10 +5638,9 @@ define <vscale x 8 x half> @vfnmadd_vf_nxv8f16_neg_splat_unmasked(<vscale x 8 x
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv8f16_neg_splat_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v12, v12, a1
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m2, ta, ma
@@ -5697,10 +5670,9 @@ define <vscale x 8 x half> @vfnmadd_vf_nxv8f16_neg_splat_unmasked_commute(<vscal
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv8f16_neg_splat_unmasked_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v12, v12, a1
 ; ZVFHMIN-NEXT:    vxor.vx v10, v10, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m2, ta, ma
@@ -5967,10 +5939,9 @@ define <vscale x 8 x half> @vfnmsub_vf_nxv8f16_neg_splat(<vscale x 8 x half> %va
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv8f16_neg_splat:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v12, v12, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v16, v12
@@ -5998,10 +5969,9 @@ define <vscale x 8 x half> @vfnmsub_vf_nxv8f16_neg_splat_commute(<vscale x 8 x h
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv8f16_neg_splat_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v12, v12, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v16, v12
@@ -6029,10 +5999,9 @@ define <vscale x 8 x half> @vfnmsub_vf_nxv8f16_neg_splat_unmasked(<vscale x 8 x
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv8f16_neg_splat_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v12, v12, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v16, v12
@@ -6060,10 +6029,9 @@ define <vscale x 8 x half> @vfnmsub_vf_nxv8f16_neg_splat_unmasked_commute(<vscal
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv8f16_neg_splat_unmasked_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m2, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v12, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v12, v12, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m2, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v16, v12
@@ -6609,10 +6577,9 @@ define <vscale x 16 x half> @vfnmadd_vf_nxv16f16_neg_splat(<vscale x 16 x half>
 ; ZVFHMIN-NEXT:    addi a1, sp, 16
 ; ZVFHMIN-NEXT:    vs4r.v v8, (a1) # Unknown-size Folded Spill
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v4, v16, a1, v0.t
 ; ZVFHMIN-NEXT:    vxor.vx v12, v12, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m4, ta, ma
@@ -6649,10 +6616,9 @@ define <vscale x 16 x half> @vfnmadd_vf_nxv16f16_neg_splat_commute(<vscale x 16
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    vmv4r.v v4, v8
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v16, v16, a1, v0.t
 ; ZVFHMIN-NEXT:    vxor.vx v12, v12, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m4, ta, ma
@@ -6682,10 +6648,9 @@ define <vscale x 16 x half> @vfnmadd_vf_nxv16f16_neg_splat_unmasked(<vscale x 16
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv16f16_neg_splat_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v16, v16, a1
 ; ZVFHMIN-NEXT:    vxor.vx v12, v12, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m4, ta, ma
@@ -6715,10 +6680,9 @@ define <vscale x 16 x half> @vfnmadd_vf_nxv16f16_neg_splat_unmasked_commute(<vsc
 ; ZVFHMIN-LABEL: vfnmadd_vf_nxv16f16_neg_splat_unmasked_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v16, v16, a1
 ; ZVFHMIN-NEXT:    vxor.vx v12, v12, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m4, ta, ma
@@ -7029,10 +6993,9 @@ define <vscale x 16 x half> @vfnmsub_vf_nxv16f16_neg_splat(<vscale x 16 x half>
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    vmv4r.v v4, v8
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v16, v16, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v24, v16
@@ -7062,10 +7025,9 @@ define <vscale x 16 x half> @vfnmsub_vf_nxv16f16_neg_splat_commute(<vscale x 16
 ; ZVFHMIN-NEXT:    vmv4r.v v20, v12
 ; ZVFHMIN-NEXT:    vmv4r.v v4, v8
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v16, v16, a1, v0.t
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v24, v16
@@ -7093,10 +7055,9 @@ define <vscale x 16 x half> @vfnmsub_vf_nxv16f16_neg_splat_unmasked(<vscale x 16
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv16f16_neg_splat_unmasked:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v16, v16, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v24, v16
@@ -7124,10 +7085,9 @@ define <vscale x 16 x half> @vfnmsub_vf_nxv16f16_neg_splat_unmasked_commute(<vsc
 ; ZVFHMIN-LABEL: vfnmsub_vf_nxv16f16_neg_splat_unmasked_commute:
 ; ZVFHMIN:       # %bb.0:
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m4, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v16, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v16, v16, a1
 ; ZVFHMIN-NEXT:    vsetvli a1, zero, e16, m4, ta, ma
 ; ZVFHMIN-NEXT:    vfwcvt.f.f.v v24, v16
@@ -8916,10 +8876,9 @@ define <vscale x 32 x half> @vfnmadd_vf_nxv32f16_neg_splat(<vscale x 32 x half>
 ; ZVFHMIN-NEXT:    addi a1, a1, 16
 ; ZVFHMIN-NEXT:    vs8r.v v8, (a1) # Unknown-size Folded Spill
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m8, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v24, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v8, v24, a1, v0.t
 ; ZVFHMIN-NEXT:    vxor.vx v16, v16, a1, v0.t
 ; ZVFHMIN-NEXT:    csrr a1, vlenb
@@ -9038,10 +8997,9 @@ define <vscale x 32 x half> @vfnmadd_vf_nxv32f16_neg_splat_commute(<vscale x 32
 ; ZVFHMIN-NEXT:    addi a1, a1, 16
 ; ZVFHMIN-NEXT:    vs8r.v v8, (a1) # Unknown-size Folded Spill
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m8, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v24, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v8, v24, a1, v0.t
 ; ZVFHMIN-NEXT:    vxor.vx v16, v16, a1, v0.t
 ; ZVFHMIN-NEXT:    csrr a1, vlenb
@@ -9166,10 +9124,9 @@ define <vscale x 32 x half> @vfnmadd_vf_nxv32f16_neg_splat_unmasked(<vscale x 32
 ; ZVFHMIN-NEXT:    addi a1, a1, 16
 ; ZVFHMIN-NEXT:    vs8r.v v8, (a1) # Unknown-size Folded Spill
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m8, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v24, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v24, v24, a1
 ; ZVFHMIN-NEXT:    csrr a2, vlenb
 ; ZVFHMIN-NEXT:    slli a2, a2, 3
@@ -9286,10 +9243,9 @@ define <vscale x 32 x half> @vfnmadd_vf_nxv32f16_neg_splat_unmasked_commute(<vsc
 ; ZVFHMIN-NEXT:    addi a1, a1, 16
 ; ZVFHMIN-NEXT:    vs8r.v v8, (a1) # Unknown-size Folded Spill
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m8, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v24, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v8, v24, a1
 ; ZVFHMIN-NEXT:    csrr a2, vlenb
 ; ZVFHMIN-NEXT:    slli a2, a2, 3
@@ -10373,7 +10329,7 @@ define <vscale x 32 x half> @vfnmsub_vf_nxv32f16_neg_splat(<vscale x 32 x half>
 ; ZVFHMIN-NEXT:    vs8r.v v16, (a1) # Unknown-size Folded Spill
 ; ZVFHMIN-NEXT:    vmv8r.v v16, v8
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m8, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v8, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
 ; ZVFHMIN-NEXT:    csrr a2, vlenb
@@ -10381,7 +10337,6 @@ define <vscale x 32 x half> @vfnmsub_vf_nxv32f16_neg_splat(<vscale x 32 x half>
 ; ZVFHMIN-NEXT:    add a2, sp, a2
 ; ZVFHMIN-NEXT:    addi a2, a2, 16
 ; ZVFHMIN-NEXT:    vs1r.v v0, (a2) # Unknown-size Folded Spill
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v8, v8, a1, v0.t
 ; ZVFHMIN-NEXT:    csrr a1, vlenb
 ; ZVFHMIN-NEXT:    slli a2, a1, 1
@@ -10494,12 +10449,11 @@ define <vscale x 32 x half> @vfnmsub_vf_nxv32f16_neg_splat_commute(<vscale x 32
 ; ZVFHMIN-NEXT:    addi a1, a1, 16
 ; ZVFHMIN-NEXT:    vs8r.v v16, (a1) # Unknown-size Folded Spill
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m8, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v24, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
 ; ZVFHMIN-NEXT:    addi a2, sp, 16
 ; ZVFHMIN-NEXT:    vs1r.v v0, (a2) # Unknown-size Folded Spill
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v16, v24, a1, v0.t
 ; ZVFHMIN-NEXT:    csrr a1, vlenb
 ; ZVFHMIN-NEXT:    slli a2, a1, 1
@@ -10635,10 +10589,9 @@ define <vscale x 32 x half> @vfnmsub_vf_nxv32f16_neg_splat_unmasked(<vscale x 32
 ; ZVFHMIN-NEXT:    addi a1, a1, 16
 ; ZVFHMIN-NEXT:    vs8r.v v8, (a1) # Unknown-size Folded Spill
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m8, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v8, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v8, v8, a1
 ; ZVFHMIN-NEXT:    csrr a1, vlenb
 ; ZVFHMIN-NEXT:    slli a1, a1, 3
@@ -10751,10 +10704,9 @@ define <vscale x 32 x half> @vfnmsub_vf_nxv32f16_neg_splat_unmasked_commute(<vsc
 ; ZVFHMIN-NEXT:    addi a1, a1, 16
 ; ZVFHMIN-NEXT:    vs8r.v v8, (a1) # Unknown-size Folded Spill
 ; ZVFHMIN-NEXT:    fmv.x.h a1, fa0
-; ZVFHMIN-NEXT:    vsetvli a2, zero, e16, m8, ta, ma
+; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vmv.v.x v24, a1
 ; ZVFHMIN-NEXT:    lui a1, 8
-; ZVFHMIN-NEXT:    vsetvli zero, a0, e16, m8, ta, ma
 ; ZVFHMIN-NEXT:    vxor.vx v8, v24, a1
 ; ZVFHMIN-NEXT:    addi a1, sp, 16
 ; ZVFHMIN-NEXT:    vs8r.v v8, (a1) # Unknown-size Folded Spill

>From b49d9105d5b81b868cf7fe96c78489ca2f39f7b2 Mon Sep 17 00:00:00 2001
From: Michael Maitland <michaeltmaitland at gmail.com>
Date: Tue, 17 Sep 2024 12:33:20 -0700
Subject: [PATCH 04/12] fixup! respond to some more comments

---
 llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index 36910f818ea249..6dc6d1c585efbe 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -1366,29 +1366,31 @@ static bool isVectorOpUsedAsScalarOp(MachineOperand &MO) {
   }
 }
 
-static bool safeToPropgateVL(const MachineInstr &MI) {
+/// Return true if MI may read elements past VL.
+static bool mayReadPastVL(const MachineInstr &MI) {
   const RISCVVPseudosTable::PseudoInfo *RVV =
       RISCVVPseudosTable::getPseudoInfo(MI.getOpcode());
   if (!RVV)
-    return false;
+    return true;
 
   switch (RVV->BaseInstr) {
-  // vslidedown instructions may use the higher part of the input operand beyond
-  // the VL.
+  // vslidedown instructions may read elements past VL. They are handled
+  // according to current tail policy.
   case RISCV::VSLIDEDOWN_VI:
   case RISCV::VSLIDEDOWN_VX:
   case RISCV::VSLIDE1DOWN_VX:
   case RISCV::VFSLIDE1DOWN_VF:
 
-  // vrgather instructions may index beyond the VL.
+  // vrgather instructions may read the source vector at any index < VLMAX,
+  // regardless of VL.
   case RISCV::VRGATHER_VI:
   case RISCV::VRGATHER_VV:
   case RISCV::VRGATHER_VX:
   case RISCV::VRGATHEREI16_VV:
-    return false;
+    return true;
 
   default:
-    return true;
+    return false;
   }
 }
 
@@ -1443,6 +1445,7 @@ bool RISCVVLOptimizer::tryReduceVL(MachineInstr &OrigMI) {
   while (!Worklist.empty()) {
     MachineInstr &MI = *Worklist.pop_back_val();
     LLVM_DEBUG(dbgs() << "Try reduce VL for " << MI << "\n");
+
     std::optional<Register> CommonVL;
     bool CanReduceVL = true;
     for (auto &UserOp : MRI->use_operands(MI.getOperand(0).getReg())) {
@@ -1461,7 +1464,7 @@ bool RISCVVLOptimizer::tryReduceVL(MachineInstr &OrigMI) {
         continue;
       }
 
-      if (!safeToPropgateVL(UserMI)) {
+      if (mayReadPastVL(UserMI)) {
         LLVM_DEBUG(dbgs() << "    Abort due to used by unsafe instruction\n");
         CanReduceVL = false;
         break;

>From 1c35bd52fbd466528e4ab073045531762469de7f Mon Sep 17 00:00:00 2001
From: Michael Maitland <michaeltmaitland at gmail.com>
Date: Wed, 18 Sep 2024 11:00:04 -0700
Subject: [PATCH 05/12] fixup! fix getOperandInfo for reductions

---
 llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp | 42 ++++++++++------------
 1 file changed, 19 insertions(+), 23 deletions(-)

diff --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index 6dc6d1c585efbe..1262cac1365c9a 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -1159,11 +1159,12 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   }
   // 14. Vector Reduction Operations
   // 14.1. Vector Single-Width Integer Reduction Instructions
-  // We need to return Unknown since only element 0 of reduction is valid but it
-  // was generated by reducing over all of the input elements. There are 3
-  // vector sources for reductions. One for scalar, one for tail value, and one
-  // for the elements to reduce over. Only the one with the elements to reduce
-  // over obeys VL. The other two only read element 0 from the register.
+  // The destination and first source operand are vector registers, but only
+  // element 0 has any meaning. The vector registers are being used as a scalar
+  // register. They have a width (SEW), but the concept of LMUL or EMUL does not
+  // apply here. We return Unknown since OperandInfo does not model this yet.
+  // The next vector operand is used for tail value, which does not obey VL. The
+  // last vector operand is the the elements to reduce over, which does obey VL.
   case RISCV::VREDAND_VS:
   case RISCV::VREDMAX_VS:
   case RISCV::VREDMAXU_VS:
@@ -1172,34 +1173,29 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VREDOR_VS:
   case RISCV::VREDSUM_VS:
   case RISCV::VREDXOR_VS:
-    return OperandInfo(OperandInfo::State::Unknown);
-
   // 14.2. Vector Widening Integer Reduction Instructions
-  // Dest EEW=2*SEW and EMUL=2*LMUL. Source EEW=SEW EMUL=LMUL. Source is zero
-  // extended to 2*SEW in order to generate 2*SEW Dest.
+  // Again, the destination and first source operand are vector registers, but
+  // only element 0 has any meaning. The vector registers are being used as a
+  // scalar register. They have a width (2 * SEW), but the concept of LMUL or
+  // EMUL does not apply here. We return Unknown since OperandInfo does not
+  // model this yet. The next vector operand is used for tail value, which does
+  // not obey VL. The last vector operand is the the elements to reduce over,
+  // which does obey VL.
   case RISCV::VWREDSUM_VS:
-  case RISCV::VWREDSUMU_VS: {
-    unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL =
-        IsMODef ? RISCVVType::twoTimesVLMUL(MIVLMul) : MIVLMul;
-    return OperandInfo(EMUL, Log2EEW);
-  }
+  case RISCV::VWREDSUMU_VS:
   // 14.3. Vector Single-Width Floating-Point Reduction Instructions
-  // EMUL=LMUL. EEW=SEW.
+  // Behaves similar to 14.1
   case RISCV::VFREDMAX_VS:
   case RISCV::VFREDMIN_VS:
   case RISCV::VFREDOSUM_VS:
   case RISCV::VFREDUSUM_VS:
-    return OperandInfo(MIVLMul, MILog2SEW);
-
   // 14.4. Vector Widening Floating-Point Reduction Instructions
-  // Source EEW=SEW and EMUL=LMUL. Dest EEW=2*SEW and EMUL=2*LMUL.
+  // Behaves similar to 14.2
   case RISCV::VFWREDOSUM_VS:
   case RISCV::VFWREDUSUM_VS: {
-    unsigned Log2EEW = IsMODef ? MILog2SEW + 1 : MILog2SEW;
-    RISCVII::VLMUL EMUL =
-        IsMODef ? RISCVVType::twoTimesVLMUL(MIVLMul) : MIVLMul;
-    return OperandInfo(EMUL, Log2EEW);
+    if (IsOp2)
+      return OperandInfo(MIVLMul, MILog2SEW);
+    return OperandInfo(OperandInfo::State::Unknown);
   }
 
   // 15. Vector Mask Instructions

>From bfce099ebc9e18fcde1d478e4bf8ae7b51ef174c Mon Sep 17 00:00:00 2001
From: Michael Maitland <michaeltmaitland at gmail.com>
Date: Wed, 18 Sep 2024 11:59:51 -0700
Subject: [PATCH 06/12] fixup! model scalar OperandInfo

---
 llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp | 73 ++++++++++++++++------
 1 file changed, 55 insertions(+), 18 deletions(-)

diff --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index 1262cac1365c9a..b07bdff348c200 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -86,16 +86,22 @@ struct OperandInfo {
   // Represent as 1,2,4,8, ... and fractional indicator. This is because
   // EMUL can take on values that don't map to RISCVII::VLMUL values exactly.
   // For example, a mask operand can have an EMUL less than MF8.
-  std::pair<unsigned, bool> EMUL;
+  std::optional<std::pair<unsigned, bool>> EMUL;
 
   unsigned Log2EEW;
 
+  // true if this is a vector register that only uses element 0 of the register.
+  bool IsScalar;
+
   OperandInfo(RISCVII::VLMUL EMUL, unsigned Log2EEW)
-      : S(State::Known), EMUL(RISCVVType::decodeVLMUL(EMUL)), Log2EEW(Log2EEW) {
-  }
+      : S(State::Known), EMUL(RISCVVType::decodeVLMUL(EMUL)), Log2EEW(Log2EEW),
+        IsScalar(false) {}
 
   OperandInfo(std::pair<unsigned, bool> EMUL, unsigned Log2EEW)
-      : S(State::Known), EMUL(EMUL), Log2EEW(Log2EEW) {}
+      : S(State::Known), EMUL(EMUL), Log2EEW(Log2EEW), IsScalar(false) {}
+
+  OperandInfo(unsigned Log2EEW)
+      : S(State::Known), EMUL(std::nullopt), Log2EEW(Log2EEW), IsScalar(true) {}
 
   OperandInfo(State S) : S(S) {
     assert(S != State::Known &&
@@ -108,8 +114,14 @@ struct OperandInfo {
 
   static bool EMULAndEEWAreEqual(const OperandInfo &A, const OperandInfo &B) {
     assert(A.isKnown() && B.isKnown() && "Both operands must be known");
-    return A.Log2EEW == B.Log2EEW && A.EMUL.first == B.EMUL.first &&
-           A.EMUL.second == B.EMUL.second;
+
+    if (A.IsScalar != B.IsScalar)
+      return false;
+    if (A.IsScalar && B.IsScalar)
+      return A.Log2EEW == B.Log2EEW;
+
+    return A.Log2EEW == B.Log2EEW && A.EMUL->first == B.EMUL->first &&
+           A.EMUL->second == B.EMUL->second;
   }
 
   void print(raw_ostream &OS) const {
@@ -117,10 +129,15 @@ struct OperandInfo {
       OS << "Unknown";
       return;
     }
+    if (IsScalar) {
+      OS << "EEW:" << (1 << Log2EEW);
+      return;
+    }
+    assert(EMUL && "Expected EMUL to have value");
     OS << "EMUL: ";
-    if (EMUL.second)
+    if (EMUL->second)
       OS << "m";
-    OS << "f" << EMUL.first;
+    OS << "f" << EMUL->first;
     OS << ", EEW: " << (1 << Log2EEW);
   }
 };
@@ -1162,9 +1179,9 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   // The destination and first source operand are vector registers, but only
   // element 0 has any meaning. The vector registers are being used as a scalar
   // register. They have a width (SEW), but the concept of LMUL or EMUL does not
-  // apply here. We return Unknown since OperandInfo does not model this yet.
-  // The next vector operand is used for tail value, which does not obey VL. The
-  // last vector operand is the the elements to reduce over, which does obey VL.
+  // apply here. The next vector operand is used for tail value, which does not
+  // obey VL, we must return Unknown. The last vector operand is the the
+  // elements to reduce over, which does obey VL and has EEW=SEW and EMUL=LMUL.
   case RISCV::VREDAND_VS:
   case RISCV::VREDMAX_VS:
   case RISCV::VREDMAXU_VS:
@@ -1172,27 +1189,47 @@ static OperandInfo getOperandInfo(const MachineInstr &MI,
   case RISCV::VREDMINU_VS:
   case RISCV::VREDOR_VS:
   case RISCV::VREDSUM_VS:
-  case RISCV::VREDXOR_VS:
+  case RISCV::VREDXOR_VS: {
+    if (IsMODef || IsOp1)
+      return OperandInfo(MILog2SEW);
+    if (IsOp2)
+      return OperandInfo(MIVLMul, MILog2SEW);
+    return OperandInfo(OperandInfo::State::Unknown);
+  }
   // 14.2. Vector Widening Integer Reduction Instructions
   // Again, the destination and first source operand are vector registers, but
   // only element 0 has any meaning. The vector registers are being used as a
   // scalar register. They have a width (2 * SEW), but the concept of LMUL or
-  // EMUL does not apply here. We return Unknown since OperandInfo does not
-  // model this yet. The next vector operand is used for tail value, which does
-  // not obey VL. The last vector operand is the the elements to reduce over,
-  // which does obey VL.
+  // EMUL does not apply here. The next vector operand is used for tail value,
+  // which does not obey VL, we must return Unknown. The last vector operand is
+  // the the elements to reduce over, which does obey VL and has EEW=SEW and
+  // EMUL=LMUL.
   case RISCV::VWREDSUM_VS:
-  case RISCV::VWREDSUMU_VS:
+  case RISCV::VWREDSUMU_VS: {
+    if (IsMODef || IsOp1)
+      return OperandInfo(MILog2SEW + 1);
+    if (IsOp2)
+      return OperandInfo(MIVLMul, MILog2SEW);
+    return OperandInfo(OperandInfo::State::Unknown);
+  }
   // 14.3. Vector Single-Width Floating-Point Reduction Instructions
   // Behaves similar to 14.1
   case RISCV::VFREDMAX_VS:
   case RISCV::VFREDMIN_VS:
   case RISCV::VFREDOSUM_VS:
-  case RISCV::VFREDUSUM_VS:
+  case RISCV::VFREDUSUM_VS: {
+    if (IsMODef || IsOp1)
+      return OperandInfo(MILog2SEW);
+    if (IsOp2)
+      return OperandInfo(MIVLMul, MILog2SEW);
+    return OperandInfo(OperandInfo::State::Unknown);
+  }
   // 14.4. Vector Widening Floating-Point Reduction Instructions
   // Behaves similar to 14.2
   case RISCV::VFWREDOSUM_VS:
   case RISCV::VFWREDUSUM_VS: {
+    if (IsMODef || IsOp1)
+      return OperandInfo(MILog2SEW + 1);
     if (IsOp2)
       return OperandInfo(MIVLMul, MILog2SEW);
     return OperandInfo(OperandInfo::State::Unknown);

>From 0266e3029ce5e1b5e9dee3be225ee1bbcf911ba4 Mon Sep 17 00:00:00 2001
From: Michael Maitland <michaeltmaitland at gmail.com>
Date: Wed, 18 Sep 2024 12:38:20 -0700
Subject: [PATCH 07/12] fixup! fix some comments, add some fixmes, and update
 check

---
 llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp | 198 +++++++++++----------
 1 file changed, 104 insertions(+), 94 deletions(-)

diff --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index b07bdff348c200..c69ea31d8481ae 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -53,6 +53,8 @@ class RISCVVLOptimizer : public MachineFunctionPass {
   StringRef getPassName() const override { return PASS_NAME; }
 
 private:
+  void checkUsers(std::optional<Register> &CommonVL, bool &CanReduceVL,
+                  MachineInstr &MI);
   bool tryReduceVL(MachineInstr &MI);
   bool isCandidate(const MachineInstr &MI) const;
 };
@@ -1428,27 +1430,16 @@ static bool mayReadPastVL(const MachineInstr &MI) {
 }
 
 bool RISCVVLOptimizer::isCandidate(const MachineInstr &MI) const {
-
-  LLVM_DEBUG(
-      dbgs() << "Check whether the instruction is a candidate for reducing VL:"
-             << MI << "\n");
-
   const MCInstrDesc &Desc = MI.getDesc();
-  if (!RISCVII::hasVLOp(Desc.TSFlags) || !RISCVII::hasSEWOp(Desc.TSFlags)) {
-    LLVM_DEBUG(dbgs() << "  Not a candidate due to lack of vl op or sew op\n");
+  if (!RISCVII::hasVLOp(Desc.TSFlags) || !RISCVII::hasSEWOp(Desc.TSFlags))
     return false;
-  }
-
-  if (MI.getNumDefs() != 1) {
-    LLVM_DEBUG(dbgs() << " Not a candidate due to it def more than one\n");
+  if (MI.getNumDefs() != 1)
     return false;
-  }
+
   unsigned VLOpNum = RISCVII::getVLOpNum(Desc);
   const MachineOperand &VLOp = MI.getOperand(VLOpNum);
-  if (!VLOp.isImm() || VLOp.getImm() != RISCV::VLMaxSentinel) {
-    LLVM_DEBUG(dbgs() << "  Not a candidate due to VL is not VLMAX\n");
+  if (!VLOp.isImm() || VLOp.getImm() != RISCV::VLMaxSentinel)
     return false;
-  }
 
   // Some instructions that produce vectors have semantics that make it more
   // difficult to determine whether the VL can be reduced. For example, some
@@ -1467,9 +1458,91 @@ bool RISCVVLOptimizer::isCandidate(const MachineInstr &MI) const {
     return false;
   }
 
+  LLVM_DEBUG(dbgs() << "  Found a candidate for VL reduction: " << MI << "\n");
   return true;
 }
 
+void RISCVVLOptimizer::checkUsers(std::optional<Register> &CommonVL,
+                                  bool &CanReduceVL, MachineInstr &MI) {
+  // FIXME: Avoid visiting each user for each time we visit something on the
+  // worklist, combined with an extra visit from the outer loop. Restructure
+  // along lines of an instcombine style worklist which integrates the outer
+  // pass.
+  for (auto &UserOp : MRI->use_operands(MI.getOperand(0).getReg())) {
+    const MachineInstr &UserMI = *UserOp.getParent();
+    LLVM_DEBUG(dbgs() << "  Checking user: " << UserMI << "\n");
+
+    // Instructions like reductions may use a vector register as a scalar
+    // register. In this case, we should treat it like a scalar register which
+    // does not impact the decision on whether to optimize VL.
+    if (isVectorOpUsedAsScalarOp(UserOp)) {
+      [[maybe_unused]] Register R = UserOp.getReg();
+      [[maybe_unused]] const TargetRegisterClass *RC = MRI->getRegClass(R);
+      assert(RISCV::VRRegClass.hasSubClassEq(RC) &&
+             "Expect LMUL 1 register class for vector as scalar operands!");
+      LLVM_DEBUG(dbgs() << "    Use this operand as a scalar operand\n");
+      continue;
+    }
+
+    if (mayReadPastVL(UserMI)) {
+      LLVM_DEBUG(dbgs() << "    Abort because used by unsafe instruction\n");
+      CanReduceVL = false;
+      break;
+    }
+
+    // Tied operands might pass through.
+    if (UserOp.isTied()) {
+      LLVM_DEBUG(dbgs() << "    Abort because user used as tied operand\n");
+      CanReduceVL = false;
+      break;
+    }
+
+    const MCInstrDesc &Desc = UserMI.getDesc();
+    if (!RISCVII::hasVLOp(Desc.TSFlags) || !RISCVII::hasSEWOp(Desc.TSFlags)) {
+      LLVM_DEBUG(dbgs() << "    Abort due to lack of VL or SEW, assume that"
+                           " use VLMAX\n");
+      CanReduceVL = false;
+      break;
+    }
+
+    unsigned VLOpNum = RISCVII::getVLOpNum(Desc);
+    const MachineOperand &VLOp = UserMI.getOperand(VLOpNum);
+    // Looking for a register VL that isn't X0.
+    if (!VLOp.isReg() || VLOp.getReg() == RISCV::X0) {
+      LLVM_DEBUG(dbgs() << "    Abort due to user uses X0 as VL.\n");
+      CanReduceVL = false;
+      break;
+    }
+
+    if (!CommonVL) {
+      CommonVL = VLOp.getReg();
+    } else if (*CommonVL != VLOp.getReg()) {
+      LLVM_DEBUG(dbgs() << "    Abort because users have different VL\n");
+      CanReduceVL = false;
+      break;
+    }
+
+    // The SEW and LMUL of destination and source registers need to match.
+
+    // We know that MI DEF is a vector register, because that was the guard
+    // to call this function.
+    assert(isVectorRegClass(UserMI.getOperand(0).getReg(), MRI) &&
+           "Expected DEF and USE to be vector registers");
+
+    OperandInfo ConsumerInfo = getOperandInfo(UserMI, UserOp, MRI);
+    OperandInfo ProducerInfo = getOperandInfo(MI, MI.getOperand(0), MRI);
+    if (ConsumerInfo.isUnknown() || ProducerInfo.isUnknown() ||
+        !OperandInfo::EMULAndEEWAreEqual(ConsumerInfo, ProducerInfo)) {
+      LLVM_DEBUG(dbgs() << "    Abort due to incompatible or unknown "
+                           "information for EMUL or EEW.\n");
+      LLVM_DEBUG(dbgs() << "      ConsumerInfo is: " << ConsumerInfo << "\n");
+      LLVM_DEBUG(dbgs() << "      ProducerInfo is: " << ProducerInfo << "\n");
+      CanReduceVL = false;
+      break;
+    }
+  }
+}
+
 bool RISCVVLOptimizer::tryReduceVL(MachineInstr &OrigMI) {
   SetVector<MachineInstr *> Worklist;
   Worklist.insert(&OrigMI);
@@ -1477,87 +1550,24 @@ bool RISCVVLOptimizer::tryReduceVL(MachineInstr &OrigMI) {
   bool MadeChange = false;
   while (!Worklist.empty()) {
     MachineInstr &MI = *Worklist.pop_back_val();
-    LLVM_DEBUG(dbgs() << "Try reduce VL for " << MI << "\n");
-
+    LLVM_DEBUG(dbgs() << "Trying to reduce VL for " << MI << "\n");
+
+    // A MI may not produce a vector register when it is at the root of the
+    // traversal. For example:
+    // vec_reg_a = ..., vl_op, sew_op
+    // vec_reg_a = ..., vl_op, sew_op
+    // scalar_reg = vector_instr vec_reg_a, vec_reg_b, vl_op, sew_op
+    // We'd like to reduce the vl_op on vector_instr, despite it producing
+    // a scalar register. If the produced Dest is not a vector register (such as
+    // vcpop or vfirst), then it has no EEW or EMUL, so there is no need to
+    // check that producer and consumer LMUL and SEW of usres match.
     std::optional<Register> CommonVL;
     bool CanReduceVL = true;
-    for (auto &UserOp : MRI->use_operands(MI.getOperand(0).getReg())) {
-      const MachineInstr &UserMI = *UserOp.getParent();
-      LLVM_DEBUG(dbgs() << "  Check user: " << UserMI << "\n");
-
-      // Instructions like reductions may use a vector register as a scalar
-      // register. In this case, we should treat it like a scalar register which
-      // does not impact the decision on whether to optimize VL.
-      if (isVectorOpUsedAsScalarOp(UserOp)) {
-        [[maybe_unused]] Register R = UserOp.getReg();
-        [[maybe_unused]] const TargetRegisterClass *RC = MRI->getRegClass(R);
-        assert(RISCV::VRRegClass.hasSubClassEq(RC) &&
-               "Expect LMUL 1 register class for vector as scalar operands!");
-        LLVM_DEBUG(dbgs() << "    Use this operand as a scalar operand\n");
-        continue;
-      }
-
-      if (mayReadPastVL(UserMI)) {
-        LLVM_DEBUG(dbgs() << "    Abort due to used by unsafe instruction\n");
-        CanReduceVL = false;
-        break;
-      }
-
-      // Tied operands might pass through.
-      if (UserOp.isTied()) {
-        LLVM_DEBUG(dbgs() << "    Abort due to user use it as tied operand\n");
-        CanReduceVL = false;
-        break;
-      }
-
-      const MCInstrDesc &Desc = UserMI.getDesc();
-      if (!RISCVII::hasVLOp(Desc.TSFlags) || !RISCVII::hasSEWOp(Desc.TSFlags)) {
-        LLVM_DEBUG(dbgs() << "    Abort due to lack of VL or SEW, assume that"
-                             " use VLMAX.\n");
-        CanReduceVL = false;
-        break;
-      }
-
-      unsigned VLOpNum = RISCVII::getVLOpNum(Desc);
-      const MachineOperand &VLOp = UserMI.getOperand(VLOpNum);
-      // Looking for a register VL that isn't X0.
-      if (!VLOp.isReg() || VLOp.getReg() == RISCV::X0) {
-        LLVM_DEBUG(dbgs() << "    Abort due to user use X0 as VL.\n");
-        CanReduceVL = false;
-        break;
-      }
-
-      if (!CommonVL) {
-        CommonVL = VLOp.getReg();
-      } else if (*CommonVL != VLOp.getReg()) {
-        LLVM_DEBUG(dbgs() << "    Abort due to users have different VL!\n");
-        CanReduceVL = false;
-        break;
-      }
-
-      // The SEW and LMUL of destination and source registers need to match.
-
-      // If the produced Dest is not a vector register, then it has no EEW or
-      // EMUL, so there is no need to check that producer and consumer LMUL and
-      // SEW match. We've already checked above that UserOp is a vector
-      // register.
-      if (!isVectorRegClass(MI.getOperand(0).getReg(), MRI)) {
-        LLVM_DEBUG(dbgs() << "    Abort due to register class mismatch between "
-                             "USE and DEF\n");
-        continue;
-      }
-
-      OperandInfo ConsumerInfo = getOperandInfo(UserMI, UserOp, MRI);
-      OperandInfo ProducerInfo = getOperandInfo(MI, MI.getOperand(0), MRI);
-      if (ConsumerInfo.isUnknown() || ProducerInfo.isUnknown() ||
-          !OperandInfo::EMULAndEEWAreEqual(ConsumerInfo, ProducerInfo)) {
-        LLVM_DEBUG(dbgs() << "    Abort due to incompatible or unknown "
-                             "information for EMUL or EEW.\n");
-        LLVM_DEBUG(dbgs() << "      ConsumerInfo is: " << ConsumerInfo << "\n");
-        LLVM_DEBUG(dbgs() << "      ProducerInfo is: " << ProducerInfo << "\n");
-        CanReduceVL = false;
-        break;
-      }
+    if (isVectorRegClass(MI.getOperand(0).getReg(), MRI))
+      checkUsers(CommonVL, CanReduceVL, MI);
+    else {
+      CommonVL = MI.getOperand(RISCVII::getVLOpNum(MI.getDesc())).getReg();
+      CanReduceVL = true;
     }
 
     if (!CanReduceVL || !CommonVL)

>From 8acb124808145a12e3f90917cea84fe6e4f497d7 Mon Sep 17 00:00:00 2001
From: Michael Maitland <michaeltmaitland at gmail.com>
Date: Wed, 18 Sep 2024 14:09:25 -0700
Subject: [PATCH 08/12] fixup! don't change to same vl

---
 llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index c69ea31d8481ae..65231f91242abe 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -1565,10 +1565,6 @@ bool RISCVVLOptimizer::tryReduceVL(MachineInstr &OrigMI) {
     bool CanReduceVL = true;
     if (isVectorRegClass(MI.getOperand(0).getReg(), MRI))
       checkUsers(CommonVL, CanReduceVL, MI);
-    else {
-      CommonVL = MI.getOperand(RISCVII::getVLOpNum(MI.getDesc())).getReg();
-      CanReduceVL = true;
-    }
 
     if (!CanReduceVL || !CommonVL)
       continue;

>From 754c5c93d3026e2f09eb11e7d2c938832d2ab9c7 Mon Sep 17 00:00:00 2001
From: Michael Maitland <michaeltmaitland at gmail.com>
Date: Wed, 18 Sep 2024 14:22:45 -0700
Subject: [PATCH 09/12] fixup! remove comment and return CanReduceVL

---
 llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index 65231f91242abe..a948e8f22332a8 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -53,8 +53,7 @@ class RISCVVLOptimizer : public MachineFunctionPass {
   StringRef getPassName() const override { return PASS_NAME; }
 
 private:
-  void checkUsers(std::optional<Register> &CommonVL, bool &CanReduceVL,
-                  MachineInstr &MI);
+  bool checkUsers(std::optional<Register> &CommonVL, MachineInstr &MI);
   bool tryReduceVL(MachineInstr &MI);
   bool isCandidate(const MachineInstr &MI) const;
 };
@@ -1462,12 +1461,13 @@ bool RISCVVLOptimizer::isCandidate(const MachineInstr &MI) const {
   return true;
 }
 
-void RISCVVLOptimizer::checkUsers(std::optional<Register> &CommonVL,
-                                  bool &CanReduceVL, MachineInstr &MI) {
+bool RISCVVLOptimizer::checkUsers(std::optional<Register> &CommonVL,
+                                  MachineInstr &MI) {
   // FIXME: Avoid visiting each user for each time we visit something on the
   // worklist, combined with an extra visit from the outer loop. Restructure
   // along lines of an instcombine style worklist which integrates the outer
   // pass.
+  bool CanReduceVL = true;
   for (auto &UserOp : MRI->use_operands(MI.getOperand(0).getReg())) {
     const MachineInstr &UserMI = *UserOp.getParent();
     LLVM_DEBUG(dbgs() << "  Checking user: " << UserMI << "\n");
@@ -1541,6 +1541,7 @@ void RISCVVLOptimizer::checkUsers(std::optional<Register> &CommonVL,
       break;
     }
   }
+  return CanReduceVL;
 }
 
 bool RISCVVLOptimizer::tryReduceVL(MachineInstr &OrigMI) {
@@ -1552,19 +1553,10 @@ bool RISCVVLOptimizer::tryReduceVL(MachineInstr &OrigMI) {
     MachineInstr &MI = *Worklist.pop_back_val();
     LLVM_DEBUG(dbgs() << "Trying to reduce VL for " << MI << "\n");
 
-    // A MI may not produce a vector register when it is at the root of the
-    // traversal. For example:
-    // vec_reg_a = ..., vl_op, sew_op
-    // vec_reg_a = ..., vl_op, sew_op
-    // scalar_reg = vector_instr vec_reg_a, vec_reg_b, vl_op, sew_op
-    // We'd like to reduce the vl_op on vector_instr, despite it producing
-    // a scalar register. If the produced Dest is not a vector register (such as
-    // vcpop or vfirst), then it has no EEW or EMUL, so there is no need to
-    // check that producer and consumer LMUL and SEW of usres match.
     std::optional<Register> CommonVL;
     bool CanReduceVL = true;
     if (isVectorRegClass(MI.getOperand(0).getReg(), MRI))
-      checkUsers(CommonVL, CanReduceVL, MI);
+      CanReduceVL = checkUsers(CommonVL, MI);
 
     if (!CanReduceVL || !CommonVL)
       continue;

>From 42903652985a9caa8f4cfc0435533a5e137befc2 Mon Sep 17 00:00:00 2001
From: Michael Maitland <michaeltmaitland at gmail.com>
Date: Mon, 23 Sep 2024 10:05:49 -0700
Subject: [PATCH 10/12] fixup! add basic tests for supported instrs

---
 llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll | 395 +++++++++++++++++++
 1 file changed, 395 insertions(+)
 create mode 100644 llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll

diff --git a/llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll b/llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll
new file mode 100644
index 00000000000000..4fd02bd649577d
--- /dev/null
+++ b/llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll
@@ -0,0 +1,395 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v,+zvbb -riscv-enable-vl-optimizer=false -verify-machineinstrs | FileCheck %s --check-prefixes=NOVLOPT
+; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v,+zvbb -riscv-enable-vl-optimizer=false -verify-machineinstrs | FileCheck %s --check-prefixes=NOVLOPT
+; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v,+zvbb -riscv-enable-vl-optimizer -verify-machineinstrs | FileCheck %s --check-prefixes=VLOPT
+; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v,+zvbb -riscv-enable-vl-optimizer -verify-machineinstrs | FileCheck %s --check-prefixes=VLOPT
+
+; The purpose of this test is to check the behavior of specific instructions as it relates to the VL optimizer
+
+define <vscale x 4 x i32> @vadd_vi(<vscale x 4 x i32> %a, iXLen %vl) {
+; NOVLOPT-LABEL: vadd_vi:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vi v10, v8, 5
+; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v10, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vadd_vi:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vadd.vi v10, v8, 5
+; VLOPT-NEXT:    vadd.vv v8, v10, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, i32 5, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vadd_vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vadd_vv:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v8, v10
+; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v8, v10
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vadd_vv:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v8, v10
+; VLOPT-NEXT:    vadd.vv v8, v8, v10
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %b, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vadd_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vadd_vx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vx v10, v8, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v10, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vadd_vx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vadd.vx v10, v8, a0
+; VLOPT-NEXT:    vadd.vv v8, v10, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vmul_vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vmul_vv:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmul.vv v8, v8, v10
+; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmul.vv v8, v8, v10
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vmul_vv:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vmul.vv v8, v8, v10
+; VLOPT-NEXT:    vmul.vv v8, v8, v10
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %b, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vmul_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vmul_vx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmul.vx v10, v8, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmul.vv v8, v10, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vmul_vx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vmul.vx v10, v8, a0
+; VLOPT-NEXT:    vmul.vv v8, v10, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vsll_vi(<vscale x 4 x i32> %a, iXLen %vl) {
+; NOVLOPT-LABEL: vsll_vi:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vsll.vi v10, v8, 5
+; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vsll.vv v8, v10, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vsll_vi:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vsll.vi v10, v8, 5
+; VLOPT-NEXT:    vsll.vv v8, v10, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vsll.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, iXLen 5, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vsll.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vsext.vf2(<vscale x 4 x i16> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vsext.vf2:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vsext.vf2 v12, v8
+; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v12, v10
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vsext.vf2:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vsext.vf2 v12, v8
+; VLOPT-NEXT:    vadd.vv v8, v12, v10
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vsext.nxv4i32.nxv4i16(<vscale x 4 x i32> poison, <vscale x 4 x i16> %a, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %b, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vsext.vf4(<vscale x 4 x i8> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vsext.vf4:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vsext.vf4 v12, v8
+; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v12, v10
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vsext.vf4:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vsext.vf4 v12, v8
+; VLOPT-NEXT:    vadd.vv v8, v12, v10
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vsext.nxv4i32.nxv4i8(<vscale x 4 x i32> poison, <vscale x 4 x i8> %a, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %b, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i64> @vsext.vf8(<vscale x 4 x i8> %a, <vscale x 4 x i64> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vsext.vf8:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vsext.vf8 v16, v8
+; NOVLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v16, v12
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vsext.vf8:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
+; VLOPT-NEXT:    vsext.vf8 v16, v8
+; VLOPT-NEXT:    vadd.vv v8, v16, v12
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vsext.nxv4i32.nxv4i8(<vscale x 4 x i64> poison, <vscale x 4 x i8> %a, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %b, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i32> @vzext.vf2(<vscale x 4 x i16> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vzext.vf2:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vzext.vf2 v12, v8
+; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v12, v10
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vzext.vf2:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vzext.vf2 v12, v8
+; VLOPT-NEXT:    vadd.vv v8, v12, v10
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vzext.nxv4i32.nxv4i16(<vscale x 4 x i32> poison, <vscale x 4 x i16> %a, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %b, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vzext.vf4(<vscale x 4 x i8> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vzext.vf4:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vzext.vf4 v12, v8
+; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v12, v10
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vzext.vf4:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vzext.vf4 v12, v8
+; VLOPT-NEXT:    vadd.vv v8, v12, v10
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vzext.nxv4i32.nxv4i8(<vscale x 4 x i32> poison, <vscale x 4 x i8> %a, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %b, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i64> @vzext.vf8(<vscale x 4 x i8> %a, <vscale x 4 x i64> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vzext.vf8:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vzext.vf8 v16, v8
+; NOVLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v16, v12
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vzext.vf8:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
+; VLOPT-NEXT:    vzext.vf8 v16, v8
+; VLOPT-NEXT:    vadd.vv v8, v16, v12
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vzext.nxv4i32.nxv4i8(<vscale x 4 x i64> poison, <vscale x 4 x i8> %a, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %b, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+; FIXME: Add a test for vmv.v.i
+; FIXME: Add a test for vmv.v.v
+
+define <vscale x 4 x i32> @vmv.v.x(<vscale x 4 x i32> %a, i32 %x, iXLen %vl) {
+; NOVLOPT-LABEL: vmv.v.x:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmv.v.x v10, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v10, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vmv.v.x:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vmv.v.x v10, a0
+; VLOPT-NEXT:    vadd.vv v8, v10, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vmv.v.x.nxv4i32(<vscale x 4 x i32> poison, i32 %x, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i16> @vnsrl_wi(<vscale x 4 x i32> %a, <vscale x 4 x i16> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vnsrl_wi:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e16, m1, ta, ma
+; NOVLOPT-NEXT:    vnsrl.wi v11, v8, 5
+; NOVLOPT-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v11, v10
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vnsrl_wi:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
+; VLOPT-NEXT:    vnsrl.wi v11, v8, 5
+; VLOPT-NEXT:    vadd.vv v8, v11, v10
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i16> @llvm.riscv.vnsrl.nxv4i16.nxv4i32(<vscale x 4 x i16> poison, <vscale x 4 x i32> %a, iXLen 5, iXLen -1)
+  %2 = call <vscale x 4 x i16> @llvm.riscv.vadd.nxv4i16.nxv4i16(<vscale x 4 x i16> poison, <vscale x 4 x i16> %1, <vscale x 4 x i16> %b, iXLen %vl)
+  ret <vscale x 4 x i16> %2
+}
+
+define <vscale x 4 x i64> @vwadd.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwadd.vv:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwadd.vv v12, v8, v10
+; NOVLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v12, v12
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwadd.vv:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vwadd.vv v12, v8, v10
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v12, v12
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwadd.nxv4i64.nxv4i32.nxv4i32(<vscale x 4 x i64> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwaddu.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwaddu.vv:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwaddu.vv v12, v8, v10
+; NOVLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v12, v12
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwaddu.vv:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vwaddu.vv v12, v8, v10
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v12, v12
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwaddu.nxv4i64.nxv4i32.nxv4i32(<vscale x 4 x i64> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i32> @vwmacc_vx(<vscale x 4 x i16> %a, i16 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwmacc_vx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
+; NOVLOPT-NEXT:    vwmacc.vx v10, a0, v8
+; NOVLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v10, v10
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwmacc_vx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e16, m1, ta, ma
+; VLOPT-NEXT:    vwmacc.vx v10, a0, v8
+; VLOPT-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v10, v10
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vwmacc.nxv4i32.i16(<vscale x 4 x i32> poison, i16 %b, <vscale x 4 x i16> %a, iXLen -1, iXLen 0)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %1, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vwmaccu_vx(<vscale x 4 x i16> %a, i16 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwmaccu_vx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e16, m1, ta, ma
+; NOVLOPT-NEXT:    vwmaccu.vx v10, a0, v8
+; NOVLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v10, v10
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwmaccu_vx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e16, m1, ta, ma
+; VLOPT-NEXT:    vwmaccu.vx v10, a0, v8
+; VLOPT-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v10, v10
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vwmaccu.nxv4i32.i16(<vscale x 4 x i32> poison, i16 %b, <vscale x 4 x i16> %a, iXLen -1, iXLen 0)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %1, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vwsll.vi(<vscale x 4 x i16> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwsll.vi:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e16, m1, ta, ma
+; NOVLOPT-NEXT:    vwsll.vi v12, v8, 1
+; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v12, v10
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwsll.vi:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e16, m1, ta, ma
+; VLOPT-NEXT:    vwsll.vi v12, v8, 1
+; VLOPT-NEXT:    vsetvli zero, zero, e32, m2, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v12, v10
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vwsll.nxv4i32.nxv4i16(<vscale x 4 x i32> poison, <vscale x 4 x i16> %a,iXLen 1, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %b, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}

>From 8085ca06b5fd3cad2fadcc763b4e7149bcd214e2 Mon Sep 17 00:00:00 2001
From: Michael Maitland <michaeltmaitland at gmail.com>
Date: Mon, 23 Sep 2024 10:45:14 -0700
Subject: [PATCH 11/12] fixup! add more supported instrs and tests

---
 llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp   |  74 ++-
 llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll | 645 +++++++++++++++++--
 2 files changed, 643 insertions(+), 76 deletions(-)

diff --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index a948e8f22332a8..60b6e5eba6da1c 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -1340,25 +1340,79 @@ static bool isSupportedInstr(const MachineInstr &MI) {
     return false;
 
   switch (RVV->BaseInstr) {
+  // 11.1. Vector Single-Width Integer Add and Subtract
   case RISCV::VADD_VI:
   case RISCV::VADD_VV:
   case RISCV::VADD_VX:
-  case RISCV::VMUL_VV:
-  case RISCV::VMUL_VX:
-  case RISCV::VSLL_VI:
-  case RISCV::VSEXT_VF2:
-  case RISCV::VSEXT_VF4:
-  case RISCV::VSEXT_VF8:
+  case RISCV::VSUB_VV:
+  case RISCV::VSUB_VX:
+  case RISCV::VRSUB_VI:
+  case RISCV::VRSUB_VX:
+  // 11.2. Vector Widening Integer Add/Subtract
+  case RISCV::VWADDU_VV:
+  case RISCV::VWADDU_VX:
+  case RISCV::VWSUBU_VV:
+  case RISCV::VWSUBU_VX:
+  case RISCV::VWADD_VV:
+  case RISCV::VWADD_VX:
+  case RISCV::VWSUB_VV:
+  case RISCV::VWSUB_VX:
+  case RISCV::VWADDU_WV:
+  case RISCV::VWADDU_WX:
+  case RISCV::VWSUBU_WV:
+  case RISCV::VWSUBU_WX:
+  case RISCV::VWADD_WV:
+  case RISCV::VWADD_WX:
+  case RISCV::VWSUB_WV:
+  case RISCV::VWSUB_WX:
+  // 11.3. Vector Integer Extension
   case RISCV::VZEXT_VF2:
+  case RISCV::VSEXT_VF2:
   case RISCV::VZEXT_VF4:
+  case RISCV::VSEXT_VF4:
   case RISCV::VZEXT_VF8:
-  case RISCV::VMV_V_I:
-  case RISCV::VMV_V_X:
+  case RISCV::VSEXT_VF8:
+  // 11.4. Vector Integer Add-with-Carry / Subtract-with-Borrow Instructions
+  // FIXME: Add support for 11.4 instructions
+  // 11.5. Vector Bitwise Logical Instructions
+  // FIXME: Add support for 11.5 instructions
+  // 11.6. Vector Single-Width Shift Instructions
+  // FIXME: Add support for 11.6 instructions
+  case RISCV::VSLL_VI:
+  // 11.7. Vector Narrowing Integer Right Shift Instructions
+  // FIXME: Add support for 11.7 instructions
   case RISCV::VNSRL_WI:
-  case RISCV::VWADD_VV:
-  case RISCV::VWADDU_VV:
+  // 11.8 Vector Integer Compare Instructions
+  // FIXME: Add support for 11.8 instructions
+  // 11.9. Vector Integer Min/Max Instructions
+  // FIXME: Add support for 11.9 instructions
+  // 11.10. Vector Single-Width Integer Multiply Instructions
+  case RISCV::VMUL_VV:
+  case RISCV::VMUL_VX:
+  case RISCV::VMULH_VV:
+  case RISCV::VMULH_VX:
+  case RISCV::VMULHU_VV:
+  case RISCV::VMULHU_VX:
+  case RISCV::VMULHSU_VV:
+  case RISCV::VMULHSU_VX:
+  // 11.11. Vector Integer Divide Instructions
+  // FIXME: Add support for 11.11 instructions
+  // 11.12. Vector Widening Integer Multiply Instructions
+  // FIXME: Add support for 11.12 instructions
+  // 11.13. Vector Single-Width Integer Multiply-Add Instructions
+  // FIXME: Add support for 11.13 instructions
+  // 11.14. Vector Widening Integer Multiply-Add Instructions
+  // FIXME: Add support for 11.14 instructions
   case RISCV::VWMACC_VX:
   case RISCV::VWMACCU_VX:
+  // 11.15. Vector Integer Merge Instructions
+  // FIXME: Add support for 11.15 instructions
+  // 11.16. Vector Integer Move Instructions
+  // FIXME: Add support for 11.16 instructions
+  case RISCV::VMV_V_I:
+  case RISCV::VMV_V_X:
+
+  // Vector Crypto
   case RISCV::VWSLL_VI:
     return true;
   }
diff --git a/llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll b/llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll
index 4fd02bd649577d..3f3c76861e9aa2 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll
@@ -66,66 +66,422 @@ define <vscale x 4 x i32> @vadd_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
   ret <vscale x 4 x i32> %2
 }
 
-define <vscale x 4 x i32> @vmul_vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
-; NOVLOPT-LABEL: vmul_vv:
+define <vscale x 4 x i32> @vsub_vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vsub_vv:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
-; NOVLOPT-NEXT:    vmul.vv v8, v8, v10
+; NOVLOPT-NEXT:    vsub.vv v8, v8, v10
 ; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
-; NOVLOPT-NEXT:    vmul.vv v8, v8, v10
+; NOVLOPT-NEXT:    vsub.vv v8, v8, v10
 ; NOVLOPT-NEXT:    ret
 ;
-; VLOPT-LABEL: vmul_vv:
+; VLOPT-LABEL: vsub_vv:
 ; VLOPT:       # %bb.0:
 ; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
-; VLOPT-NEXT:    vmul.vv v8, v8, v10
-; VLOPT-NEXT:    vmul.vv v8, v8, v10
+; VLOPT-NEXT:    vsub.vv v8, v8, v10
+; VLOPT-NEXT:    vsub.vv v8, v8, v10
 ; VLOPT-NEXT:    ret
-  %1 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
-  %2 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %b, iXLen %vl)
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vsub.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vsub.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %b, iXLen %vl)
   ret <vscale x 4 x i32> %2
 }
 
-define <vscale x 4 x i32> @vmul_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
-; NOVLOPT-LABEL: vmul_vx:
+define <vscale x 4 x i32> @vsub_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vsub_vx:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
-; NOVLOPT-NEXT:    vmul.vx v10, v8, a0
+; NOVLOPT-NEXT:    vsub.vx v10, v8, a0
 ; NOVLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
-; NOVLOPT-NEXT:    vmul.vv v8, v10, v8
+; NOVLOPT-NEXT:    vsub.vv v8, v10, v8
 ; NOVLOPT-NEXT:    ret
 ;
-; VLOPT-LABEL: vmul_vx:
+; VLOPT-LABEL: vsub_vx:
 ; VLOPT:       # %bb.0:
 ; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
-; VLOPT-NEXT:    vmul.vx v10, v8, a0
-; VLOPT-NEXT:    vmul.vv v8, v10, v8
+; VLOPT-NEXT:    vsub.vx v10, v8, a0
+; VLOPT-NEXT:    vsub.vv v8, v10, v8
 ; VLOPT-NEXT:    ret
-  %1 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, i32 %b, iXLen -1)
-  %2 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vsub.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vsub.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
   ret <vscale x 4 x i32> %2
 }
 
-define <vscale x 4 x i32> @vsll_vi(<vscale x 4 x i32> %a, iXLen %vl) {
-; NOVLOPT-LABEL: vsll_vi:
+define <vscale x 4 x i32> @vrsub_vi(<vscale x 4 x i32> %a, iXLen %vl) {
+; NOVLOPT-LABEL: vrsub_vi:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
-; NOVLOPT-NEXT:    vsll.vi v10, v8, 5
+; NOVLOPT-NEXT:    vrsub.vi v10, v8, 5
 ; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
-; NOVLOPT-NEXT:    vsll.vv v8, v10, v8
+; NOVLOPT-NEXT:    vadd.vv v8, v10, v8
 ; NOVLOPT-NEXT:    ret
 ;
-; VLOPT-LABEL: vsll_vi:
+; VLOPT-LABEL: vrsub_vi:
 ; VLOPT:       # %bb.0:
 ; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
-; VLOPT-NEXT:    vsll.vi v10, v8, 5
-; VLOPT-NEXT:    vsll.vv v8, v10, v8
+; VLOPT-NEXT:    vrsub.vi v10, v8, 5
+; VLOPT-NEXT:    vadd.vv v8, v10, v8
 ; VLOPT-NEXT:    ret
-  %1 = call <vscale x 4 x i32> @llvm.riscv.vsll.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, iXLen 5, iXLen -1)
-  %2 = call <vscale x 4 x i32> @llvm.riscv.vsll.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vrsub.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, i32 5, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
   ret <vscale x 4 x i32> %2
 }
 
+define <vscale x 4 x i32> @vrsub_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vrsub_vx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vrsub.vx v10, v8, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vsub.vv v8, v10, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vrsub_vx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vrsub.vx v10, v8, a0
+; VLOPT-NEXT:    vsub.vv v8, v10, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vrsub.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vsub.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i64> @vwaddu.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwaddu.vv:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwaddu.vv v12, v8, v10
+; NOVLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v12, v12
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwaddu.vv:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vwaddu.vv v12, v8, v10
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v12, v12
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwaddu.nxv4i64.nxv4i32.nxv4i32(<vscale x 4 x i64> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwaddu.vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwaddu.vx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwaddu.vx v12, v8, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v12, v12
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwaddu.vx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vwaddu.vx v12, v8, a0
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v12, v12
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwaddu.nxv4i64.nxv4i32.i32(<vscale x 4 x i64> poison, <vscale x 4 x i32> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwsubu.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwsubu.vv:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwsubu.vv v12, v8, v10
+; NOVLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v12, v12
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwsubu.vv:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vwsubu.vv v12, v8, v10
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v12, v12
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwsubu.nxv4i64.nxv4i32.nxv4i32(<vscale x 4 x i64> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwsubu.vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwsubu.vx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwsubu.vx v12, v8, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v12, v12
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwsubu.vx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vwsubu.vx v12, v8, a0
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v12, v12
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwsubu.nxv4i64.nxv4i32.i32(<vscale x 4 x i64> poison, <vscale x 4 x i32> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwadd.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwadd.vv:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwadd.vv v12, v8, v10
+; NOVLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v12, v12
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwadd.vv:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vwadd.vv v12, v8, v10
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v12, v12
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwadd.nxv4i64.nxv4i32.nxv4i32(<vscale x 4 x i64> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwadd.vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwadd.vx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwadd.vx v12, v8, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v12, v12
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwadd.vx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vwadd.vx v12, v8, a0
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v12, v12
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwadd.nxv4i64.nxv4i32.i32(<vscale x 4 x i64> poison, <vscale x 4 x i32> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwsub.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwsub.vv:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwsub.vv v12, v8, v10
+; NOVLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v12, v12
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwsub.vv:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vwsub.vv v12, v8, v10
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v12, v12
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwsub.nxv4i64.nxv4i32.nxv4i32(<vscale x 4 x i64> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwsub.vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwsub.vx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwsub.vx v12, v8, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v12, v12
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwsub.vx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vwsub.vx v12, v8, a0
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v12, v12
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwsub.nxv4i64.nxv4i32.i32(<vscale x 4 x i64> poison, <vscale x 4 x i32> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwaddu.wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwaddu.wv:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwaddu.wv v8, v8, v12
+; NOVLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v8, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwaddu.wv:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vwaddu.wv v8, v8, v12
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v8, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwaddu.w.nxv4i64.nxv4i32.nxv4i32(<vscale x 4 x i64> poison, <vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwaddu.wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwaddu.wx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwaddu.wx v8, v8, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v8, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwaddu.wx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vwaddu.wx v8, v8, a0
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v8, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwaddu.w.xv4i64.nxv4i32.i32(<vscale x 4 x i64> poison, <vscale x 4 x i64> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwsubu.wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwsubu.wv:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwsubu.wv v8, v8, v12
+; NOVLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v8, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwsubu.wv:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vwsubu.wv v8, v8, v12
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v8, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwsubu.w.nxv4i64.nxv4i32.nxv4i32(<vscale x 4 x i64> poison, <vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwsubu.wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwsubu.wx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwsubu.wx v8, v8, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v8, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwsubu.wx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vwsubu.wx v8, v8, a0
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v8, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwsubu.w.nxv4i64.nxv4i32.i32(<vscale x 4 x i64> poison, <vscale x 4 x i64> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwadd.wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwadd.wv:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwadd.wv v8, v8, v12
+; NOVLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v8, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwadd.wv:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vwadd.wv v8, v8, v12
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v8, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwadd.w.nxv4i64.nxv4i32.nxv4i32(<vscale x 4 x i64> poison, <vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwadd.wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwadd.wx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwadd.wx v8, v8, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v8, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwadd.wx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vwadd.wx v8, v8, a0
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v8, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwadd.w.nxv4i64.nxv4i32.i32(<vscale x 4 x i64> poison, <vscale x 4 x i64> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwsub.wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwsub.wv:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwsub.wv v8, v8, v12
+; NOVLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v8, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwsub.wv:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vwsub.wv v8, v8, v12
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v8, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwsub.w.nxv4i64.nxv4i32.nxv4i32(<vscale x 4 x i64> poison, <vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
+define <vscale x 4 x i64> @vwsub.wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vwsub.wx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vwsub.wx v8, v8, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e64, m4, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v8, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vwsub.wx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vwsub.wx v8, v8, a0
+; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
+; VLOPT-NEXT:    vadd.vv v8, v8, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i64> @llvm.riscv.vwsub.w.nxv4i64.nxv4i32.i32(<vscale x 4 x i64> poison, <vscale x 4 x i64> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
+  ret <vscale x 4 x i64> %2
+}
+
 define <vscale x 4 x i32> @vsext.vf2(<vscale x 4 x i16> %a, <vscale x 4 x i32> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vsext.vf2:
 ; NOVLOPT:       # %bb.0:
@@ -246,26 +602,23 @@ define <vscale x 4 x i64> @vzext.vf8(<vscale x 4 x i8> %a, <vscale x 4 x i64> %b
   ret <vscale x 4 x i64> %2
 }
 
-; FIXME: Add a test for vmv.v.i
-; FIXME: Add a test for vmv.v.v
-
-define <vscale x 4 x i32> @vmv.v.x(<vscale x 4 x i32> %a, i32 %x, iXLen %vl) {
-; NOVLOPT-LABEL: vmv.v.x:
+define <vscale x 4 x i32> @vsll_vi(<vscale x 4 x i32> %a, iXLen %vl) {
+; NOVLOPT-LABEL: vsll_vi:
 ; NOVLOPT:       # %bb.0:
-; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
-; NOVLOPT-NEXT:    vmv.v.x v10, a0
-; NOVLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
-; NOVLOPT-NEXT:    vadd.vv v8, v10, v8
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vsll.vi v10, v8, 5
+; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vsll.vv v8, v10, v8
 ; NOVLOPT-NEXT:    ret
 ;
-; VLOPT-LABEL: vmv.v.x:
+; VLOPT-LABEL: vsll_vi:
 ; VLOPT:       # %bb.0:
-; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
-; VLOPT-NEXT:    vmv.v.x v10, a0
-; VLOPT-NEXT:    vadd.vv v8, v10, v8
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vsll.vi v10, v8, 5
+; VLOPT-NEXT:    vsll.vv v8, v10, v8
 ; VLOPT-NEXT:    ret
-  %1 = call <vscale x 4 x i32> @llvm.riscv.vmv.v.x.nxv4i32(<vscale x 4 x i32> poison, i32 %x, iXLen -1)
-  %2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vsll.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, iXLen 5, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vsll.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
   ret <vscale x 4 x i32> %2
 }
 
@@ -289,46 +642,166 @@ define <vscale x 4 x i16> @vnsrl_wi(<vscale x 4 x i32> %a, <vscale x 4 x i16> %b
   ret <vscale x 4 x i16> %2
 }
 
-define <vscale x 4 x i64> @vwadd.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
-; NOVLOPT-LABEL: vwadd.vv:
+
+
+define <vscale x 4 x i32> @vmul_vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vmul_vv:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
-; NOVLOPT-NEXT:    vwadd.vv v12, v8, v10
-; NOVLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
-; NOVLOPT-NEXT:    vadd.vv v8, v12, v12
+; NOVLOPT-NEXT:    vmul.vv v8, v8, v10
+; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmul.vv v8, v8, v10
 ; NOVLOPT-NEXT:    ret
 ;
-; VLOPT-LABEL: vwadd.vv:
+; VLOPT-LABEL: vmul_vv:
 ; VLOPT:       # %bb.0:
 ; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
-; VLOPT-NEXT:    vwadd.vv v12, v8, v10
-; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
-; VLOPT-NEXT:    vadd.vv v8, v12, v12
+; VLOPT-NEXT:    vmul.vv v8, v8, v10
+; VLOPT-NEXT:    vmul.vv v8, v8, v10
 ; VLOPT-NEXT:    ret
-  %1 = call <vscale x 4 x i64> @llvm.riscv.vwadd.nxv4i64.nxv4i32.nxv4i32(<vscale x 4 x i64> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
-  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
-  ret <vscale x 4 x i64> %2
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %b, iXLen %vl)
+  ret <vscale x 4 x i32> %2
 }
 
-define <vscale x 4 x i64> @vwaddu.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
-; NOVLOPT-LABEL: vwaddu.vv:
+define <vscale x 4 x i32> @vmul_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vmul_vx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmul.vx v10, v8, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmul.vv v8, v10, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vmul_vx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vmul.vx v10, v8, a0
+; VLOPT-NEXT:    vmul.vv v8, v10, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vmulh_vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vmulh_vv:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
-; NOVLOPT-NEXT:    vwaddu.vv v12, v8, v10
-; NOVLOPT-NEXT:    vsetvli zero, a0, e64, m4, ta, ma
-; NOVLOPT-NEXT:    vadd.vv v8, v12, v12
+; NOVLOPT-NEXT:    vmulh.vv v8, v8, v10
+; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmul.vv v8, v8, v10
 ; NOVLOPT-NEXT:    ret
 ;
-; VLOPT-LABEL: vwaddu.vv:
+; VLOPT-LABEL: vmulh_vv:
 ; VLOPT:       # %bb.0:
 ; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
-; VLOPT-NEXT:    vwaddu.vv v12, v8, v10
-; VLOPT-NEXT:    vsetvli zero, zero, e64, m4, ta, ma
-; VLOPT-NEXT:    vadd.vv v8, v12, v12
+; VLOPT-NEXT:    vmulh.vv v8, v8, v10
+; VLOPT-NEXT:    vmul.vv v8, v8, v10
 ; VLOPT-NEXT:    ret
-  %1 = call <vscale x 4 x i64> @llvm.riscv.vwaddu.nxv4i64.nxv4i32.nxv4i32(<vscale x 4 x i64> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
-  %2 = call <vscale x 4 x i64> @llvm.riscv.vadd.nxv4i64.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> %1, <vscale x 4 x i64> %1, iXLen %vl)
-  ret <vscale x 4 x i64> %2
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vmulh.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %b, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vmulh_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vmulh_vx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmulh.vx v10, v8, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmul.vv v8, v10, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vmulh_vx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vmulh.vx v10, v8, a0
+; VLOPT-NEXT:    vmul.vv v8, v10, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vmulh.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vmulhu_vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vmulhu_vv:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmulhu.vv v8, v8, v10
+; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmul.vv v8, v8, v10
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vmulhu_vv:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vmulhu.vv v8, v8, v10
+; VLOPT-NEXT:    vmul.vv v8, v8, v10
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vmulhu.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %b, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vmulhu_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vmulhu_vx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmulhu.vx v10, v8, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmul.vv v8, v10, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vmulhu_vx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vmulhu.vx v10, v8, a0
+; VLOPT-NEXT:    vmul.vv v8, v10, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vmulhu.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vmulhsu_vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+; NOVLOPT-LABEL: vmulhsu_vv:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmulhsu.vv v8, v8, v10
+; NOVLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmul.vv v8, v8, v10
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vmulhsu_vv:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a0, e32, m2, ta, ma
+; VLOPT-NEXT:    vmulhsu.vv v8, v8, v10
+; VLOPT-NEXT:    vmul.vv v8, v8, v10
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vmulhsu.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %b, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vmulhsu_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+; NOVLOPT-LABEL: vmulhsu_vx:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmulhsu.vx v10, v8, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmul.vv v8, v10, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vmulhsu_vx:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vmulhsu.vx v10, v8, a0
+; VLOPT-NEXT:    vmul.vv v8, v10, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vmulhsu.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, i32 %b, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vmul.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
+  ret <vscale x 4 x i32> %2
 }
 
 define <vscale x 4 x i32> @vwmacc_vx(<vscale x 4 x i16> %a, i16 %b, iXLen %vl) {
@@ -373,6 +846,46 @@ define <vscale x 4 x i32> @vwmaccu_vx(<vscale x 4 x i16> %a, i16 %b, iXLen %vl)
   ret <vscale x 4 x i32> %2
 }
 
+define <vscale x 4 x i32> @vmv.v.i(<vscale x 4 x i32> %a, i32 %x, iXLen %vl) {
+; NOVLOPT-LABEL: vmv.v.i:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a0, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmv.v.i v10, 5
+; NOVLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v10, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vmv.v.i:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vmv.v.i v10, 5
+; VLOPT-NEXT:    vadd.vv v8, v10, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vmv.v.x.nxv4i32(<vscale x 4 x i32> poison, i32 5, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
+define <vscale x 4 x i32> @vmv.v.x(<vscale x 4 x i32> %a, i32 %x, iXLen %vl) {
+; NOVLOPT-LABEL: vmv.v.x:
+; NOVLOPT:       # %bb.0:
+; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vmv.v.x v10, a0
+; NOVLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; NOVLOPT-NEXT:    vadd.vv v8, v10, v8
+; NOVLOPT-NEXT:    ret
+;
+; VLOPT-LABEL: vmv.v.x:
+; VLOPT:       # %bb.0:
+; VLOPT-NEXT:    vsetvli zero, a1, e32, m2, ta, ma
+; VLOPT-NEXT:    vmv.v.x v10, a0
+; VLOPT-NEXT:    vadd.vv v8, v10, v8
+; VLOPT-NEXT:    ret
+  %1 = call <vscale x 4 x i32> @llvm.riscv.vmv.v.x.nxv4i32(<vscale x 4 x i32> poison, i32 %x, iXLen -1)
+  %2 = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %1, <vscale x 4 x i32> %a, iXLen %vl)
+  ret <vscale x 4 x i32> %2
+}
+
 define <vscale x 4 x i32> @vwsll.vi(<vscale x 4 x i16> %a, <vscale x 4 x i32> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwsll.vi:
 ; NOVLOPT:       # %bb.0:

>From be9f872243dee3e2df89d61b7ce3e94c01c54eab Mon Sep 17 00:00:00 2001
From: Michael Maitland <michaeltmaitland at gmail.com>
Date: Tue, 24 Sep 2024 08:39:04 -0700
Subject: [PATCH 12/12] fixup! improve test names

---
 cross-project-tests/CMakeLists.txt            |  100 --
 .../amdgpu/builtins-amdgcn-gfx12-wmma-w32.cl  |  107 --
 .../amdgpu/builtins-amdgcn-gfx12-wmma-w64.cl  |  104 --
 .../amdgpu/builtins-amdgcn-swmmac-w32.cl      |  110 --
 .../amdgpu/builtins-amdgcn-swmmac-w64.cl      |  109 --
 .../amdgpu/builtins-amdgcn-wmma-w32.cl        |   68 -
 .../amdgpu/builtins-amdgcn-wmma-w64.cl        |   72 -
 cross-project-tests/amdgpu/lit.local.cfg      |    2 -
 .../debuginfo-tests/README.txt                |   43 -
 .../clang_llvm_roundtrip/lit.local.cfg        |    3 -
 .../simplified_template_names.cpp             |  360 ----
 ...template_names_noncanonical_type_units.cpp |   41 -
 .../dexter-tests/aggregate-indirect-arg.cpp   |   44 -
 .../dexter-tests/asan-deque.cpp               |   47 -
 .../debuginfo-tests/dexter-tests/asan.c       |   29 -
 .../debuginfo-tests/dexter-tests/ctor.cpp     |   37 -
 .../debuginfo-tests/dexter-tests/dbg-arg.c    |   60 -
 .../dexter-tests/deferred_globals.cpp         |   28 -
 .../dexter-tests/global-constant.cpp          |   30 -
 .../debuginfo-tests/dexter-tests/hello.c      |   13 -
 .../dexter-tests/inline-line-gap.cpp          |   46 -
 .../dexter-tests/lit.local.cfg                |    2 -
 .../dexter-tests/memvars/bitcast.c            |   77 -
 .../dexter-tests/memvars/const-branch.c       |   52 -
 .../dexter-tests/memvars/ctrl-flow.c          |   34 -
 .../dexter-tests/memvars/implicit-ptr.c       |   45 -
 .../memvars/inline-escaping-function.c        |   45 -
 .../dexter-tests/memvars/inlining-dse.c       |   52 -
 .../dexter-tests/memvars/inlining.c           |   26 -
 .../dexter-tests/memvars/loop.c               |   56 -
 .../dexter-tests/memvars/merged-store.c       |   43 -
 .../dexter-tests/memvars/ptr-to.c             |   35 -
 .../dexter-tests/memvars/struct-dse.c         |   35 -
 .../memvars/unused-merged-value.c             |   46 -
 .../dexter-tests/namespace.cpp                |   24 -
 .../dexter-tests/nrvo-string.cpp              |   56 -
 .../debuginfo-tests/dexter-tests/nrvo.cpp     |   40 -
 .../dexter-tests/optnone-fastmath.cpp         |  105 --
 .../dexter-tests/optnone-loops.cpp            |  161 --
 .../dexter-tests/optnone-simple-functions.cpp |  106 --
 .../optnone-struct-and-methods.cpp            |  106 --
 .../optnone-vectors-and-functions.cpp         |  135 --
 .../dexter-tests/realigned-frame.cpp          |   39 -
 .../debuginfo-tests/dexter-tests/stack-var.c  |   17 -
 .../debuginfo-tests/dexter-tests/vla.c        |   23 -
 .../debuginfo-tests/dexter/.gitignore         |    3 -
 .../debuginfo-tests/dexter/Commands.md        |  379 ----
 .../debuginfo-tests/dexter/LICENSE.txt        |  279 ---
 .../debuginfo-tests/dexter/README.md          |  260 ---
 .../debuginfo-tests/dexter/dex/__init__.py    |    8 -
 .../dexter/dex/command/CommandBase.py         |   58 -
 .../dexter/dex/command/ParseCommand.py        |  550 ------
 .../dexter/dex/command/StepValueInfo.py       |   27 -
 .../dexter/dex/command/__init__.py            |    9 -
 .../dex/command/commands/DexCommandLine.py    |   34 -
 .../dex/command/commands/DexDeclareAddress.py |   67 -
 .../dex/command/commands/DexDeclareFile.py    |   30 -
 .../command/commands/DexExpectProgramState.py |   91 -
 .../dex/command/commands/DexExpectStepKind.py |   48 -
 .../command/commands/DexExpectStepOrder.py    |   55 -
 .../command/commands/DexExpectWatchBase.py    |  315 ----
 .../command/commands/DexExpectWatchType.py    |   28 -
 .../command/commands/DexExpectWatchValue.py   |   28 -
 .../dex/command/commands/DexFinishTest.py     |   39 -
 .../dexter/dex/command/commands/DexLabel.py   |   41 -
 .../dex/command/commands/DexLimitSteps.py     |   45 -
 .../dex/command/commands/DexUnreachable.py    |   55 -
 .../dexter/dex/command/commands/DexWatch.py   |   39 -
 .../dexter/dex/debugger/DebuggerBase.py       |  317 ----
 .../ConditionalController.py                  |  224 ---
 .../DebuggerControllers/ControllerHelpers.py  |   51 -
 .../DebuggerControllerBase.py                 |   43 -
 .../DebuggerControllers/DefaultController.py  |  139 --
 .../dexter/dex/debugger/Debuggers.py          |  334 ----
 .../dexter/dex/debugger/__init__.py           |   12 -
 .../dexter/dex/debugger/dbgeng/README.md      |   56 -
 .../dexter/dex/debugger/dbgeng/__init__.py    |   20 -
 .../dexter/dex/debugger/dbgeng/breakpoint.py  |  100 --
 .../dexter/dex/debugger/dbgeng/client.py      |  237 ---
 .../dexter/dex/debugger/dbgeng/control.py     |  450 -----
 .../dexter/dex/debugger/dbgeng/dbgeng.py      |  204 ---
 .../dex/debugger/dbgeng/probe_process.py      |   83 -
 .../dexter/dex/debugger/dbgeng/setup.py       |  157 --
 .../dexter/dex/debugger/dbgeng/symbols.py     |  606 -------
 .../dexter/dex/debugger/dbgeng/symgroup.py    |  104 --
 .../dexter/dex/debugger/dbgeng/sysobjs.py     |  220 ---
 .../dexter/dex/debugger/dbgeng/utils.py       |   52 -
 .../dexter/dex/debugger/lldb/LLDB.py          |  385 -----
 .../dexter/dex/debugger/lldb/__init__.py      |    8 -
 .../dex/debugger/visualstudio/VisualStudio.py |  448 -----
 .../debugger/visualstudio/VisualStudio2015.py |   23 -
 .../debugger/visualstudio/VisualStudio2017.py |   23 -
 .../debugger/visualstudio/VisualStudio2019.py |   23 -
 .../debugger/visualstudio/VisualStudio2022.py |   23 -
 .../dex/debugger/visualstudio/__init__.py     |    9 -
 .../visualstudio/windows/ComInterface.py      |  123 --
 .../debugger/visualstudio/windows/__init__.py |    6 -
 .../dexter/dex/dextIR/BuilderIR.py            |   15 -
 .../dexter/dex/dextIR/DebuggerIR.py           |   14 -
 .../dexter/dex/dextIR/DextIR.py               |  148 --
 .../dexter/dex/dextIR/FrameIR.py              |   16 -
 .../dexter/dex/dextIR/LocIR.py                |   48 -
 .../dexter/dex/dextIR/ProgramState.py         |  130 --
 .../dexter/dex/dextIR/StepIR.py               |  110 --
 .../dexter/dex/dextIR/ValueIR.py              |   41 -
 .../dexter/dex/dextIR/__init__.py             |   16 -
 .../dexter/dex/heuristic/Heuristic.py         |  585 -------
 .../dexter/dex/heuristic/__init__.py          |    8 -
 .../debuginfo-tests/dexter/dex/tools/Main.py  |  219 ---
 .../dexter/dex/tools/TestToolBase.py          |  146 --
 .../dexter/dex/tools/ToolBase.py              |  147 --
 .../dexter/dex/tools/__init__.py              |   10 -
 .../dexter/dex/tools/clang_opt_bisect/Tool.py |  343 ----
 .../dexter/dex/tools/help/Tool.py             |   58 -
 .../dexter/dex/tools/help/__init__.py         |    8 -
 .../dexter/dex/tools/list_debuggers/Tool.py   |   40 -
 .../dex/tools/list_debuggers/__init__.py      |    8 -
 .../dexter/dex/tools/no_tool_/Tool.py         |   52 -
 .../dexter/dex/tools/no_tool_/__init__.py     |    8 -
 .../dex/tools/run_debugger_internal_/Tool.py  |   68 -
 .../tools/run_debugger_internal_/__init__.py  |    8 -
 .../dexter/dex/tools/test/Tool.py             |  278 ---
 .../dexter/dex/tools/test/__init__.py         |    8 -
 .../dexter/dex/tools/view/Tool.py             |   63 -
 .../dexter/dex/tools/view/__init__.py         |    8 -
 .../dexter/dex/utils/Environment.py           |   23 -
 .../dexter/dex/utils/Exceptions.py            |   87 -
 .../dexter/dex/utils/ExtArgParse.py           |  154 --
 .../dexter/dex/utils/Logging.py               |   45 -
 .../dexter/dex/utils/PrettyOutputBase.py      |  399 -----
 .../dexter/dex/utils/ReturnCode.py            |   20 -
 .../dexter/dex/utils/RootDirectory.py         |   15 -
 .../dexter/dex/utils/Timeout.py               |   31 -
 .../debuginfo-tests/dexter/dex/utils/Timer.py |   51 -
 .../dexter/dex/utils/UnitTests.py             |   62 -
 .../dexter/dex/utils/Version.py               |   61 -
 .../dexter/dex/utils/WorkingDirectory.py      |   47 -
 .../dexter/dex/utils/__init__.py              |   22 -
 .../dexter/dex/utils/posix/PrettyOutput.py    |   34 -
 .../dexter/dex/utils/posix/__init__.py        |    6 -
 .../dexter/dex/utils/windows/PrettyOutput.py  |   83 -
 .../dexter/dex/utils/windows/__init__.py      |    6 -
 .../debuginfo-tests/dexter/dexter.py          |   21 -
 .../dexter/feature_tests/Readme.md            |    4 -
 .../commands/penalty/dex_declare_file.cpp     |   18 -
 .../commands/penalty/expect_program_state.cpp |   36 -
 .../commands/penalty/expect_step_kinds.cpp    |   26 -
 .../commands/penalty/expect_step_order.cpp    |   17 -
 .../commands/penalty/expect_watch_type.cpp    |   58 -
 .../commands/penalty/expect_watch_value.cpp   |   21 -
 .../penalty/float_range_out_range.cpp         |   17 -
 .../penalty/float_range_zero_nonmatch.cpp     |   16 -
 .../commands/penalty/missing_dex_address.cpp  |   22 -
 .../commands/penalty/unreachable.cpp          |   16 -
 .../penalty/unreachable_line_range.cpp        |   18 -
 .../commands/penalty/unreachable_on_line.cpp  |   18 -
 .../commands/perfect/command_line.c           |   18 -
 .../dex_declare_address/address_after_ref.cpp |   16 -
 .../dex_declare_address/address_hit_count.cpp |   19 -
 .../expression_address.cpp                    |   17 -
 .../dex_declare_address/identical_address.cpp |   17 -
 .../perfect/dex_declare_address/lit.local.cfg |    3 -
 .../dex_declare_address/multiple_address.cpp  |   23 -
 .../dex_declare_address/offset_address.cpp    |   17 -
 .../dex_declare_address/self_comparison.cpp   |   17 -
 .../dex_and_source/commands.dex               |    2 -
 .../dex_and_source/lit.local.cfg.py           |    1 -
 .../dex_declare_file/dex_and_source/test.cfg  |    0
 .../dex_declare_file/dex_and_source/test.cpp  |   16 -
 .../perfect/dex_declare_file/lit.local.cfg    |    3 -
 .../precompiled_binary/commands.dex           |   18 -
 .../precompiled_binary/lit.local.cfg.py       |    1 -
 .../precompiled_binary/test.cpp               |    4 -
 .../dex_commands/commands.dex                 |   19 -
 .../dex_commands/source_root_dir.dex          |   22 -
 .../lit.local.cfg.py                          |    1 -
 .../source/test.cpp                           |    4 -
 .../lit.local.cfg.py                          |    1 -
 .../source/test file.cpp                      |    4 -
 .../windows_noncanonical_path/test.cfg        |    0
 .../windows_noncanonical_path/test.dex        |   17 -
 .../dex_finish_test/default_conditional.cpp   |   19 -
 .../default_conditional_hit_count.cpp         |   22 -
 .../dex_finish_test/default_hit_count.cpp     |   17 -
 .../dex_finish_test/default_simple.cpp        |   18 -
 .../limit_steps_conditional.cpp               |   21 -
 .../limit_steps_conditional_hit_count.cpp     |   24 -
 .../dex_finish_test/limit_steps_hit_count.cpp |   21 -
 .../dex_finish_test/limit_steps_simple.cpp    |   22 -
 .../commands/perfect/expect_program_state.cpp |   52 -
 .../perfect/expect_step_kind/direction.cpp    |   35 -
 .../perfect/expect_step_kind/func.cpp         |   24 -
 .../expect_step_kind/func_external.cpp        |   28 -
 .../perfect/expect_step_kind/recursive.cpp    |   25 -
 .../perfect/expect_step_kind/small_loop.cpp   |   24 -
 .../commands/perfect/expect_step_order.cpp    |   25 -
 .../commands/perfect/expect_watch_type.cpp    |   55 -
 .../commands/perfect/expect_watch_value.cpp   |   38 -
 .../float_range_multiple.cpp                  |   19 -
 .../float_range_watch/float_range_no_arg.cpp  |   19 -
 .../float_range_watch/float_range_small.cpp   |   17 -
 .../float_range_zero_match.cpp                |   15 -
 .../perfect/limit_steps/hit_count.cpp         |   20 -
 .../limit_steps_check_json_step_count.cpp     |   19 -
 .../limit_steps/limit_steps_expect_loop.cpp   |   19 -
 .../limit_steps/limit_steps_expect_value.cpp  |   17 -
 .../limit_steps/limit_steps_line_mismatch.cpp |   21 -
 .../limit_steps_overlapping_ranges.cpp        |   35 -
 .../limit_steps_same_line_conditional.cpp     |   25 -
 .../perfect/limit_steps/lit.local.cfg         |    3 -
 .../perfect/limit_steps/unconditional.cpp     |   24 -
 .../commands/perfect/unreachable.cpp          |   15 -
 .../perfect/unreachable_not_cmd_lineno.cpp    |   18 -
 .../commands/perfect/unreachable_on_line.cpp  |   19 -
 .../dexter/feature_tests/lit.local.cfg        |    5 -
 .../feature_tests/subtools/help/help.test     |    9 -
 .../list-debuggers/list-debuggers.test        |    9 -
 .../subtools/test/address_printing.cpp        |   53 -
 .../subtools/test/err_bad_label_ref.cpp       |   15 -
 .../subtools/test/err_duplicate_address.cpp   |   17 -
 .../subtools/test/err_duplicate_label.cpp     |   13 -
 .../subtools/test/err_label_kwarg.cpp         |    8 -
 .../test/err_limit_steps_no_values.cpp        |    9 -
 .../feature_tests/subtools/test/err_paren.cpp |   22 -
 .../subtools/test/err_paren_mline.cpp         |   25 -
 .../subtools/test/err_syntax.cpp              |   21 -
 .../test/err_syntax_dexdeclarefile.cpp        |   14 -
 .../subtools/test/err_syntax_mline.cpp        |   25 -
 .../feature_tests/subtools/test/err_type.cpp  |   21 -
 .../subtools/test/err_type_mline.cpp          |   25 -
 .../subtools/test/err_undeclared_addr.cpp     |   17 -
 .../subtools/test/label_another_line.cpp      |   15 -
 .../subtools/test/label_offset.cpp            |   25 -
 .../subtools/test/source-root-dir.cpp         |   16 -
 .../subtools/test/target_run_args.c           |   16 -
 .../test/target_run_args_with_command.c       |   17 -
 .../dexter/feature_tests/subtools/view.cpp    |   18 -
 .../dexter/feature_tests/unittests/run.test   |    9 -
 .../debuginfo-tests/lit.local.cfg             |    2 -
 .../llgdb-tests/apple-accel.cpp               |   23 -
 .../debuginfo-tests/llgdb-tests/asan-blocks.c |   43 -
 .../llgdb-tests/asan-deque.cpp                |   49 -
 .../debuginfo-tests/llgdb-tests/asan.c        |   31 -
 .../debuginfo-tests/llgdb-tests/block_var.m   |   32 -
 .../debuginfo-tests/llgdb-tests/blocks.m      |   43 -
 .../debuginfo-tests/llgdb-tests/foreach.m     |   31 -
 .../llgdb-tests/forward-declare-class.cpp     |   27 -
 .../debuginfo-tests/llgdb-tests/lit.local.cfg |    3 -
 .../debuginfo-tests/llgdb-tests/llgdb.py      |  163 --
 .../llgdb-tests/nested-struct.cpp             |   22 -
 .../llgdb-tests/nrvo-string.cpp               |   52 -
 .../debuginfo-tests/llgdb-tests/safestack.c   |   52 -
 .../debuginfo-tests/llgdb-tests/sret.cpp      |   72 -
 .../llgdb-tests/static-member-2.cpp           |   37 -
 .../llgdb-tests/static-member.cpp             |   36 -
 .../llgdb-tests/test_debuginfo.pl             |   86 -
 .../llvm-prettyprinters/gdb/lit.local.cfg     |   11 -
 .../llvm-prettyprinters/gdb/llvm-support.cpp  |   71 -
 .../llvm-prettyprinters/gdb/llvm-support.gdb  |  131 --
 .../llvm-prettyprinters/gdb/mlir-support.cpp  |   51 -
 .../llvm-prettyprinters/gdb/mlir-support.gdb  |  147 --
 .../debuginfo-tests/win_cdb-tests/README.txt  |   12 -
 .../win_cdb-tests/lit.local.cfg.py            |    2 -
 .../intrinsic-header-tests/README.txt         |    3 -
 .../intrinsic-header-tests/lit.local.cfg      |    2 -
 .../intrinsic-header-tests/wasm_simd128.c     | 1523 -----------------
 cross-project-tests/lit.cfg.py                |  296 ----
 cross-project-tests/lit.site.cfg.py.in        |   28 -
 llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll  |   52 +-
 269 files changed, 26 insertions(+), 18404 deletions(-)
 delete mode 100644 cross-project-tests/CMakeLists.txt
 delete mode 100644 cross-project-tests/amdgpu/builtins-amdgcn-gfx12-wmma-w32.cl
 delete mode 100644 cross-project-tests/amdgpu/builtins-amdgcn-gfx12-wmma-w64.cl
 delete mode 100644 cross-project-tests/amdgpu/builtins-amdgcn-swmmac-w32.cl
 delete mode 100644 cross-project-tests/amdgpu/builtins-amdgcn-swmmac-w64.cl
 delete mode 100644 cross-project-tests/amdgpu/builtins-amdgcn-wmma-w32.cl
 delete mode 100644 cross-project-tests/amdgpu/builtins-amdgcn-wmma-w64.cl
 delete mode 100644 cross-project-tests/amdgpu/lit.local.cfg
 delete mode 100644 cross-project-tests/debuginfo-tests/README.txt
 delete mode 100644 cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/lit.local.cfg
 delete mode 100644 cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/simplified_template_names.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/simplified_template_names_noncanonical_type_units.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/aggregate-indirect-arg.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/asan-deque.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/asan.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/ctor.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/dbg-arg.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/deferred_globals.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/global-constant.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/hello.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/inline-line-gap.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/lit.local.cfg
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/memvars/bitcast.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/memvars/const-branch.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/memvars/ctrl-flow.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/memvars/implicit-ptr.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/memvars/inline-escaping-function.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/memvars/inlining-dse.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/memvars/inlining.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/memvars/loop.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/memvars/merged-store.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/memvars/ptr-to.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/memvars/struct-dse.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/memvars/unused-merged-value.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/namespace.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/nrvo-string.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/nrvo.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/optnone-fastmath.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/optnone-loops.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/optnone-simple-functions.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/optnone-vectors-and-functions.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/realigned-frame.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/stack-var.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter-tests/vla.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/.gitignore
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/Commands.md
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/LICENSE.txt
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/README.md
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/CommandBase.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/ParseCommand.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/StepValueInfo.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexCommandLine.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareAddress.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareFile.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectProgramState.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectStepKind.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectStepOrder.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchBase.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchType.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchValue.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexFinishTest.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexLabel.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexLimitSteps.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexUnreachable.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexWatch.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerBase.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/ConditionalController.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/ControllerHelpers.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/DebuggerControllerBase.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/DefaultController.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/Debuggers.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/README.md
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/breakpoint.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/client.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/control.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/dbgeng.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/probe_process.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/setup.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/symbols.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/symgroup.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/sysobjs.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/utils.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/LLDB.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2015.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2017.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2019.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2022.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/windows/ComInterface.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/windows/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/dextIR/BuilderIR.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/dextIR/DebuggerIR.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/dextIR/DextIR.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/dextIR/FrameIR.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/dextIR/LocIR.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/dextIR/ProgramState.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/dextIR/StepIR.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/dextIR/ValueIR.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/dextIR/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/heuristic/Heuristic.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/heuristic/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/Main.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/TestToolBase.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/ToolBase.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/clang_opt_bisect/Tool.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/help/Tool.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/help/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/list_debuggers/Tool.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/list_debuggers/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/no_tool_/Tool.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/no_tool_/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/run_debugger_internal_/Tool.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/run_debugger_internal_/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/test/Tool.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/test/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/view/Tool.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/tools/view/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/Environment.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/Exceptions.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/ExtArgParse.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/Logging.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/PrettyOutputBase.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/ReturnCode.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/RootDirectory.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/Timeout.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/Timer.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/UnitTests.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/Version.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/WorkingDirectory.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/posix/PrettyOutput.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/posix/__init__.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/windows/PrettyOutput.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/dex/utils/windows/__init__.py
 delete mode 100755 cross-project-tests/debuginfo-tests/dexter/dexter.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/Readme.md
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/dex_declare_file.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_program_state.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_step_kinds.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_step_order.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_watch_type.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_watch_value.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/float_range_out_range.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/float_range_zero_nonmatch.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/missing_dex_address.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/unreachable.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/unreachable_line_range.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/unreachable_on_line.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/command_line.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/address_after_ref.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/address_hit_count.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/expression_address.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/identical_address.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/lit.local.cfg
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/multiple_address.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/offset_address.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/self_comparison.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/commands.dex
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/lit.local.cfg.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/test.cfg
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/test.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/lit.local.cfg
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary/commands.dex
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary/lit.local.cfg.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary/test.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/dex_commands/commands.dex
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/dex_commands/source_root_dir.dex
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/lit.local.cfg.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/source/test.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/lit.local.cfg.py
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/source/test file.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/test.cfg
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/test.dex
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_conditional.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_conditional_hit_count.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_hit_count.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_simple.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_conditional.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_conditional_hit_count.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_hit_count.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_simple.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_program_state.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/direction.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/func.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/func_external.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/recursive.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/small_loop.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_order.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_watch_type.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_watch_value.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_multiple.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_no_arg.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_small.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_zero_match.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/hit_count.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_check_json_step_count.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_expect_loop.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_expect_value.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_line_mismatch.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_overlapping_ranges.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_same_line_conditional.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/lit.local.cfg
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/unconditional.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/unreachable.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/unreachable_not_cmd_lineno.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/unreachable_on_line.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/lit.local.cfg
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/help/help.test
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/list-debuggers/list-debuggers.test
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/address_printing.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_bad_label_ref.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_address.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_label.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_label_kwarg.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_limit_steps_no_values.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren_mline.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_syntax.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_syntax_dexdeclarefile.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_syntax_mline.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_type.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_type_mline.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_undeclared_addr.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/label_another_line.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/label_offset.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/source-root-dir.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args_with_command.c
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/view.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/dexter/feature_tests/unittests/run.test
 delete mode 100644 cross-project-tests/debuginfo-tests/lit.local.cfg
 delete mode 100644 cross-project-tests/debuginfo-tests/llgdb-tests/apple-accel.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/llgdb-tests/asan-blocks.c
 delete mode 100644 cross-project-tests/debuginfo-tests/llgdb-tests/asan-deque.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/llgdb-tests/asan.c
 delete mode 100644 cross-project-tests/debuginfo-tests/llgdb-tests/block_var.m
 delete mode 100644 cross-project-tests/debuginfo-tests/llgdb-tests/blocks.m
 delete mode 100644 cross-project-tests/debuginfo-tests/llgdb-tests/foreach.m
 delete mode 100644 cross-project-tests/debuginfo-tests/llgdb-tests/forward-declare-class.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/llgdb-tests/lit.local.cfg
 delete mode 100755 cross-project-tests/debuginfo-tests/llgdb-tests/llgdb.py
 delete mode 100644 cross-project-tests/debuginfo-tests/llgdb-tests/nested-struct.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/llgdb-tests/nrvo-string.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/llgdb-tests/safestack.c
 delete mode 100644 cross-project-tests/debuginfo-tests/llgdb-tests/sret.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/llgdb-tests/static-member-2.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/llgdb-tests/static-member.cpp
 delete mode 100755 cross-project-tests/debuginfo-tests/llgdb-tests/test_debuginfo.pl
 delete mode 100644 cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/lit.local.cfg
 delete mode 100644 cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.gdb
 delete mode 100644 cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp
 delete mode 100644 cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.gdb
 delete mode 100644 cross-project-tests/debuginfo-tests/win_cdb-tests/README.txt
 delete mode 100644 cross-project-tests/debuginfo-tests/win_cdb-tests/lit.local.cfg.py
 delete mode 100644 cross-project-tests/intrinsic-header-tests/README.txt
 delete mode 100644 cross-project-tests/intrinsic-header-tests/lit.local.cfg
 delete mode 100644 cross-project-tests/intrinsic-header-tests/wasm_simd128.c
 delete mode 100644 cross-project-tests/lit.cfg.py
 delete mode 100644 cross-project-tests/lit.site.cfg.py.in

diff --git a/cross-project-tests/CMakeLists.txt b/cross-project-tests/CMakeLists.txt
deleted file mode 100644
index 7f2fee48fda778..00000000000000
--- a/cross-project-tests/CMakeLists.txt
+++ /dev/null
@@ -1,100 +0,0 @@
-# Cross project tests, for tests that require access to multiple projects across
-# LLVM (e.g. clang, lld and lldb).
-# The subset inside debuginfo-tests invoke clang to generate programs with
-# various types of debug info, and then run those programs under a debugger
-# such as GDB or LLDB to verify the results.
-set(LLVM_SUBPROJECT_TITLE "Cross-Project")
-
-find_package(Python3 COMPONENTS Interpreter)
-
-add_llvm_executable(check-gdb-llvm-support
-        debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp
-)
-target_link_libraries(check-gdb-llvm-support PRIVATE LLVMSupport)
-
-set(CROSS_PROJECT_TESTS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
-set(CROSS_PROJECT_TESTS_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
-
-set(CROSS_PROJECT_TEST_DEPS
-  FileCheck
-  check-gdb-llvm-support
-  count
-  llvm-dwarfdump
-  llvm-config
-  llvm-objdump
-  split-file
-  not
-  )
-
-if ("clang" IN_LIST LLVM_ENABLE_PROJECTS)
-  list(APPEND CROSS_PROJECT_TEST_DEPS clang)
-endif()
-
-if ("mlir" IN_LIST LLVM_ENABLE_PROJECTS)
-  add_llvm_executable(check-gdb-mlir-support
-        debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp
-  )
-  target_include_directories(check-gdb-mlir-support PRIVATE
-                               ${LLVM_EXTERNAL_MLIR_SOURCE_DIR}/include
-                               ${LLVM_BINARY_DIR}/tools/mlir/include)
-  target_link_libraries(check-gdb-mlir-support PRIVATE MLIRIR)
-  list(APPEND CROSS_PROJECT_TEST_DEPS check-gdb-mlir-support)
-  set(MLIR_SOURCE_DIR  ${LLVM_EXTERNAL_MLIR_SOURCE_DIR})
-endif()
-
-if("compiler-rt" IN_LIST LLVM_ENABLE_PROJECTS)
-  # llgdb-tests/asan.c and other asan* files.
-  if(TARGET asan)
-    list(APPEND CROSS_PROJECT_TEST_DEPS asan)
-  endif()
-  # llgdb-tests/safestack.c
-  if(TARGET safestack)
-    list(APPEND CROSS_PROJECT_TEST_DEPS safestack)
-  endif()
-endif()
-# Many dexter tests depend on lldb.
-if("lldb" IN_LIST LLVM_ENABLE_PROJECTS)
-  list(APPEND CROSS_PROJECT_TEST_DEPS lldb lldb-server)
-endif()
-
-if ("lld" IN_LIST LLVM_ENABLE_PROJECTS)
-  list(APPEND CROSS_PROJECT_TEST_DEPS lld)
-endif()
-
-configure_lit_site_cfg(
-  ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
-  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
-  MAIN_CONFIG
-  ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
-  )
-
-add_lit_testsuite(check-cross-project "Running cross-project tests"
-  ${CMAKE_CURRENT_BINARY_DIR}
-  DEPENDS ${CROSS_PROJECT_TEST_DEPS}
-  )
-
-# Add alias for debuginfo test subset.
-add_lit_testsuite(check-debuginfo "Running debuginfo tests"
-  ${CMAKE_CURRENT_BINARY_DIR}/debuginfo-tests
-  EXCLUDE_FROM_CHECK_ALL
-  DEPENDS ${CROSS_PROJECT_TEST_DEPS}
-  )
-
-# Add alias for intrinsic header test subset.
-add_lit_testsuite(check-intrinsic-headers "Running intrinsic header tests"
-  ${CMAKE_CURRENT_BINARY_DIR}/intrinsic-header-tests
-  EXCLUDE_FROM_CHECK_ALL
-  DEPENDS ${CROSS_PROJECT_TEST_DEPS}
-  )
-
-# AMDGPU tests.
-add_lit_testsuite(check-cross-amdgpu "Running AMDGPU cross-project tests"
-  ${CMAKE_CURRENT_BINARY_DIR}/amdgpu
-  EXCLUDE_FROM_CHECK_ALL
-  DEPENDS clang
-  )
-
-# Add check-cross-project-* targets.
-add_lit_testsuites(CROSS_PROJECT ${CMAKE_CURRENT_SOURCE_DIR}
-  DEPENDS ${CROSS_PROJECT_TEST_DEPS}
-  )
diff --git a/cross-project-tests/amdgpu/builtins-amdgcn-gfx12-wmma-w32.cl b/cross-project-tests/amdgpu/builtins-amdgcn-gfx12-wmma-w32.cl
deleted file mode 100644
index 867273126f8fdf..00000000000000
--- a/cross-project-tests/amdgpu/builtins-amdgcn-gfx12-wmma-w32.cl
+++ /dev/null
@@ -1,107 +0,0 @@
-// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1200 -target-feature +wavefrontsize32 -S -o - %s | FileCheck %s --check-prefix=CHECK-GFX1200
-
-typedef int    v2i   __attribute__((ext_vector_type(2)));
-typedef float  v8f   __attribute__((ext_vector_type(8)));
-typedef half   v8h   __attribute__((ext_vector_type(8)));
-typedef short  v8s   __attribute__((ext_vector_type(8)));
-typedef int    v8i   __attribute__((ext_vector_type(8)));
-
-// Wave32
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_f32_16x16x16_f16_w32:
-// CHECK-GFX1200: v_wmma_f32_16x16x16_f16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_f16_w32(global v8f* out, v8h a, v8h b, v8f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_f16_w32_gfx12(a, b, c);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_f32_16x16x16_bf16_w32:
-// CHECK-GFX1200: v_wmma_f32_16x16x16_bf16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_bf16_w32(global v8f* out, v8s a, v8s b, v8f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_bf16_w32_gfx12(a, b, c);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_f16_16x16x16_f16_w32:
-// CHECK-GFX1200: v_wmma_f16_16x16x16_f16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
-//
-void test_amdgcn_wmma_f16_16x16x16_f16_w32(global v8h* out, v8h a, v8h b, v8h c)
-{
-  *out = __builtin_amdgcn_wmma_f16_16x16x16_f16_w32_gfx12(a, b, c);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_bf16_16x16x16_bf16_w32:
-// CHECK-GFX1200: v_wmma_bf16_16x16x16_bf16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
-void test_amdgcn_wmma_bf16_16x16x16_bf16_w32(global v8s* out, v8s a, v8s b, v8s c)
-{
-  *out = __builtin_amdgcn_wmma_bf16_16x16x16_bf16_w32_gfx12(a, b, c);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_i32_16x16x16_iu8_w32:
-// CHECK-GFX1200: v_wmma_i32_16x16x16_iu8 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}] neg_lo:[1,1,0]
-//
-void test_amdgcn_wmma_i32_16x16x16_iu8_w32(global v8i* out, v2i a, v2i b, v8i c)
-{
-  *out = __builtin_amdgcn_wmma_i32_16x16x16_iu8_w32_gfx12(true, a, true, b, c, false);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_i32_16x16x16_iu4_w32:
-// CHECK-GFX1200: v_wmma_i32_16x16x16_iu4 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}] neg_lo:[1,1,0]
-//
-void test_amdgcn_wmma_i32_16x16x16_iu4_w32(global v8i* out, int a, int b, v8i c)
-{
-  *out = __builtin_amdgcn_wmma_i32_16x16x16_iu4_w32_gfx12(true, a, true, b, c, false);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_f32_16x16x16_fp8_fp8_w32:
-// CHECK-GFX1200: v_wmma_f32_16x16x16_fp8_fp8 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_fp8_fp8_w32(global v8f* out, v2i a, v2i b, v8f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_fp8_fp8_w32_gfx12(a, b, c);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_f32_16x16x16_fp8_bf8_w32:
-// CHECK-GFX1200: v_wmma_f32_16x16x16_fp8_bf8 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_fp8_bf8_w32(global v8f* out, v2i a, v2i b, v8f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_fp8_bf8_w32_gfx12(a, b, c);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_f32_16x16x16_bf8_fp8_w32:
-// CHECK-GFX1200: v_wmma_f32_16x16x16_bf8_fp8 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_bf8_fp8_w32(global v8f* out, v2i a, v2i b, v8f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_bf8_fp8_w32_gfx12(a, b, c);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_f32_16x16x16_bf8_bf8_w32:
-// CHECK-GFX1200: v_wmma_f32_16x16x16_bf8_bf8 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_bf8_bf8_w32(global v8f* out, v2i a, v2i b, v8f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_bf8_bf8_w32_gfx12(a, b, c);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_i32_16x16x32_iu4_w32:
-// CHECK-GFX1200: v_wmma_i32_16x16x32_iu4 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}] neg_lo:[1,1,0]
-//
-void test_amdgcn_wmma_i32_16x16x32_iu4_w32(global v8i* out, v2i a, v2i b, v8i c)
-{
-  *out = __builtin_amdgcn_wmma_i32_16x16x32_iu4_w32_gfx12(true, a, true, b, c, false);
-}
diff --git a/cross-project-tests/amdgpu/builtins-amdgcn-gfx12-wmma-w64.cl b/cross-project-tests/amdgpu/builtins-amdgcn-gfx12-wmma-w64.cl
deleted file mode 100644
index ad01450c35a76f..00000000000000
--- a/cross-project-tests/amdgpu/builtins-amdgcn-gfx12-wmma-w64.cl
+++ /dev/null
@@ -1,104 +0,0 @@
-// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1200 -target-feature +wavefrontsize64 -S -o - %s | FileCheck %s --check-prefix=CHECK-GFX1200
-
-typedef float  v4f   __attribute__((ext_vector_type(4)));
-typedef half   v4h   __attribute__((ext_vector_type(4)));
-typedef short  v4s   __attribute__((ext_vector_type(4)));
-typedef int    v4i   __attribute__((ext_vector_type(4)));
-
-// Wave64
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_f32_16x16x16_f16_w64:
-// CHECK-GFX1200: v_wmma_f32_16x16x16_f16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_f16_w64(global v4f* out, v4h a, v4h b, v4f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_f16_w64_gfx12(a, b, c);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_f32_16x16x16_bf16_w64:
-// CHECK-GFX1200: v_wmma_f32_16x16x16_bf16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_bf16_w64(global v4f* out, v4s a, v4s b, v4f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_bf16_w64_gfx12(a, b, c);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_f16_16x16x16_f16_w64:
-// CHECK-GFX1200: v_wmma_f16_16x16x16_f16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
-//
-void test_amdgcn_wmma_f16_16x16x16_f16_w64(global v4h* out, v4h a, v4h b, v4h c)
-{
-  *out = __builtin_amdgcn_wmma_f16_16x16x16_f16_w64_gfx12(a, b, c);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_bf16_16x16x16_bf16_w64:
-// CHECK-GFX1200: v_wmma_bf16_16x16x16_bf16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}]
-//
-void test_amdgcn_wmma_bf16_16x16x16_bf16_w64(global v4s* out, v4s a, v4s b, v4s c)
-{
-  *out = __builtin_amdgcn_wmma_bf16_16x16x16_bf16_w64_gfx12(a, b, c);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_i32_16x16x16_iu8_w64:
-// CHECK-GFX1200: v_wmma_i32_16x16x16_iu8 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}] neg_lo:[1,1,0]
-//
-void test_amdgcn_wmma_i32_16x16x16_iu8_w64(global v4i* out, int a, int b, v4i c)
-{
-  *out = __builtin_amdgcn_wmma_i32_16x16x16_iu8_w64_gfx12(true, a, true, b, c, false);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_i32_16x16x16_iu4_w64:
-// CHECK-GFX1200: v_wmma_i32_16x16x16_iu4 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}] neg_lo:[1,1,0]
-//
-void test_amdgcn_wmma_i32_16x16x16_iu4_w64(global v4i* out, int a, int b, v4i c)
-{
-  *out = __builtin_amdgcn_wmma_i32_16x16x16_iu4_w64_gfx12(true, a, true, b, c, false);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_f32_16x16x16_fp8_fp8_w32:
-// CHECK-GFX1200: v_wmma_f32_16x16x16_fp8_fp8 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_fp8_fp8_w32(global v4f* out, int a, int b, v4f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_fp8_fp8_w64_gfx12(a, b, c);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_f32_16x16x16_fp8_bf8_w32:
-// CHECK-GFX1200: v_wmma_f32_16x16x16_fp8_bf8 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_fp8_bf8_w32(global v4f* out, int a, int b, v4f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_fp8_bf8_w64_gfx12(a, b, c);
-}
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_f32_16x16x16_bf8_fp8_w32:
-// CHECK-GFX1200: v_wmma_f32_16x16x16_bf8_fp8 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_bf8_fp8_w32(global v4f* out, int a, int b, v4f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_bf8_fp8_w64_gfx12(a, b, c);
-}
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_f32_16x16x16_bf8_bf8_w32:
-// CHECK-GFX1200: v_wmma_f32_16x16x16_bf8_bf8 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_bf8_bf8_w32(global v4f* out, int a, int b, v4f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_bf8_bf8_w64_gfx12(a, b, c);
-}
-
-// CHECK-GFX1200-LABEL: test_amdgcn_wmma_i32_16x16x32_iu4_w32:
-// CHECK-GFX1200: v_wmma_i32_16x16x32_iu4 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}] neg_lo:[1,1,0]
-//
-void test_amdgcn_wmma_i32_16x16x32_iu4_w32(global v4i* out, int a, int b, v4i c)
-{
-  *out = __builtin_amdgcn_wmma_i32_16x16x32_iu4_w64_gfx12(true, a, true, b, c, false);
-}
diff --git a/cross-project-tests/amdgpu/builtins-amdgcn-swmmac-w32.cl b/cross-project-tests/amdgpu/builtins-amdgcn-swmmac-w32.cl
deleted file mode 100644
index 317d9a1102ccff..00000000000000
--- a/cross-project-tests/amdgpu/builtins-amdgcn-swmmac-w32.cl
+++ /dev/null
@@ -1,110 +0,0 @@
-// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1200 -target-feature +wavefrontsize32 -S -o - %s | FileCheck %s --check-prefix=CHECK-GFX1200
-
-typedef int    v2i   __attribute__((ext_vector_type(2)));
-typedef int    v4i   __attribute__((ext_vector_type(4)));
-typedef float  v8f   __attribute__((ext_vector_type(8)));
-typedef half   v8h   __attribute__((ext_vector_type(8)));
-typedef short  v8s   __attribute__((ext_vector_type(8)));
-typedef int    v8i   __attribute__((ext_vector_type(8)));
-typedef half  v16h   __attribute__((ext_vector_type(16)));
-typedef short v16s   __attribute__((ext_vector_type(16)));
-
-// Wave32
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_f32_16x16x32_f16_w32:
-// CHECK-GFX1200: v_swmmac_f32_16x16x32_f16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_f32_16x16x32_f16_w32(global v8f* out, v8h a, v16h b, v8f c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_f32_16x16x32_f16_w32(a, b, c, index);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_f32_16x16x32_bf16_w32:
-// CHECK-GFX1200: v_swmmac_f32_16x16x32_bf16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_f32_16x16x32_bf16_w32(global v8f* out, v8s a, v16s b, v8f c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_f32_16x16x32_bf16_w32(a, b, c, index);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_f16_16x16x32_f16_w32:
-// CHECK-GFX1200: v_swmmac_f16_16x16x32_f16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_f16_16x16x32_f16_w32(global v8h* out, v8h a, v16h b, v8h c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_f16_16x16x32_f16_w32(a, b, c, index);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_bf16_16x16x32_bf16_w32:
-// CHECK-GFX1200: v_swmmac_bf16_16x16x32_bf16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_bf16_16x16x32_bf16_w32(global v8s* out, v8s a, v16s b, v8s c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_bf16_16x16x32_bf16_w32(a, b, c, index);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_i32_16x16x32_iu8_w32:
-// CHECK-GFX1200: v_swmmac_i32_16x16x32_iu8 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}} neg_lo:[1,1,0] clamp
-//
-void test_amdgcn_swmmac_i32_16x16x32_iu8_w32(global v8i* out, v2i a, v4i b, v8i c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_i32_16x16x32_iu8_w32(true, a, true, b, c, index, true);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_i32_16x16x32_iu4_w32:
-// CHECK-GFX1200: v_swmmac_i32_16x16x32_iu4 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}} neg_lo:[1,1,0] clamp
-//
-void test_amdgcn_swmmac_i32_16x16x32_iu4_w32(global v8i* out, int a, v2i b, v8i c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_i32_16x16x32_iu4_w32(true, a, true, b, c, index, true);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_i32_16x16x64_iu4_w32:
-// CHECK-GFX1200: v_swmmac_i32_16x16x64_iu4 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}} neg_lo:[1,1,0] clamp
-//
-void test_amdgcn_swmmac_i32_16x16x64_iu4_w32(global v8i* out, v2i a, v4i b, v8i c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_i32_16x16x64_iu4_w32(true, a, true, b, c, index, true);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_f32_16x16x32_fp8_fp8_w32:
-// CHECK-GFX1200: v_swmmac_f32_16x16x32_fp8_fp8 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_f32_16x16x32_fp8_fp8_w32(global v8f* out, v2i a, v4i b, v8f c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_f32_16x16x32_fp8_fp8_w32(a, b, c, index);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_f32_16x16x32_fp8_bf8_w32:
-// CHECK-GFX1200: v_swmmac_f32_16x16x32_fp8_bf8 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_f32_16x16x32_fp8_bf8_w32(global v8f* out, v2i a, v4i b, v8f c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_f32_16x16x32_fp8_bf8_w32(a, b, c, index);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_f32_16x16x32_bf8_fp8_w32:
-// CHECK-GFX1200: v_swmmac_f32_16x16x32_bf8_fp8 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_f32_16x16x32_bf8_fp8_w32(global v8f* out, v2i a, v4i b, v8f c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_f32_16x16x32_bf8_fp8_w32(a, b, c, index);
-}
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_f32_16x16x32_bf8_bf8_w32:
-// CHECK-GFX1200: v_swmmac_f32_16x16x32_bf8_bf8 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_f32_16x16x32_bf8_bf8_w32(global v8f* out, v2i a, v4i b, v8f c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_f32_16x16x32_bf8_bf8_w32(a, b, c, index);
-}
diff --git a/cross-project-tests/amdgpu/builtins-amdgcn-swmmac-w64.cl b/cross-project-tests/amdgpu/builtins-amdgcn-swmmac-w64.cl
deleted file mode 100644
index eb81234f53a663..00000000000000
--- a/cross-project-tests/amdgpu/builtins-amdgcn-swmmac-w64.cl
+++ /dev/null
@@ -1,109 +0,0 @@
-// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1200 -target-feature +wavefrontsize64 -S -o - %s | FileCheck %s --check-prefix=CHECK-GFX1200
-
-typedef int    v2i   __attribute__((ext_vector_type(2)));
-typedef int    v4i   __attribute__((ext_vector_type(4)));
-typedef float  v4f   __attribute__((ext_vector_type(4)));
-typedef half   v4h   __attribute__((ext_vector_type(4)));
-typedef short  v4s   __attribute__((ext_vector_type(4)));
-typedef half   v8h   __attribute__((ext_vector_type(8)));
-typedef short  v8s   __attribute__((ext_vector_type(8)));
-
-// Wave64
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_f32_16x16x32_f16_w64:
-// CHECK-GFX1200: v_swmmac_f32_16x16x32_f16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_f32_16x16x32_f16_w64(global v4f* out, v4h a, v8h b, v4f c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_f32_16x16x32_f16_w64(a, b, c, index);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_f32_16x16x32_bf16_w64:
-// CHECK-GFX1200: v_swmmac_f32_16x16x32_bf16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_f32_16x16x32_bf16_w64(global v4f* out, v4s a, v8s b, v4f c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_f32_16x16x32_bf16_w64(a, b, c, index);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_f16_16x16x32_f16_w64:
-// CHECK-GFX1200: v_swmmac_f16_16x16x32_f16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_f16_16x16x32_f16_w64(global v4h* out, v4h a, v8h b, v4h c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_f16_16x16x32_f16_w64(a, b, c, index);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_bf16_16x16x32_bf16_w64:
-// CHECK-GFX1200: v_swmmac_bf16_16x16x32_bf16 v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_bf16_16x16x32_bf16_w64(global v4s* out, v4s a, v8s b, v4s c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_bf16_16x16x32_bf16_w64(a, b, c, index);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_i32_16x16x32_iu8_w64:
-// CHECK-GFX1200: v_swmmac_i32_16x16x32_iu8 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}} neg_lo:[1,1,0] clamp
-//
-void test_amdgcn_swmmac_i32_16x16x32_iu8_w64(global v4i* out, int a, v2i b, v4i c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_i32_16x16x32_iu8_w64(true, a, true, b, c, index, true);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_i32_16x16x32_iu4_w64:
-// CHECK-GFX1200: v_swmmac_i32_16x16x32_iu4 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}} neg_lo:[1,1,0] clamp
-//
-void test_amdgcn_swmmac_i32_16x16x32_iu4_w64(global v4i* out, int a, int b, v4i c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_i32_16x16x32_iu4_w64(true, a, true, b, c, index, true);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_i32_16x16x64_iu4_w64:
-// CHECK-GFX1200: v_swmmac_i32_16x16x64_iu4 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}} neg_lo:[1,1,0] clamp
-//
-void test_amdgcn_swmmac_i32_16x16x64_iu4_w64(global v4i* out, int a, v2i b, v4i c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_i32_16x16x64_iu4_w64(true, a, true, b, c, index, true);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_f32_16x16x32_fp8_fp8_w64:
-// CHECK-GFX1200: v_swmmac_f32_16x16x32_fp8_fp8 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_f32_16x16x32_fp8_fp8_w64(global v4f* out, int a, v2i b, v4f c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_f32_16x16x32_fp8_fp8_w64(a, b, c, index);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_f32_16x16x32_fp8_bf8_w64:
-// CHECK-GFX1200: v_swmmac_f32_16x16x32_fp8_bf8 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_f32_16x16x32_fp8_bf8_w64(global v4f* out, int a, v2i b, v4f c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_f32_16x16x32_fp8_bf8_w64(a, b, c, index);
-}
-
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_f32_16x16x32_bf8_fp8_w64:
-// CHECK-GFX1200: v_swmmac_f32_16x16x32_bf8_fp8 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_f32_16x16x32_bf8_fp8_w64(global v4f* out, int a, v2i b, v4f c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_f32_16x16x32_bf8_fp8_w64(a, b, c, index);
-}
-
-// CHECK-GFX1200-LABEL: test_amdgcn_swmmac_f32_16x16x32_bf8_bf8_w64:
-// CHECK-GFX1200: v_swmmac_f32_16x16x32_bf8_bf8 v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}, v[{{[0-9]+:[0-9]+}}], v{{[0-9]+}}
-//
-void test_amdgcn_swmmac_f32_16x16x32_bf8_bf8_w64(global v4f* out, int a, v2i b, v4f c, short index)
-{
-  *out = __builtin_amdgcn_swmmac_f32_16x16x32_bf8_bf8_w64(a, b, c, index);
-}
diff --git a/cross-project-tests/amdgpu/builtins-amdgcn-wmma-w32.cl b/cross-project-tests/amdgpu/builtins-amdgcn-wmma-w32.cl
deleted file mode 100644
index 5906c3e69994c9..00000000000000
--- a/cross-project-tests/amdgpu/builtins-amdgcn-wmma-w32.cl
+++ /dev/null
@@ -1,68 +0,0 @@
-// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1100 -target-feature +wavefrontsize32 -DWMMA_GFX1100_TESTS -S -o - %s | FileCheck %s --check-prefix=CHECK-GFX1100
-
-typedef float  v4f   __attribute__((ext_vector_type(4)));
-typedef float  v8f   __attribute__((ext_vector_type(8)));
-typedef half   v16h  __attribute__((ext_vector_type(16)));
-typedef int    v2i   __attribute__((ext_vector_type(2)));
-typedef int    v4i   __attribute__((ext_vector_type(4)));
-typedef int    v8i   __attribute__((ext_vector_type(8)));
-typedef short  v16s  __attribute__((ext_vector_type(16)));
-
-#ifdef WMMA_GFX1100_TESTS
-
-// Wave32
-
-
-// CHECK-GFX1100-LABEL: test_amdgcn_wmma_f32_16x16x16_f16_w32:
-// CHECK-GFX1100: v_wmma_f32_16x16x16_f16 v[{{.*}}], v[{{.*}} v[{{.*}}], v[{{.*}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_f16_w32(global v8f* out, v16h a, v16h b, v8f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_f16_w32(a, b, c);
-}
-
-
-// CHECK-GFX1100-LABEL: test_amdgcn_wmma_f32_16x16x16_bf16_w32:
-// CHECK-GFX1100: v_wmma_f32_16x16x16_bf16 v[{{.*}}], v[{{.*}} v[{{.*}}], v[{{.*}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_bf16_w32(global v8f* out, v16s a, v16s b, v8f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_bf16_w32(a, b, c);
-}
-
-
-// CHECK-GFX1100-LABEL: test_amdgcn_wmma_f16_16x16x16_f16_w32:
-// CHECK-GFX1100: v_wmma_f16_16x16x16_f16 v[{{.*}}], v[{{.*}} v[{{.*}}], v[{{.*}}] op_sel:[0,0,1]
-//
-void test_amdgcn_wmma_f16_16x16x16_f16_w32(global v16h* out, v16h a, v16h b, v16h c)
-{
-  *out = __builtin_amdgcn_wmma_f16_16x16x16_f16_w32(a, b, c, true);
-}
-
-
-// CHECK-GFX1100-LABEL: test_amdgcn_wmma_bf16_16x16x16_bf16_w32:
-// CHECK-GFX1100: v_wmma_bf16_16x16x16_bf16 v[{{.*}}], v[{{.*}} v[{{.*}}], v[{{.*}}] op_sel:[0,0,1]
-//
-void test_amdgcn_wmma_bf16_16x16x16_bf16_w32(global v16s* out, v16s a, v16s b, v16s c)
-{
-  *out = __builtin_amdgcn_wmma_bf16_16x16x16_bf16_w32(a, b, c, true);
-}
-
-
-// CHECK-GFX1100-LABEL: test_amdgcn_wmma_i32_16x16x16_iu8_w32:
-// CHECK-GFX1100: v_wmma_i32_16x16x16_iu8 v[{{.*}}], v[{{.*}} v[{{.*}} v[{{.*}}] neg_lo:[1,1,0]
-//
-void test_amdgcn_wmma_i32_16x16x16_iu8_w32(global v8i* out, v4i a, v4i b, v8i c)
-{
-  *out = __builtin_amdgcn_wmma_i32_16x16x16_iu8_w32(true, a, true, b, c, false);
-}
-
-
-// CHECK-GFX1100-LABEL: test_amdgcn_wmma_i32_16x16x16_iu4_w32:
-// CHECK-GFX1100: v_wmma_i32_16x16x16_iu4 v[{{.*}}, v[{{.*}} v[{{.*}} v[{{.*}} neg_lo:[1,1,0]
-void test_amdgcn_wmma_i32_16x16x16_iu4_w32(global v8i* out, v2i a, v2i b, v8i c)
-{
-  *out = __builtin_amdgcn_wmma_i32_16x16x16_iu4_w32(true, a, true, b, c, false);
-}
-
-#endif
diff --git a/cross-project-tests/amdgpu/builtins-amdgcn-wmma-w64.cl b/cross-project-tests/amdgpu/builtins-amdgcn-wmma-w64.cl
deleted file mode 100644
index ffe230d3c25178..00000000000000
--- a/cross-project-tests/amdgpu/builtins-amdgcn-wmma-w64.cl
+++ /dev/null
@@ -1,72 +0,0 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
-// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1100 -target-feature +wavefrontsize64 -DWMMA_GFX1100_TESTS -S -o - %s | FileCheck %s --check-prefix=CHECK-GFX1100
-
-typedef float  v4f   __attribute__((ext_vector_type(4)));
-typedef float  v8f   __attribute__((ext_vector_type(8)));
-typedef half   v8h   __attribute__((ext_vector_type(8)));
-typedef half   v16h  __attribute__((ext_vector_type(16)));
-typedef int    v2i   __attribute__((ext_vector_type(2)));
-typedef int    v4i   __attribute__((ext_vector_type(4)));
-typedef int    v8i   __attribute__((ext_vector_type(8)));
-typedef short  v8s   __attribute__((ext_vector_type(8)));
-typedef short  v16s  __attribute__((ext_vector_type(16)));
-
-#ifdef WMMA_GFX1100_TESTS
-
-// Wave64
-
-
-// CHECK-GFX1100-LABEL: test_amdgcn_wmma_f32_16x16x16_f16_w64:
-// CHECK-GFX1100: v_wmma_f32_16x16x16_f16 v[{{.*}}], v[{{.*}} v[{{.*}}], v[{{.*}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_f16_w64(global v4f* out, v16h a, v16h b, v4f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_f16_w64(a, b, c);
-}
-
-
-// CHECK-GFX1100-LABEL: test_amdgcn_wmma_f32_16x16x16_bf16_w64:
-// CHECK-GFX1100: v_wmma_f32_16x16x16_bf16 v[{{.*}}], v[{{.*}} v[{{.*}}], v[{{.*}}]
-//
-void test_amdgcn_wmma_f32_16x16x16_bf16_w64(global v4f* out, v16s a, v16s b, v4f c)
-{
-  *out = __builtin_amdgcn_wmma_f32_16x16x16_bf16_w64(a, b, c);
-}
-
-
-// CHECK-GFX1100-LABEL: test_amdgcn_wmma_f16_16x16x16_f16_w64:
-// CHECK-GFX1100: v_wmma_f16_16x16x16_f16 v[{{.*}}], v[{{.*}} v[{{.*}}], v[{{.*}}] op_sel:[0,0,1]
-//
-void test_amdgcn_wmma_f16_16x16x16_f16_w64(global v8h* out, v16h a, v16h b, v8h c)
-{
-  *out = __builtin_amdgcn_wmma_f16_16x16x16_f16_w64(a, b, c, true);
-}
-
-
-// CHECK-GFX1100-LABEL: test_amdgcn_wmma_bf16_16x16x16_bf16_w64:
-// CHECK-GFX1100: v_wmma_bf16_16x16x16_bf16 v[{{.*}}], v[{{.*}} v[{{.*}}], v[{{.*}}] op_sel:[0,0,1]
-//
-void test_amdgcn_wmma_bf16_16x16x16_bf16_w64(global v8s* out, v16s a, v16s b, v8s c)
-{
-  *out = __builtin_amdgcn_wmma_bf16_16x16x16_bf16_w64(a, b, c, true);
-}
-
-
-// CHECK-GFX1100-LABEL: test_amdgcn_wmma_i32_16x16x16_iu8_w64:
-// CHECK-GFX1100: v_wmma_i32_16x16x16_iu8 v[{{.*}}], v[{{.*}} v[{{.*}} v[{{.*}}] neg_lo:[1,1,0]
-//
-void test_amdgcn_wmma_i32_16x16x16_iu8_w64(global v4i* out, v4i a, v4i b, v4i c)
-{
-  *out = __builtin_amdgcn_wmma_i32_16x16x16_iu8_w64(true, a, true, b, c, false);
-}
-
-
-// CHECK-GFX1100-LABEL: test_amdgcn_wmma_i32_16x16x16_iu4_w64:
-// CHECK-GFX1100: v_wmma_i32_16x16x16_iu4 v[{{.*}} v[{{.*}} v[{{.*}} v[{{.*}}neg_lo:[1,1,0]
-//
-void test_amdgcn_wmma_i32_16x16x16_iu4_w64(global v4i* out, v2i a, v2i b, v4i c)
-{
-  *out = __builtin_amdgcn_wmma_i32_16x16x16_iu4_w64(true, a, true, b, c, false);
-}
-
-#endif
diff --git a/cross-project-tests/amdgpu/lit.local.cfg b/cross-project-tests/amdgpu/lit.local.cfg
deleted file mode 100644
index 23bb1a5dbf8904..00000000000000
--- a/cross-project-tests/amdgpu/lit.local.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-if "clang" not in config.available_features or "AMDGPU" not in config.targets_to_build:
-    config.unsupported = True
diff --git a/cross-project-tests/debuginfo-tests/README.txt b/cross-project-tests/debuginfo-tests/README.txt
deleted file mode 100644
index 544e6ff12535c6..00000000000000
--- a/cross-project-tests/debuginfo-tests/README.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-                                                                   -*- rst -*-
-This is a collection of tests to check debugging information generated by 
-compiler. This test suite can be checked out inside clang/test folder. This 
-will enable 'make test' for clang to pick up these tests.
-
-Some tests (in the 'llgdb-tests' directory) are written with debugger
-commands and checks for the intended debugger output in the source file,
-using DEBUGGER: and CHECK: as prefixes respectively.
-
-For example::
-
-  define i32 @f1(i32 %i) nounwind ssp {
-  ; DEBUGGER: break f1
-  ; DEBUGGER: r
-  ; DEBUGGER: p i 
-  ; CHECK: $1 = 42 
-  entry:
-  }
-
-is a testcase where the debugger is asked to break at function 'f1' and 
-print value of argument 'i'. The expected value of 'i' is 42 in this case.
-
-Other tests are written for use with the 'Dexter' tool (in the 'dexter-tests'
-and 'dexter' directories respectively). These use a domain specific language
-in comments to describe the intended debugger experience in a more abstract
-way than debugger commands. This allows for testing integration across
-multiple debuggers from one input language.
-
-For example::
-
-  void __attribute__((noinline, optnone)) bar(int *test) {}
-  int main() {
-    int test;
-    test = 23;
-    bar(&test); // DexLabel('before_bar')
-    return test; // DexLabel('after_bar')
-  }
-
-  // DexExpectWatchValue('test', '23', on_line='before_bar')
-  // DexExpectWatchValue('test', '23', on_line='after_bar')
-
-Labels two lines with the names 'before_bar' and 'after_bar', and records that
-the 'test' variable is expected to have the value 23 on both of them.
diff --git a/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/lit.local.cfg b/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/lit.local.cfg
deleted file mode 100644
index 2f7d525fa3ca55..00000000000000
--- a/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/lit.local.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-# In MSVC mode DWARF isn't produced & is needed for these tests
-if "native" not in config.available_features or config.is_msvc:
-    config.unsupported = True
diff --git a/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/simplified_template_names.cpp b/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/simplified_template_names.cpp
deleted file mode 100644
index 956c7e37f0225a..00000000000000
--- a/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/simplified_template_names.cpp
+++ /dev/null
@@ -1,360 +0,0 @@
-// UNSUPPORTED: system-darwin
-// RUN: %clang %target_itanium_abi_host_triple %s -c -o - -gdwarf-4 -Xclang -gsimple-template-names=mangled -Xclang -debug-forward-template-params -std=c++20 \
-// RUN:   | llvm-dwarfdump --verify -
-// RUN: %clang %target_itanium_abi_host_triple %s -c -o - -gdwarf-4 -Xclang -gsimple-template-names=mangled -Xclang -debug-forward-template-params -std=c++20 -gmlt -fdebug-info-for-profiling \
-// RUN:   | llvm-dwarfdump --verify -
-// RUN: %clang %target_itanium_abi_host_triple %s -c -o - -gdwarf-4 -Xclang -gsimple-template-names=mangled -Xclang -debug-forward-template-params -std=c++20 -fdebug-types-section \
-// RUN:   | llvm-dwarfdump --verify -
-// RUN: %clang %target_itanium_abi_host_triple %s -c -o - -gdwarf-5 -Xclang -gsimple-template-names=mangled -Xclang -debug-forward-template-params -std=c++20 -fdebug-types-section \
-// RUN:   | llvm-dwarfdump --verify -
-
-#include <cstdint>
-#include <cstddef>
-template<typename ...Ts>
-struct t1 {
-};
-template<typename ...Ts>
-struct t2;
-struct udt {
-};
-namespace ns {
-struct udt {
-};
-namespace inner {
-template<typename T> struct ttp { };
-struct udt { };
-}
-template<template<typename> class T>
-void ttp_user() { }
-enum Enumeration : int { Enumerator1, Enumerator2, Enumerator3 = 1 };
-enum class EnumerationClass { Enumerator1, Enumerator2, Enumerator3 = 1 };
-enum : int { AnonEnum1, AnonEnum2, AnonEnum3 = 1 };
-enum EnumerationSmall : unsigned char { kNeg = 0xff };
-}
-template <typename... Ts>
-void f1() {
-  t1<Ts...> v1;
-  t2<Ts...> *v2;
-}
-template<bool b, int i>
-void f2() {
-}
-template<typename T, T ...A>
-void f3() {
-}
-template<typename T, unsigned = 3>
-void f4() {
-}
-template<typename T, bool b = false>
-struct t3 { };
-extern template class t3<int>;
-template class t3<int>;
-struct outer_class {
-  struct inner_class {
-  };
-};
-int i = 3;
-template<unsigned N>
-struct t4 { };
-namespace {
-struct t5 { };
-enum LocalEnum { LocalEnum1 };
-}
-template<typename ...T1, typename T2 = int>
-void f5() { }
-template<typename T1, typename ...T2>
-void f6() { }
-struct t6 {
-  template<typename T>
-  void operator<<(int) {
-  }
-  template<typename T>
-  void operator<(int) {
-  }
-  template<typename T>
-  void operator<=(int) {
-  }
-  template<typename T = int>
-  operator t1<float>*() {
-    return nullptr;
-  }
-  template<typename T>
-  void operator-(int) {
-  }
-  template<typename T>
-  void operator*(int) {
-  }
-  template<typename T>
-  void operator/(int) {
-  }
-  template<typename T>
-  void operator%(int) {
-  }
-  template<typename T>
-  void operator^(int) {
-  }
-  template<typename T>
-  void operator&(int) {
-  }
-  template<typename T>
-  void operator|(int) {
-  }
-  template<typename T>
-  void operator~() {
-  }
-  template<typename T>
-  void operator!() {
-  }
-  template<typename T>
-  void operator=(int) {
-  }
-  template<typename T>
-  void operator>(int) {
-  }
-  template<typename T>
-  void operator,(int) {
-  }
-  template<typename T>
-  void operator()() {
-  }
-  template<typename T>
-  void operator[](int) {
-  }
-  template<typename T>
-  void operator<=>(int) {
-  }
-  template<typename T>
-  void* operator new(std::size_t, T) {
-    __builtin_unreachable();
-  }
-  template<typename T>
-  void operator delete(void*, T) {
-  }
-  template<typename T>
-  void* operator new[](std::size_t, T) {
-    __builtin_unreachable();
-  }
-  template<typename T>
-  void operator delete[](void*, T) {
-  }
-  template<typename T>
-  int operator co_await() { __builtin_unreachable(); }
-
-};
-void operator"" _suff(unsigned long long) {}
-template<template<typename...> class T> void f7() { }
-template<template<typename...> class T, typename T2> void f8() { }
-template<typename T>
-struct t7;
-using t7i = t7<int>;
-template<typename T>
-struct
-__attribute__((__preferred_name__(t7i)))
-t7 {
-};
-struct t8 {
-  void mem();
-};
-namespace ns {
-inline namespace inl {
-template<typename T> struct t9 { };
-}
-}
-template<typename T>
-void (*f9())() {
-  return nullptr;
-}
-struct t10 {
-  template<typename T = void>
-  t10() { }
-};
-
-template<typename T>
-void operator_not_really() {
-}
-
-template<typename T, T ...A>
-struct t11 {
-};
-
-struct t12 {
-  t11<LocalEnum, LocalEnum1> v1;
-};
-
-template<decltype(ns::AnonEnum1)>
-void f10() {
-}
-
-int main() {
-  struct { } A;
-  auto L = []{};
-  f1<int>();
-  f1<float>();
-  f1<bool>();
-  f1<double>();
-  f1<long>();
-  f1<short>();
-  f1<unsigned>();
-  f1<unsigned long long>();
-  f1<long long>();
-  f1<udt>();
-  f1<ns::udt>();
-  f1<ns::udt*>();
-  f1<ns::inner::udt>();
-  f1<t1<int>>();
-  f1<int, float>();
-  f1<int *>();
-  f1<int &>();
-  f1<int &&>();
-  f1<const int>();
-  f1<int[3]>();
-  f1<void>();
-  f1<outer_class::inner_class>();
-  f1<unsigned long>();
-  f2<true, 3>();
-  f3<ns::Enumeration, ns::Enumerator3, (ns::Enumeration)2>();
-  f3<ns::EnumerationClass, ns::EnumerationClass::Enumerator3, (ns::EnumerationClass)2>();
-  f3<ns::EnumerationSmall, ns::kNeg>();
-  f3<decltype(ns::AnonEnum1), ns::AnonEnum3, (decltype(ns::AnonEnum1))2>();
-  f3<LocalEnum, LocalEnum1>();
-  f3<int*, &i>();
-  f3<int*, nullptr>();
-  t4<3> v2;
-  f3<unsigned long, 1>();
-  f3<unsigned long long, 1>();
-  f3<long, 1>();
-  f3<unsigned int, 1>();
-  f3<short, 1>();
-  f3<unsigned char, (char)0>();
-  f3<signed char, (char)0>();
-  f3<unsigned short, 1, 2>();
-  f3<char, 0, 1, 6, 7, 13, 14, 31, 32, 33, (char)127, (char)128>();
-  f3<__int128, ((__int128)9223372036854775807) * 2>();
-  f4<unsigned int>();
-  f1<t3<int>>();
-  f1<t3<t3<int>>>();
-  f1<decltype(L)>();
-  t3<decltype(L)> v1;
-  f1<t3<t3<decltype(L)>>>();
-  f1<int(float)>();
-  f1<void(...)>();
-  f1<void(int, ...)>();
-  f1<const int &>();
-  f1<const int *&>();
-  f1<t5>();
-  f1<decltype(nullptr)>();
-  f1<long*, long*>();
-  f1<long*, udt*>();
-  f1<void *const>();
-  f1<const void *const *>();
-  f1<void()>();
-  f1<void(*)()>();
-  f1<decltype(&L)>();
-  f1<decltype(A)>();
-  f1<decltype(&A)>();
-  f5<t1<int>>();
-  f5<>();
-  f6<t1<int>>();
-  f1<>();
-  f1<const void*, const void*>();
-  f1<t1<int*>*>();
-  f1<int *[]>();
-  t6 v6;
-  v6.operator<< <int>(1);
-  v6.operator< <int>(1);
-  v6.operator<= <int>(1);
-  v6.operator t1<float>*();
-  v6.operator- <int>(3);
-  v6.operator* <int>(3);
-  v6.operator/ <int>(3);
-  v6.operator% <int>(3);
-  v6.operator^ <int>(3);
-  v6.operator& <int>(3);
-  v6.operator| <int>(3);
-  v6.operator~ <int>();
-  v6.operator! <int>();
-  v6.operator= <int>(3);
-  v6.operator> <int>(3);
-  v6.operator, <int>(3);
-  v6.operator() <int>();
-  v6.operator[] <int>(3);
-  v6.operator<=> <int>(3);
-  t6::operator new(0, 0);
-  t6::operator new[](0, 0);
-  t6::operator delete(nullptr, 0);
-  t6::operator delete[](nullptr, 0);
-  v6.operator co_await<int>();
-  42_suff;
-  struct t7 { };
-  f1<t7>();
-  f1<int(&)[3]>();
-  f1<int(*)[3]>();
-  f7<t1>();
-  f8<t1, int>();
-  using namespace ns;
-  ttp_user<inner::ttp>();
-  f1<int*, decltype(nullptr)*>();
-  t7i x;
-  f1<t7i>();
-  f7<ns::inl::t9>();
-  f1<_Atomic(int)>();
-  f1<int, long, volatile char>();
-  f1<__attribute__((__vector_size__(sizeof(int) * 2))) int>();
-  f1<int *const volatile>();
-  f1<const volatile void>();
-  f1<t1<decltype(L)>>();
-  t10 v3;
-  f1<void (::udt::*)() const>();
-  f1<void (::udt::*)() volatile &>();
-  f1<void (::udt::*)() const volatile &&>();
-  f9<int>();
-  f1<void (*const)()>();
-  f1<char const (&)[1]>();
-  f1<void () const &>();
-  f1<void () volatile &&>();
-  f1<void () const volatile>();
-  f1<int *const[1]>();
-  f1<int *const(&)[1]>();
-  f1<void (::udt::* const&)()>();
-  f1<void (*(int))(float)>();
-  f1<t1<int>[1]>();
-  f1<void (*)() noexcept>();
-  f1<void (decltype(A))>();
-  struct t8 { decltype(A) m; };
-  f1<void(t8, decltype(A))>();
-  f1<void(t8)>();
-  operator_not_really<int>();
-  t12 v4;
-  f1<_BitInt(3)>();
-  f1<const unsigned _BitInt(5)>();
-  f1<void(t1<>, t1<>)>();
-  f1<int t1<>::*>();
-  void fcc() __attribute__((swiftcall));
-  f1<decltype(fcc)>();
-  int fnrt() __attribute__((noreturn));
-  f1<decltype(fnrt)>();
-  f10<ns::AnonEnum1>();
-}
-void t8::mem() {
-  struct t7 { };
-  f1<t7>();
-  f1<decltype(&t8::mem)>();
-}
-namespace complex_type_units {
-void external_function();
-namespace {
-struct internal_type;
-}
-template <void (*)() = external_function> struct t2;
-template <typename = t2<>> class t3 {};
-template <typename = internal_type, typename = t3<>>
-struct t4 {
-};
-struct t5 {
-    t4<> v1;
-};
-void f1() {
-  t5 v1;
-  t3<> v2;
-}
-}
diff --git a/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/simplified_template_names_noncanonical_type_units.cpp b/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/simplified_template_names_noncanonical_type_units.cpp
deleted file mode 100644
index 6e124911b1854c..00000000000000
--- a/cross-project-tests/debuginfo-tests/clang_llvm_roundtrip/simplified_template_names_noncanonical_type_units.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-// UNSUPPORTED: system-darwin
-// RUN: rm -rf %t
-// RUN: split-file %s %t
-// RUN: mkdir %t/incl
-// RUN: mv %t/header.h %t/incl/header.h
-// RUN: cd %t
-// RUN: %clang %target_itanium_abi_host_triple -g -o %t/a.out \
-// RUN:   -Xclang -gsimple-template-names=mangled \
-// RUN:   -Xclang -debug-forward-template-params \
-// RUN:   -std=c++20 -fdebug-types-section -I incl a.cpp b.cpp
-// RUN: llvm-dwarfdump --verify %t/a.out
-
-//--- header.h
-template <typename T> struct t1 {};
-inline auto f1() {
-  auto T = [] {};
-  t1<decltype(T)> v;
-  return v;
-}
-inline auto f2() {
-  struct {
-  } T;
-  t1<decltype(T)> v;
-  return v;
-}
-void a();
-//--- a.cpp
-#include "incl/header.h"
-template <typename T> void ft() {}
-void a() {
-  ft<decltype(f1())>();
-  ft<decltype(f2())>();
-}
-//--- b.cpp
-#include "header.h"
-template <typename T> void ft() {}
-int main() {
-  a();
-  ft<decltype(f1())>();
-  ft<decltype(f2())>();
-}
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/aggregate-indirect-arg.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/aggregate-indirect-arg.cpp
deleted file mode 100644
index 801e4851cfa811..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/aggregate-indirect-arg.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-//
-// RUN: %clang -std=gnu++11 -O0 -g -lstdc++ %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -- %s
-// Radar 8945514
-
-class SVal {
-public:
-  ~SVal() {}
-  const void* Data;
-  unsigned Kind;
-};
-
-void bar(SVal &v) {}
-class A {
-public:
-  void foo(SVal v) { bar(v); } // DexLabel('foo')
-};
-
-int main() {
-  SVal v;
-  v.Data = 0;
-  v.Kind = 2142;
-  A a;
-  a.foo(v);
-  return 0;
-}
-
-/*
-DexExpectProgramState({
-  'frames': [
-    {
-      'location': { 'lineno': ref('foo') },
-      'watches': {
-        'v.Data == 0': 'true',
-        'v.Kind': '2142'
-      }
-    }
-  ]
-})
-*/
-
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/asan-deque.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/asan-deque.cpp
deleted file mode 100644
index cd1ca21957d31a..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/asan-deque.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// REQUIRES: !asan, compiler-rt, lldb
-// UNSUPPORTED: system-windows
-//           Zorg configures the ASAN stage2 bots to not build the asan
-//           compiler-rt. Only run this test on non-asanified configurations.
-// UNSUPPORTED: apple-lldb-pre-1000
-
-// XFAIL: lldb
-// lldb-8, even outside of dexter, will sometimes trigger an asan fault in
-// the debugged process and generally freak out.
-
-// RUN: %clang -std=gnu++11 -O1 -glldb -fsanitize=address -arch x86_64 %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -- %s
-#include <deque>
-
-struct A {
-  int a;
-  A(int a) : a(a) {}
-  A() : a(0) {}
-};
-
-using deq_t = std::deque<A>;
-
-template class std::deque<A>;
-
-static void __attribute__((noinline, optnone)) escape(deq_t &deq) {
-  static volatile deq_t *sink;
-  sink = &deq;
-}
-
-int main() {
-  deq_t deq;
-  deq.push_back(1234);
-  deq.push_back(56789);
-  escape(deq); // DexLabel('first')
-  while (!deq.empty()) {
-    auto record = deq.front();
-    deq.pop_front();
-    escape(deq); // DexLabel('second')
-  }
-}
-
-// DexExpectWatchValue('deq[0].a', '1234', on_line=ref('first'))
-// DexExpectWatchValue('deq[1].a', '56789', on_line=ref('first'))
-
-// DexExpectWatchValue('deq[0].a', '56789', '0', on_line=ref('second'))
-
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/asan.c b/cross-project-tests/debuginfo-tests/dexter-tests/asan.c
deleted file mode 100644
index e52494c585d82f..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/asan.c
+++ /dev/null
@@ -1,29 +0,0 @@
-// REQUIRES: !asan, compiler-rt, lldb
-// UNSUPPORTED: system-windows
-//           Zorg configures the ASAN stage2 bots to not build the asan
-//           compiler-rt. Only run this test on non-asanified configurations.
-//
-// RUN: %clang -std=gnu11 --driver-mode=gcc -O0 -glldb -fblocks -arch x86_64 \
-// RUN:     -fsanitize=address %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -- %s
-
-struct S {
-  int a[8];
-};
-
-int f(struct S s, unsigned i) {
-  return s.a[i]; // DexLabel('asan')
-}
-
-int main(int argc, const char **argv) {
-  struct S s = {{0, 1, 2, 3, 4, 5, 6, 7}};
-  if (f(s, 4) == 4)
-    return f(s, 0);
-  return 0;
-}
-
-// DexExpectWatchValue('s.a[0]', '0', on_line=ref('asan'))
-// DexExpectWatchValue('s.a[1]', '1', on_line=ref('asan'))
-// DexExpectWatchValue('s.a[7]', '7', on_line=ref('asan'))
-
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/ctor.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/ctor.cpp
deleted file mode 100644
index a9b3e386921836..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/ctor.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-//
-// RUN: %clang -std=gnu++11 -O0 -glldb %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -- %s
-
-class A {
-public:
-	A() : zero(0), data(42) { // DexLabel('ctor_start')
-	}
-private:
-	int zero;
-	int data;
-};
-
-int main() {
-	A a;
-	return 0;
-}
-
-
-/*
-DexExpectProgramState({
-	'frames': [
-		{
-			'location': {
-				'lineno': ref('ctor_start')
-			},
-			'watches': {
-				'*this': {'is_irretrievable': False}
-			}
-		}
-	]
-})
-*/
-
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/dbg-arg.c b/cross-project-tests/debuginfo-tests/dexter-tests/dbg-arg.c
deleted file mode 100644
index ff000f584db035..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/dbg-arg.c
+++ /dev/null
@@ -1,60 +0,0 @@
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-//
-// This test case checks debug info during register moves for an argument.
-// RUN: %clang -std=gnu11 -m64 -mllvm -fast-isel=false -g %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -- %s
-//
-// Radar 8412415
-
-struct _mtx
-{
-  long unsigned int ptr;
-  int waiters;
-  struct {
-    int tag;
-    int pad;
-  } mtxi;
-};
-
-int bar(int, int);
-
-int foobar(struct _mtx *mutex) {
-  int r = 1;
-  int l = 0; // DexLabel('l_assign')
-  int j = 0;
-  do {
-    if (mutex->waiters) {
-      r = 2;
-    }
-    j = bar(r, l);
-    ++l;
-  } while (l < j);
-  return r + j;
-}
-
-int bar(int i, int j) {
-  return i + j;
-}
-
-int main() {
-  struct _mtx m;
-  m.waiters = 0;
-  return foobar(&m);
-}
-
-
-/*
-DexExpectProgramState({
-  'frames': [
-    {
-      'location': { 'lineno': ref('l_assign') },
-      'watches': {
-        '*mutex': { 'is_irretrievable': False }
-      }
-    }
-  ]
-})
-*/
-
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/deferred_globals.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/deferred_globals.cpp
deleted file mode 100644
index d78c7293cb89cb..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/deferred_globals.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-// Purpose:
-// Ensure that debug information for a local variable does not hide
-// a global definition that has the same name.
-
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-// RUN: %clang -std=gnu++11 -O0 -g %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary  %t --debugger 'lldb' -v -- %s
-
-const int d = 100;
-
-extern int foo();
-
-int main() {
-  const int d = 4;
-  const float e = 4; // DexLabel("main")
-  const char *f = "Woopy";
-  return d + foo();
-}
-
-int foo() {
-  return d; // DexLabel("foo")
-}
-
-// DexExpectWatchValue('d', '4', on_line=ref('main'))
-// DexExpectWatchValue('d', '100', on_line=ref('foo'))
-
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/global-constant.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/global-constant.cpp
deleted file mode 100644
index 7274506b9ae434..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/global-constant.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// REQUIRES: system-windows
-//
-// RUN: %clang_cl /Z7 /Zi %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'dbgeng' -- %s
-
-// Check that global constants have debug info.
-
-const float TestPi = 3.14;
-struct S {
-  static const char TestCharA = 'a';
-};
-enum TestEnum : int {
-  ENUM_POS = 2147000000,
-  ENUM_NEG = -2147000000,
-};
-void useConst(int) {}
-int main() {
-  useConst(TestPi);
-  useConst(S::TestCharA);
-  useConst(ENUM_NEG); // DexLabel('stop')
-  return 0;
-}
-
-// DexExpectWatchValue('TestPi', 3.140000104904175, on_line=ref('stop'))
-// DexExpectWatchValue('S::TestCharA', 97, on_line=ref('stop'))
-// DexExpectWatchValue('ENUM_NEG', -2147000000, on_line=ref('stop'))
-/* DexExpectProgramState({'frames': [{
-               'location': {'lineno' : ref('stop')},
-               'watches': {'ENUM_POS' : {'is_irretrievable': True}}
-}]}) */
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/hello.c b/cross-project-tests/debuginfo-tests/dexter-tests/hello.c
deleted file mode 100644
index 1e7b050cf08f7b..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/hello.c
+++ /dev/null
@@ -1,13 +0,0 @@
-// REQUIRES: system-windows
-//
-// RUN: %clang_cl /Z7 /Zi %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'dbgeng' -- %s
-
-#include <stdio.h>
-int main() {
-  printf("hello world\n");
-  int x = 42;
-  __debugbreak(); // DexLabel('stop')
-}
-
-// DexExpectWatchValue('x', 42, on_line=ref('stop'))
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/inline-line-gap.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/inline-line-gap.cpp
deleted file mode 100644
index e24d3a48656ed1..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/inline-line-gap.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// REQUIRES: system-windows
-//
-// RUN: %clang_cl /Od /Z7 /Zi %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'dbgeng' -- %s
-//
-// RUN: %clang_cl /O2 /Z7 /Zi %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --binary %t \
-// RUN:      --debugger 'dbgeng' -- %s
-
-// This code is structured to have an early exit with an epilogue in the middle
-// of the function, which creates a gap between the beginning of the inlined
-// code region and the end. Previously, this confused cdb.
-
-volatile bool shutting_down_ = true;
-volatile bool tearing_down_ = true;
-
-void __attribute__((optnone)) setCrashString(const char *) {}
-void __attribute__((optnone)) doTailCall() {}
-extern "C" void __declspec(noreturn) abort();
-
-void __forceinline inlineCrashFrame() {
-  if (shutting_down_ || tearing_down_) {
-    setCrashString("crashing");
-    // MSVC lays out calls to abort out of line, gets the layout we want.
-    abort(); // DexLabel('stop')
-  }
-}
-
-void __declspec(noinline) callerOfInlineCrashFrame(bool is_keeping_alive) {
-  if (is_keeping_alive)
-    inlineCrashFrame();
-  else
-    doTailCall();
-}
-
-int __attribute__((optnone)) main() {
-  callerOfInlineCrashFrame(true);
-}
-
-/*
-DexExpectProgramState({'frames':[
-     {'function': 'inlineCrashFrame', 'location':{'lineno' : ref('stop')} },
-     {'function': 'callerOfInlineCrashFrame'},
-     {'function': 'main'}
-]})
-*/
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/lit.local.cfg b/cross-project-tests/debuginfo-tests/dexter-tests/lit.local.cfg
deleted file mode 100644
index bace385c23f7c6..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/lit.local.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-if "dexter" not in config.available_features:
-    config.unsupported = True
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/bitcast.c b/cross-project-tests/debuginfo-tests/dexter-tests/memvars/bitcast.c
deleted file mode 100644
index 314fd3b31c42f8..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/bitcast.c
+++ /dev/null
@@ -1,77 +0,0 @@
-// XFAIL:*
-//// Suboptimal coverage, see description below.
-
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-// RUN: %clang -std=gnu11 -O3 -glldb %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
-
-//// Adapted from https://bugs.llvm.org/show_bug.cgi?id=34136#c1
-//// LowerDbgDeclare has since been updated to look through bitcasts. We still
-//// get suboptimal coverage at the beginning of 'main' though. For each local,
-//// LowerDbgDeclare inserts a dbg.value and a dbg.value+DW_OP_deref before the
-//// store (after the call to 'getint') and the call to 'alias' respectively.
-//// The first dbg.value describes the result of the 'getint' call, eventually
-//// becoming a register location. The second points back into the stack
-//// home. There is a gap in the coverage between the quickly clobbered register
-//// location and the stack location, even though the stack location is valid
-//// during that gap. For x86 we end up with this code at the start of main:
-//// 00000000004004b0 <main>:
-////   4004b0:  sub    rsp,0x18
-////   4004b4:  mov    edi,0x5
-////   4004b9:  call   400480 <getint>
-////   4004be:  mov    DWORD PTR [rsp+0x14],eax
-////   4004c2:  mov    edi,0x5
-////   4004c7:  call   400480 <getint>
-////   4004cc:  mov    DWORD PTR [rsp+0x10],eax
-////   4004d0:  mov    edi,0x5
-////   4004d5:  call   400480 <getint>
-////   4004da:  mov    DWORD PTR [rsp+0xc],eax
-////   ...
-//// With these variable locations:
-////  DW_TAG_variable
-////    DW_AT_location        (0x00000000:
-////       [0x00000000004004be, 0x00000000004004cc): DW_OP_reg0 RAX
-////       [0x00000000004004de, 0x0000000000400503): DW_OP_breg7 RSP+20)
-////    DW_AT_name    ("x")
-////    ...
-////  DW_TAG_variable
-////    DW_AT_location        (0x00000037:
-////       [0x00000000004004cc, 0x00000000004004da): DW_OP_reg0 RAX
-////       [0x00000000004004e8, 0x0000000000400503): DW_OP_breg7 RSP+16)
-////    DW_AT_name    ("y")
-////    ...
-////  DW_TAG_variable
-////    DW_AT_location        (0x0000006e:
-////       [0x00000000004004da, 0x00000000004004e8): DW_OP_reg0 RAX
-////       [0x00000000004004f2, 0x0000000000400503): DW_OP_breg7 RSP+12)
-////    DW_AT_name    ("z")
-////    ...
-
-char g = 1;
-int five = 5;
-__attribute__((__noinline__))
-int getint(int x) {
-  g = x - 4;
-  return x * g;
-}
-
-__attribute__((__noinline__))
-void alias(char* c) {
-  g = *c;
-  *c = (char)five;
-}
-
-int main() {
-  int x = getint(5);
-  int y = getint(5); // DexLabel('s1')
-  int z = getint(5); // DexLabel('s2')
-  alias((char*)&x);  // DexLabel('s3')
-  alias((char*)&y);
-  alias((char*)&z);
-  return 0;          // DexLabel('s4')
-}
-
-// DexExpectWatchValue('x', '5',  from_line=ref('s1'), to_line=ref('s4'))
-// DexExpectWatchValue('y', '5',  from_line=ref('s2'), to_line=ref('s4'))
-// DexExpectWatchValue('z', '5',  from_line=ref('s3'), to_line=ref('s4'))
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/const-branch.c b/cross-project-tests/debuginfo-tests/dexter-tests/memvars/const-branch.c
deleted file mode 100644
index 42629c556ffa03..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/const-branch.c
+++ /dev/null
@@ -1,52 +0,0 @@
-// XFAIL: !system-darwin || !target-aarch64
-//// Suboptimal coverage, see inlined comments.
-
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-// RUN: %clang -std=gnu11 -O3 -glldb %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
-
-//// Adapted from https://bugs.llvm.org/show_bug.cgi?id=34136#c4
-
-int g;
-
-__attribute__((__noinline__))
-void esc(int* p) {
-  g = *p;
-  *p = 5;
-}
-
-__attribute__((__noinline__))
-void thing(int x) {
-  g = x;
-}
-
-__attribute__((__noinline__))
-int fun(int param) {
-  esc(&param);      //// alloca is live until here        DexLabel('s1')
-  if (param == 0) { //// end of alloca live range
-    //// param is now a constant, but without lowering to dbg.value we can't
-    //// capture that and would still point to the stack slot that may even have
-    //// been reused by now.
-    ////
-    //// Right now we get suboptimal coverage for x86: the param load below is
-    //// CSE'd with the if condition.
-    //// Instcombine runs LowerDbgDeclare and inserts a dbg.value after the load.
-    //// SelectionDAG combines the load and cmp. We go from this IR:
-    ////   %0 = load i32, i32* %param.addr, align 4, !dbg !42, !tbaa !20
-    ////   call void @llvm.dbg.value(metadata i32 %0, ...
-    ////   %cmp = icmp eq i32 %0, 0, !dbg !44
-    //// to this MIR:
-    ////   DBG_VALUE $noreg, $noreg, !"param"...
-    ////   CMP32mi8 %param.addr, 1, $noreg, 0, $noreg, 0, implicit-def $eflags, debug-location !44
-    thing(param);
-  }
-  return 0; //                                            DexLabel('s2')
-}
-
-int main() {
-  return fun(5);
-}
-
-// DexExpectWatchValue('param', '5',  from_line=ref('s1'), to_line=ref('s2'))
-
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/ctrl-flow.c b/cross-project-tests/debuginfo-tests/dexter-tests/memvars/ctrl-flow.c
deleted file mode 100644
index 16ad91ec8ca0c3..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/ctrl-flow.c
+++ /dev/null
@@ -1,34 +0,0 @@
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-// RUN: %clang -std=gnu11 -O2 -glldb %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
-
-//// Check that we give good locations to a variable ('local') which is escaped
-//// down some control paths and not others. This example is handled well currently.
-
-int g;
-__attribute__((__noinline__))
-void leak(int *ptr) {
-  g = *ptr;
-  *ptr = 2;
-}
-
-__attribute__((__noinline__))
-int fun(int cond) {
-  int local = 0;   // DexLabel('s1')
-  if (cond)
-    leak(&local);
-  else
-    local = 1;
-  return local;    // DexLabel('s2')
-}
-
-int main() {
-  int a = fun(1);
-  int b = fun(0);
-  return a + b;
-}
-
-////                           fun(1)  fun(0)
-// DexExpectWatchValue('local',   '0',    '0', on_line=ref('s1'))
-// DexExpectWatchValue('local',   '2',    '1', on_line=ref('s2'))
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/implicit-ptr.c b/cross-project-tests/debuginfo-tests/dexter-tests/memvars/implicit-ptr.c
deleted file mode 100644
index c43b992414451c..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/implicit-ptr.c
+++ /dev/null
@@ -1,45 +0,0 @@
-// XFAIL:*
-//// We don't yet support DW_OP_implicit_pointer in llvm.
-
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-// RUN: %clang -std=gnu11 -O3 -glldb %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
-
-//// Check that 'param' in 'fun' can be read throughout, and that 'pa' and 'pb'
-//// can be dereferenced in the debugger even if we can't provide the pointer
-//// value itself.
-
-int globa;
-int globb;
-
-//// A no-inline, read-only function with internal linkage is a good candidate
-//// for arg promotion.
-__attribute__((__noinline__))
-static void use_promote(const int* pa) {
-  //// Promoted args would be a good candidate for an DW_OP_implicit_pointer.
-  globa = *pa; // DexLabel('s2')
-}
-
-__attribute__((__always_inline__))
-static void use_inline(const int* pb) {
-  //// Inlined pointer to callee local would be a good candidate for an
-  //// DW_OP_implicit_pointer.
-  globb = *pb; // DexLabel('s3')
-}
-
-__attribute__((__noinline__))
-int fun(int param) {
-  volatile int step = 0;   // DexLabel('s1')
-  use_promote(&param);
-  use_inline(&param);
-  return step;             // DexLabel('s4')
-}
-
-int main() {
-  return fun(5);
-}
-
-// DexExpectWatchValue('param', 5, from_line=ref('s1'), to_line=ref('s4'))
-// DexExpectWatchValue('*pa', 5, on_line=ref('s2'))
-// DexExpectWatchValue('*pb', 5, on_line=ref('s3'))
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/inline-escaping-function.c b/cross-project-tests/debuginfo-tests/dexter-tests/memvars/inline-escaping-function.c
deleted file mode 100644
index 3c03603736f738..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/inline-escaping-function.c
+++ /dev/null
@@ -1,45 +0,0 @@
-// XFAIL: *
-// Incorrect location for variable "param", see PR48719.
-
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-// RUN: %clang -std=gnu11 -O3 -glldb %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
-
-// 1. param is escaped by inlineme(&param) so it is not promoted by
-//    SROA/mem2reg.
-// 2. InstCombine's LowerDbgDeclare converts the dbg.declare to a set of
-//    dbg.values.
-// 3. inlineme(&param) is inlined.
-// 4. SROA/mem2reg fully promotes param. It does not insert a dbg.value after the
-//    PHI it inserts which merges the values out of entry and if.then in the
-//    sucessor block. This behaviour is inconsistent. If the dbg.declare was
-//    still around (i.e.  if param was promoted in the first round of mem2reg
-//    BEFORE LowerDbgDeclare) we would see a dbg.value insered for the PHI.
-// 5. JumpThreading removes the if.then block, changing entry to
-//    unconditionally branch to if.end.
-// 6. SimplifyCFG stitches entry and if.end together.
-
-// The debug info is not updated to account for the merged value prior to or
-// during JumpThreading/SimplifyCFG so we end up seeing param=5 for the entire
-// function, when we'd expect to see param=10 when stepping onto fluff().
-
-__attribute__((always_inline))
-int inlineme(int* p) { return *p * 2; }
-
-__attribute__((optnone))
-void fluff() {}
-
-__attribute__((noinline))
-int fun(int param) {
-  if (param)
-    param = inlineme(&param);
-  fluff();           // DexLabel('s0')
-  return param;
-}
-
-int main() {
-  return fun(5);
-}
-
-// DexExpectWatchValue('param', 10, on_line=ref('s0'))
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/inlining-dse.c b/cross-project-tests/debuginfo-tests/dexter-tests/memvars/inlining-dse.c
deleted file mode 100644
index d5bdc3e01fa170..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/inlining-dse.c
+++ /dev/null
@@ -1,52 +0,0 @@
-// XFAIL:*
-//// See PR47946.
-
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-// RUN: %clang -std=gnu11 -O2 -glldb %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
-//
-//// Check that once-escaped variable 'param' can still be read after we
-//// perform inlining + mem2reg, and that we see the DSE'd value 255.
-
-
-int g;
-__attribute__((__always_inline__))
-static void use(int* p) {
-  g = *p;
-  *p = 255;
-  volatile int step = 0;  // DexLabel('use1')
-}
-
-__attribute__((__noinline__))
-void fun(int param) {
-  //// Make sure first step is in 'fun'.
-  volatile int step = 0;  // DexLabel('fun1')
-  use(&param);
-  return;                 // DexLabel('fun2')
-}
-
-int main() {
-  fun(5);
-}
-
-/*
-# Expect param == 5 before stepping through inlined 'use'.
-DexExpectWatchValue('param', '5', on_line=ref('fun1'))
-
-# Expect param == 255 after assignment in inlined frame 'use'.
-DexExpectProgramState({
-  'frames': [
-    { 'function': 'use',
-      'location': { 'lineno': ref('use1') },
-    },
-    { 'function': 'fun',
-      'location': { 'lineno': 20 },
-      'watches':  { 'param': '255' }
-    },
-  ]
-})
-
-# Expect param == 255 after inlined call to 'use'.
-DexExpectWatchValue('param', '255', on_line=ref('fun2'))
-*/
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/inlining.c b/cross-project-tests/debuginfo-tests/dexter-tests/memvars/inlining.c
deleted file mode 100644
index dd7b3452f2b02b..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/inlining.c
+++ /dev/null
@@ -1,26 +0,0 @@
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-// RUN: %clang -std=gnu11 -O2 -glldb %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
-//
-//// Check that the once-escaped variable 'param' can still be read after
-//// we perform inlining + mem2reg. See D89810 and D85555.
-
-int g;
-__attribute__((__always_inline__))
-static void use(int* p) {
-  g = *p;
-}
-
-__attribute__((__noinline__))
-void fun(int param) {
-  volatile int step1 = 0;  // DexLabel('s1')
-  use(&param);
-  volatile int step2 = 0;  // DexLabel('s2')
-}
-
-int main() {
-  fun(5);
-}
-
-// DexExpectWatchValue('param', '5', from_line=ref('s1'), to_line=ref('s2'))
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/loop.c b/cross-project-tests/debuginfo-tests/dexter-tests/memvars/loop.c
deleted file mode 100644
index 8ce358b4aada75..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/loop.c
+++ /dev/null
@@ -1,56 +0,0 @@
-// XFAIL: *
-//// Suboptimal coverage, see below.
-
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-// RUN: %clang -std=gnu11 -O3 -glldb %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
-
-//// Check that escaped local 'param' in function 'fun' has sensible debug info
-//// after the escaping function 'use' gets arg promotion (int* -> int). Currently
-//// we lose track of param after the loop header.
-
-int g = 0;
-//// A no-inline, read-only function with internal linkage is a good candidate
-//// for arg promotion.
-__attribute__((__noinline__))
-static void use(const int* p) {
-  //// Promoted args would be a good candidate for an DW_OP_implicit_pointer.
-  //// This desirable behaviour is checked for in the test implicit-ptr.c.
-  g = *p;
-}
-
-__attribute__((__noinline__))
-void do_thing(int x) {
-  g *= x;
-}
-
-__attribute__((__noinline__))
-int fun(int param) {
-  do_thing(0);                        // DexLabel('s2')
-  for (int i = 0; i < param; ++i) {
-    use(&param);
-  }
-
-  //// x86 loop body looks like this, with param in ebx:
-  //// 4004b0: mov    edi,ebx
-  //// 4004b2: call   4004d0 <_ZL3usePKi>
-  //// 4004b7: add    ebp,0xffffffff
-  //// 4004ba: jne    4004b0 <_Z3funi+0x20>
-
-  //// But we lose track of param's location before the loop:
-  //// DW_TAG_formal_parameter
-  //// DW_AT_location   (0x00000039:
-  ////    [0x0000000000400490, 0x0000000000400495): DW_OP_reg5 RDI
-  ////    [0x0000000000400495, 0x00000000004004a2): DW_OP_reg3 RBX)
-  //// DW_AT_name       ("param")
-
-  return g;                           // DexLabel('s3')
-}
-
-int main() {
-  return fun(5);
-}
-
-// DexExpectWatchValue('*p', 5, 5, 5, 5, 5, on_line=ref('s1'))
-// DexExpectWatchValue('param', 5, from_line=ref('s2'), to_line=ref('s3'))
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/merged-store.c b/cross-project-tests/debuginfo-tests/dexter-tests/memvars/merged-store.c
deleted file mode 100644
index bbd806a08819f0..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/merged-store.c
+++ /dev/null
@@ -1,43 +0,0 @@
-// XFAIL: *
-// Incorrect location for variable "parama", see PR48719.
-
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-// RUN: %clang -std=gnu11 -O3 -glldb %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
-
-// 1. parama is escaped by esc(&parama) so it is not promoted by
-//    SROA/mem2reg.
-// 2. InstCombine's LowerDbgDeclare converts the dbg.declare to a set of
-//    dbg.values (tracking the stored SSA values).
-// 3. InstCombine replaces the two stores to parama's alloca (the initial
-//    parameter register store in entry and the assignment in if.then) with a
-//    PHI+store in the common sucessor.
-// 4. SimplifyCFG folds the blocks together and converts the PHI to a
-//    select.
-
-// The debug info is not updated to account for the merged value in the
-// sucessor prior to SimplifyCFG when it exists as a PHI, or during when it
-// becomes a select. As a result we see parama=5 for the entire function, when
-// we'd expect to see param=20 when stepping onto fluff().
-
-__attribute__((optnone))
-void esc(int* p) {}
-
-__attribute__((optnone))
-void fluff() {}
-
-__attribute__((noinline))
-int fun(int parama, int paramb) {
-  if (parama)
-    parama = paramb;
-  fluff();           // DexLabel('s0')
-  esc(&parama);
-  return 0;
-}
-
-int main() {
-  return fun(5, 20);
-}
-
-// DexExpectWatchValue('parama', 20, on_line=ref('s0'))
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/ptr-to.c b/cross-project-tests/debuginfo-tests/dexter-tests/memvars/ptr-to.c
deleted file mode 100644
index 26adc2e4d9788f..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/ptr-to.c
+++ /dev/null
@@ -1,35 +0,0 @@
-// XFAIL:*
-//// Currently debug info for 'local' behaves, but 'plocal' dereferences to
-//// the incorrect value 0xFF after the call to esc.
-
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-// RUN: %clang -std=gnu11 -O2 -glldb %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
-//
-//// Check that a pointer to a variable living on the stack dereferences to the
-//// variable value.
-
-int glob;
-__attribute__((__noinline__))
-void esc(int* p) {
-  glob = *p;
-  *p = 0xFF;
-}
-
-int main() {
-  int local = 0xA;
-  int *plocal = &local;
-  esc(plocal);      // DexLabel('s1')
-  local = 0xB;      //// DSE
-  return 0;         // DexLabel('s2')
-}
-
-
-// DexExpectWatchValue('local', 0xA, on_line=ref('s1'))
-// DexExpectWatchValue('local', 0xB, on_line=ref('s2'))
-// DexExpectWatchValue('*plocal', 0xA, on_line=ref('s1'))
-// DexExpectWatchValue('*plocal', 0xB, on_line=ref('s2'))
-//// Ideally we should be able to observe the dead store to local (0xB) through
-//// plocal here.
-// DexExpectWatchValue('(local == *plocal)', 'true', from_line=ref('s1'), to_line=ref('s2'))
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/struct-dse.c b/cross-project-tests/debuginfo-tests/dexter-tests/memvars/struct-dse.c
deleted file mode 100644
index 2975b88e8bc634..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/struct-dse.c
+++ /dev/null
@@ -1,35 +0,0 @@
-// XFAIL:*
-//// Currently, LowerDbgDeclare doesn't lower dbg.declares pointing at allocas
-//// for structs.
-
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-// RUN: %clang -std=gnu11 -O2 -glldb %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
-//
-//// Check debug-info for the escaped struct variable num is reasonable.
-
-#include <stdio.h>
-struct Nums {
-  int a, b, c, d, e, f, g, h, i, j;
-};
-struct Nums glob;
-__attribute__((__noinline__))
-void esc(struct Nums* nums) {
-  glob = *nums;
-}
-
-__attribute__((__noinline__))
-int main() {
-  struct Nums nums = { .c=1 };       //// Dead store.
-  printf("s1 nums.c: %d\n", nums.c); // DexLabel('s1')
-
-  nums.c = 2;                        //// Killing store.
-  printf("s2 nums.c: %d\n", nums.c); // DexLabel('s2')
-
-  esc(&nums);                        //// Force nums to live on the stack.
-  return 0;                          // DexLabel('s3')
-}
-
-// DexExpectWatchValue('nums.c', '1', on_line=ref('s1'))
-// DexExpectWatchValue('nums.c', '2', from_line=ref('s2'), to_line=ref('s3'))
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/unused-merged-value.c b/cross-project-tests/debuginfo-tests/dexter-tests/memvars/unused-merged-value.c
deleted file mode 100644
index 38a9b644be5044..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/memvars/unused-merged-value.c
+++ /dev/null
@@ -1,46 +0,0 @@
-// Location for variable "parama" optimized out.
-// Previously it would carry incorrect location
-// information in debug-info, see PR48719.
-// Now, the location is simply not emitted.
-
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-// RUN: %clang -std=gnu11 -O3 -glldb %s -o %t
-// RUN: %dexter --fail-lt 0.1 -w --debugger lldb --binary %t -- %s
-// See NOTE at end for more info about the RUN command.
-
-// 1. SROA/mem2reg fully promotes parama.
-// 2. parama's value in the final block is the merge of values for it coming
-//    out of entry and if.then. If the variable were used later in the function
-//    mem2reg would insert a PHI here and add a dbg.value to track the merged
-//    value in debug info. Because it is not used there is no PHI (the merged
-//    value is implicit) and subsequently no dbg.value.
-// 3. SimplifyCFG later folds the blocks together (if.then does nothing besides
-//    provide debug info so it is removed and if.end is folded into the entry
-//    block).
-
-// The debug info is not updated to account for the implicit merged value prior
-// to (e.g. during mem2reg) or during SimplifyCFG so we end up seeing parama=5
-// for the entire function, which is incorrect.
-
-__attribute__((optnone))
-void fluff() {}
-
-__attribute__((noinline))
-int fun(int parama, int paramb) {
-  if (parama)
-    parama = paramb;
-  fluff();            // DexLabel('s0')
-  return paramb;
-}
-
-int main() {
-  return fun(5, 20);
-}
-
-// DexExpectWatchValue('parama', 20, on_line=ref('s0'))
-//
-// NOTE: the dexter command uses --fail-lt 0.1 (instead of the standard 1.0)
-// because seeing 'optimized out' would still be a win; it's the best we can do
-// without using conditional DWARF operators in the location expression. Seeing
-// 'optimized out' should result in a score higher than 0.1.
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/namespace.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/namespace.cpp
deleted file mode 100644
index c94939157ff7e4..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/namespace.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// Purpose:
-// Ensure that the debug information for a global variable includes
-// namespace information.
-
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-
-// RUN: %clang -g -O0 %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -v -- %s
-
-#include <stdio.h>
-
-namespace monkey {
-const int ape = 32;
-}
-
-int main() {
-  printf("hello %d\n", monkey::ape); // DexLabel('main')
-  return 0;
-}
-
-// DexExpectWatchValue('monkey::ape', 32, on_line=ref('main'))
-
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/nrvo-string.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/nrvo-string.cpp
deleted file mode 100644
index 822e832f9a16a5..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/nrvo-string.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-// Purpose:
-//     This ensures that DW_OP_deref is inserted when necessary, such as when
-//     NRVO of a string object occurs in C++.
-//
-// REQUIRES: !asan, compiler-rt, lldb
-// UNSUPPORTED: system-windows
-//           Zorg configures the ASAN stage2 bots to not build the asan
-//           compiler-rt. Only run this test on non-asanified configurations.
-//
-// RUN: %clang -std=gnu++11 -O0 -glldb -fno-exceptions %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -- %s
-//
-// RUN: %clang -std=gnu++11 -O1 -glldb -fno-exceptions %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -- %s
-//
-// PR34513
-volatile int sideeffect = 0;
-void __attribute__((noinline)) stop() { sideeffect++; }
-
-struct string {
-  string() {}
-  string(int i) : i(i) {}
-  ~string() {}
-  int i = 0;
-};
-string __attribute__((noinline)) get_string() {
-  string unused;
-  string output = 3;
-  stop(); // DexLabel('string-nrvo')
-  return output;
-}
-void some_function(int) {}
-struct string2 {
-  string2() = default;
-  string2(string2 &&other) { i = other.i; }
-  int i;
-};
-string2 __attribute__((noinline)) get_string2() {
-  string2 output;
-  output.i = 5;
-  some_function(output.i);
-  // Test that the debugger can get the value of output after another
-  // function is called.
-  stop(); // DexLabel('string2-nrvo')
-  return output;
-}
-int main() {
-  get_string();
-  get_string2();
-}
-
-// DexExpectWatchValue('output.i', 3, on_line=ref('string-nrvo'))
-// DexExpectWatchValue('output.i', 5, on_line=ref('string2-nrvo'))
-
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/nrvo.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/nrvo.cpp
deleted file mode 100644
index e9b14da3f5b774..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/nrvo.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-// This ensures that DW_OP_deref is inserted when necessary, such as when NRVO
-// of a string object occurs in C++.
-//
-// REQUIRES: system-windows
-//
-// RUN: %clang_cl /Z7 /Zi %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'dbgeng' -- %s
-
-struct string {
-  string() {}
-  string(int i) : i(i) {}
-  ~string() {}
-  int i = 0;
-};
-string get_string() {
-  string unused;
-  string result = 3;
-  return result; // DexLabel('readresult1')
-}
-void some_function(int) {}
-struct string2 {
-  string2() = default;
-  string2(string2 &&other) { i = other.i; }
-  int i;
-};
-string2 get_string2() {
-  string2 result;
-  result.i = 5;
-  some_function(result.i);
-  // Test that the debugger can get the value of result after another
-  // function is called.
-  return result; // DexLabel('readresult2')
-}
-int main() {
-  get_string();
-  get_string2();
-}
-
-// DexExpectWatchValue('result.i', 3, on_line=ref('readresult1'))
-// DexExpectWatchValue('result.i', 5, on_line=ref('readresult2'))
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/optnone-fastmath.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/optnone-fastmath.cpp
deleted file mode 100644
index 9f47f6a5e0cc4c..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/optnone-fastmath.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// RUN: %clang -std=gnu++11 -O2 -ffast-math -g %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -- %s
-// RUN: %clang -std=gnu++11 -O0 -ffast-math -g %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -- %s
-
-// REQUIRES: lldb
-// Currently getting intermittent failures on darwin.
-// UNSUPPORTED: system-windows, system-darwin
-
-//// Check that the debugging experience with __attribute__((optnone)) at O2
-//// matches O0. Test scalar floating point arithmetic with -ffast-math.
-
-//// Example of strength reduction.
-//// The division by 10.0f can be rewritten as a multiply by 0.1f.
-//// A / 10.f ==> A * 0.1f
-//// This is safe with fastmath since we treat the two operations
-//// as equally precise. However we don't want this to happen
-//// with optnone.
-__attribute__((optnone))
-float test_fdiv(float A) {
-  float result;
-  result = A / 10.f;  // DexLabel('fdiv_assign')
-  return result;      // DexLabel('fdiv_ret')
-}
-// DexExpectWatchValue('A', 4, on_line=ref('fdiv_assign'))
-// DexExpectWatchValue('result', '0.400000006', on_line=ref('fdiv_ret'))
-
-//// (A * B) - (A * C) ==> A * (B - C)
-__attribute__((optnone))
-float test_distributivity(float A, float B, float C) {
-  float result;
-  float op1 = A * B;
-  float op2 = A * C;    // DexLabel('distributivity_op2')
-  result = op1 - op2;   // DexLabel('distributivity_result')
-  return result;        // DexLabel('distributivity_ret')
-}
-// DexExpectWatchValue('op1', '20', on_line=ref('distributivity_op2'))
-// DexExpectWatchValue('op2', '24', on_line=ref('distributivity_result'))
-// DexExpectWatchValue('result', '-4', on_line=ref('distributivity_ret'))
-
-//// (A + B) + C  == A + (B + C)
-//// therefore, ((A + B) + C) + (A + (B + C)))
-//// can be rewritten as
-//// 2.0f * ((A + B) + C)
-//// Clang is currently unable to spot this optimization
-//// opportunity with fastmath.
-__attribute__((optnone))
-float test_associativity(float A, float B, float C) {
-  float result;
-  float op1 = A + B;
-  float op2 = B + C;
-  op1 += C;           // DexLabel('associativity_op1')
-  op2 += A;
-  result = op1 + op2; // DexLabel('associativity_result')
-  return result;      // DexLabel('associativity_ret')
-}
-// DexExpectWatchValue('op1', '9', '15', from_line=ref('associativity_op1'), to_line=ref('associativity_result'))
-// DexExpectWatchValue('op2', '11', '15', from_line=ref('associativity_op1'), to_line=ref('associativity_result'))
-// DexExpectWatchValue('result', '30', on_line=ref('associativity_ret'))
-
-//// With fastmath, the ordering of instructions doesn't matter
-//// since we work under the assumption that there is no loss
-//// in precision. This simplifies things for the optimizer which
-//// can then decide to reorder instructions and fold
-//// redundant operations like this:
-////   A += 5.0f
-////   A -= 5.0f
-////    -->
-////   A
-//// This function can be simplified to a return A + B.
-__attribute__((optnone))
-float test_simplify_fp_operations(float A, float B) {
-  float result = A + 10.0f; // DexLabel('fp_operations_result')
-  result += B;              // DexLabel('fp_operations_add')
-  result -= 10.0f;
-  return result;            // DexLabel('fp_operations_ret')
-}
-// DexExpectWatchValue('A', '8.25', on_line=ref('fp_operations_result'))
-// DexExpectWatchValue('B', '26.3999996', on_line=ref('fp_operations_result'))
-// DexExpectWatchValue('result', '18.25', '44.6500015', '34.6500015', from_line=ref('fp_operations_add'), to_line=ref('fp_operations_ret'))
-
-//// Again, this is a simple return A + B.
-//// Clang is unable to spot the opportunity to fold the code sequence.
-__attribute__((optnone))
-float test_simplify_fp_operations_2(float A, float B, float C) {
-  float result = A + C; // DexLabel('fp_operations_2_result')
-  result += B;
-  result -= C;          // DexLabel('fp_operations_2_subtract')
-  return result;        // DexLabel('fp_operations_2_ret')
-}
-// DexExpectWatchValue('A', '9.11999988', on_line=ref('fp_operations_2_result'))
-// DexExpectWatchValue('B', '61.050003', on_line=ref('fp_operations_2_result'))
-// DexExpectWatchValue('C', '1002.11102', on_line=ref('fp_operations_2_result'))
-// DexExpectWatchValue('result', '1072.28101', '70.1699829', from_line=ref('fp_operations_2_subtract'), to_line=ref('fp_operations_2_ret'))
-
-int main() {
-  float result = test_fdiv(4.0f);
-  result += test_distributivity(4.0f, 5.0f, 6.0f);
-  result += test_associativity(4.0f, 5.0f, 6.0f);
-  result += test_simplify_fp_operations(8.25, result);
-  result += test_simplify_fp_operations_2(9.12, result, 1002.111);
-  return static_cast<int>(result);
-}
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/optnone-loops.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/optnone-loops.cpp
deleted file mode 100644
index 32395342bddd10..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/optnone-loops.cpp
+++ /dev/null
@@ -1,161 +0,0 @@
-// Purpose:
-// Verifies that the debugging experience of loops marked optnone is as expected.
-
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-// UNSUPPORTED: system-darwin
-
-// RUN: %clang -std=gnu++11 -O2 -g %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -- %s
-
-// A simple loop of assignments.
-// With optimization level > 0 the compiler reorders basic blocks
-// based on the basic block frequency analysis information.
-// This also happens with optnone and it shouldn't.
-// This is not affecting debug info so it is a minor limitation.
-// Basic block placement based on the block frequency analysis
-// is normally done to improve i-Cache performances.
-__attribute__((optnone)) void simple_memcpy_loop(int *dest, const int *src,
-                                                 unsigned nelems) {
-  for (unsigned i = 0; i != nelems; ++i)
-    dest[i] = src[i]; // DexLabel('target_simple_memcpy_loop')
-}
-
-// DexLimitSteps('i', 0, 4, 8, on_line=ref('target_simple_memcpy_loop'))
-// DexExpectWatchValue('nelems', '16', on_line=ref('target_simple_memcpy_loop'))
-// DexExpectWatchValue('src[i]', '3', '7', '1', on_line=ref('target_simple_memcpy_loop'))
-
-
-// A trivial loop that could be optimized into a builtin memcpy
-// which is either expanded into a optimal sequence of mov
-// instructions or directly into a call to memset at plt
-__attribute__((optnone)) void trivial_memcpy_loop(int *dest, const int *src) {
-  for (unsigned i = 0; i != 16; ++i)
-    dest[i] = src[i]; // DexLabel('target_trivial_memcpy_loop')
-}
-
-// DexLimitSteps('i', 3, 7, 9, 14, 15, on_line=ref('target_trivial_memcpy_loop'))
-// DexExpectWatchValue('i', 3, 7, 9, 14, 15, on_line=ref('target_trivial_memcpy_loop'))
-// DexExpectWatchValue('dest[i-1] == src[i-1]', 'true', on_line=ref('target_trivial_memcpy_loop'))
-
-
-__attribute__((always_inline)) int foo(int a) { return a + 5; }
-
-// A trivial loop of calls to a 'always_inline' function.
-__attribute__((optnone)) void nonleaf_function_with_loop(int *dest,
-                                                         const int *src) {
-  for (unsigned i = 0; i != 16; ++i)
-    dest[i] = foo(src[i]); // DexLabel('target_nonleaf_function_with_loop')
-}
-
-// DexLimitSteps('i', 1, on_line=ref('target_nonleaf_function_with_loop'))
-// DexExpectWatchValue('dest[0]', '8', on_line=ref('target_nonleaf_function_with_loop'))
-// DexExpectWatchValue('dest[1]', '4', on_line=ref('target_nonleaf_function_with_loop'))
-// DexExpectWatchValue('dest[2]', '5', on_line=ref('target_nonleaf_function_with_loop'))
-// DexExpectWatchValue('src[0]', '8', on_line=ref('target_nonleaf_function_with_loop'))
-// DexExpectWatchValue('src[1]', '4', on_line=ref('target_nonleaf_function_with_loop'))
-// DexExpectWatchValue('src[2]', '5', on_line=ref('target_nonleaf_function_with_loop'))
-
-// DexExpectWatchValue('src[1] == dest[1]', 'true', on_line=ref('target_nonleaf_function_with_loop'))
-// DexExpectWatchValue('src[2] == dest[2]', 'true', on_line=ref('target_nonleaf_function_with_loop'))
-
-
-// This entire function could be optimized into a
-// simple movl %esi, %eax.
-// That is because we can compute the loop trip count
-// knowing that ind-var 'i' can never be negative.
-__attribute__((optnone)) int counting_loop(unsigned values) {
-  unsigned i = 0;
-  while (values--) // DexLabel('target_counting_loop')
-    i++;
-  return i;
-}
-
-// DexLimitSteps('i', 8, 16, on_line=ref('target_counting_loop'))
-// DexExpectWatchValue('i', 8, 16, on_line=ref('target_counting_loop'))
-
-
-// This loop could be rotated.
-// while(cond){
-//   ..
-//   cond--;
-// }
-//
-//  -->
-// if(cond) {
-//   do {
-//     ...
-//     cond--;
-//   } while(cond);
-// }
-//
-// the compiler will not try to optimize this function.
-// However the Machine BB Placement Pass will try
-// to reorder the basic block that computes the
-// expression 'count' in order to simplify the control
-// flow.
-__attribute__((optnone)) int loop_rotate_test(int *src, unsigned count) {
-  int result = 0;
-
-  while (count) {
-    result += src[count - 1]; // DexLabel('target_loop_rotate_test')
-    count--;
-  }
-  return result; // DexLabel('target_loop_rotate_test_ret')
-}
-
-// DexLimitSteps('result', 13, on_line=ref('target_loop_rotate_test'))
-// DexExpectWatchValue('src[count]', 13, on_line=ref('target_loop_rotate_test'))
-// DexLimitSteps('result', 158, on_line=ref('target_loop_rotate_test_ret'))
-// DexExpectWatchValue('result', 158, on_line=ref('target_loop_rotate_test_ret'))
-
-
-typedef int *intptr __attribute__((aligned(16)));
-
-// This loop can be vectorized if we enable
-// the loop vectorizer.
-__attribute__((optnone)) void loop_vectorize_test(intptr dest, intptr src) {
-  unsigned count = 0;
-
-  int tempArray[16];
-
-  while(count != 16) { // DexLabel('target_loop_vectorize_test')
-    tempArray[count] = src[count];
-    tempArray[count+1] = src[count+1]; // DexLabel('target_loop_vectorize_test_2')
-    tempArray[count+2] = src[count+2]; // DexLabel('target_loop_vectorize_test_3')
-    tempArray[count+3] = src[count+3]; // DexLabel('target_loop_vectorize_test_4')
-    dest[count] = tempArray[count]; // DexLabel('target_loop_vectorize_test_5')
-    dest[count+1] = tempArray[count+1]; // DexLabel('target_loop_vectorize_test_6')
-    dest[count+2] = tempArray[count+2]; // DexLabel('target_loop_vectorize_test_7')
-    dest[count+3] = tempArray[count+3]; // DexLabel('target_loop_vectorize_test_8')
-    count += 4; // DexLabel('target_loop_vectorize_test_9')
-  }
-}
-
-// DexLimitSteps('count', 4, 8, 12, 16, from_line=ref('target_loop_vectorize_test'), to_line=ref('target_loop_vectorize_test_9'))
-// DexExpectWatchValue('tempArray[count] == src[count]', 'true', on_line=ref('target_loop_vectorize_test_2'))
-// DexExpectWatchValue('tempArray[count+1] == src[count+1]', 'true', on_line=ref('target_loop_vectorize_test_3'))
-// DexExpectWatchValue('tempArray[count+2] == src[count+2]', 'true', on_line=ref('target_loop_vectorize_test_4'))
-// DexExpectWatchValue('tempArray[count+3] == src[count+3]', 'true', on_line=ref('target_loop_vectorize_test_5'))
-// DexExpectWatchValue('dest[count] == tempArray[count]', 'true', on_line=ref('target_loop_vectorize_test_6'))
-// DexExpectWatchValue('dest[count+1] == tempArray[count+1]', 'true', on_line=ref('target_loop_vectorize_test_7'))
-// DexExpectWatchValue('dest[count+2] == tempArray[count+2]', 'true', on_line=ref('target_loop_vectorize_test_8'))
-// DexExpectWatchValue('dest[count+3] == tempArray[count+3]', 'true', on_line=ref('target_loop_vectorize_test_9'))
-
-
-int main() {
-  int A[] = {3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
-  int B[] = {13, 14, 15, 16, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
-  int C[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-
-  simple_memcpy_loop(C, A, 16);
-  trivial_memcpy_loop(B, C);
-  nonleaf_function_with_loop(B, B);
-  int count = counting_loop(16);
-  count += loop_rotate_test(B, 16);
-  loop_vectorize_test(A, B);
-
-  return A[0] + count;
-}
-
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/optnone-simple-functions.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/optnone-simple-functions.cpp
deleted file mode 100644
index e585c20f4a018d..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/optnone-simple-functions.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// RUN: %clang++ -std=gnu++11 -O2 -g %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -- %s
-// RUN: %clang++ -std=gnu++11 -O0 -g %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -- %s
-
-// REQUIRES: lldb, D136396
-// Currently getting intermittent failures on darwin.
-// UNSUPPORTED: system-windows, system-darwin
-
-//// Check that the debugging experience with __attribute__((optnone)) at O2
-//// matches O0. Test simple functions performing simple arithmetic
-//// operations and small loops.
-
-__attribute__((optnone))
-int test1(int test1_a, int test1_b) {
-  int test1_result = 0;
-  // DexLabel('test1_start')
-  test1_result = test1_a + test1_b; // DexExpectStepOrder(1)
-  return test1_result; // DexExpectStepOrder(2)
-  // DexLabel('test1_end')
-}
-// DexExpectWatchValue('test1_a', 3, from_line=ref('test1_start'), to_line=ref('test1_end'))
-// DexExpectWatchValue('test1_b', 4, from_line=ref('test1_start'), to_line=ref('test1_end'))
-// DexExpectWatchValue('test1_result', 0, 7, from_line=ref('test1_start'), to_line=ref('test1_end'))
-
-__attribute__((optnone))
-int test2(int test2_a, int test2_b) {
-  int test2_result = test2_a + test2_a + test2_a + test2_a;  // DexExpectStepOrder(3)
-  // DexLabel('test2_start')
-  return test2_a << 2;   // DexExpectStepOrder(4)
-  // DexLabel('test2_end')
-}
-// DexExpectWatchValue('test2_a', 1, from_line=ref('test2_start'), to_line=ref('test2_end'))
-// DexExpectWatchValue('test2_b', 2, from_line=ref('test2_start'), to_line=ref('test2_end'))
-// DexExpectWatchValue('test2_result', 4, from_line=ref('test2_start'), to_line=ref('test2_end'))
-
-__attribute__((optnone))
-int test3(int test3_a, int test3_b) {
-  int test3_temp1 = 0, test3_temp2 = 0;
-  // DexLabel('test3_start')
-  test3_temp1 = test3_a + 5;   // DexExpectStepOrder(5)
-  test3_temp2 = test3_b + 5;   // DexExpectStepOrder(6)
-  if (test3_temp1 > test3_temp2) { // DexExpectStepOrder(7)
-    test3_temp1 *= test3_temp2;    // DexUnreachable()
-  }
-  return test3_temp1; // DexExpectStepOrder(8)
-  // DexLabel('test3_end')
-}
-// DexExpectWatchValue('test3_a', 5, from_line=ref('test3_start'), to_line=ref('test3_end'))
-// DexExpectWatchValue('test3_b', 6, from_line=ref('test3_start'), to_line=ref('test3_end'))
-// DexExpectWatchValue('test3_temp1', 0, 10, from_line=ref('test3_start'), to_line=ref('test3_end'))
-// DexExpectWatchValue('test3_temp2', 0, 11, from_line=ref('test3_start'), to_line=ref('test3_end'))
-
-unsigned num_iterations = 4;
-
-__attribute__((optnone))
-int test4(int test4_a, int test4_b) {
-  int val1 = 0, val2 = 0;
-  // DexLabel('test4_start')
-
-  val1 = (test4_a > test4_b) ? test4_a : test4_b; // DexExpectStepOrder(9)
-  val2 = val1;
-  val2 += val1; // DexExpectStepOrder(10)
-
-  for (unsigned i=0; i != num_iterations; ++i) { // DexExpectStepOrder(11, 13, 15, 17, 19)
-    val1--;
-    val2 += i;
-    if (val2 % 2 == 0) // DexExpectStepOrder(12, 14, 16, 18)
-      val2 /= 2;
-  }
-
-  return (val1 > val2) ? val2 : val1; // DexExpectStepOrder(20)
-  // DexLabel('test4_end')
-}
-// DexExpectWatchValue('test4_a', 1, from_line=ref('test4_start'), to_line=ref('test4_end'))
-// DexExpectWatchValue('test4_b', 9, from_line=ref('test4_start'), to_line=ref('test4_end'))
-// DexExpectWatchValue('val1', 0, 9, 8, 7, 6, 5, from_line=ref('test4_start'), to_line=ref('test4_end'))
-// DexExpectWatchValue('val2', 0, 9, 18, 9, 10, 5, 7, 10, 5, 9, from_line=ref('test4_start'), to_line=ref('test4_end'))
-
-__attribute__((optnone))
-int test5(int test5_val) {
-  int c = 1;      // DexExpectStepOrder(21)
-  // DexLabel('test5_start')
-  if (test5_val)  // DexExpectStepOrder(22)
-    c = 5;        // DexExpectStepOrder(23)
-  return c ? test5_val : test5_val; // DexExpectStepOrder(24)
-  // DexLabel('test5_end')
-}
-// DexExpectWatchValue('test5_val', 7, from_line=ref('test5_start'), to_line=ref('test5_end'))
-// DexExpectWatchValue('c', 1, 5, from_line=ref('test5_start'), to_line=ref('test5_end'))
-
-__attribute__((optnone))
-int main() {
-  int main_result = 0;
-  // DexLabel('main_start')
-  main_result = test1(3,4);
-  main_result += test2(1,2);
-  main_result += test3(5,6);
-  main_result += test4(1,9);
-  main_result += test5(7);
-  return main_result;
-  // DexLabel('main_end')
-}
-// DexExpectWatchValue('main_result', 0, 7, 11, 21, 26, 33, from_line=ref('main_start'), to_line=ref('main_end'))
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp
deleted file mode 100644
index 6aebd502614fea..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/optnone-struct-and-methods.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// RUN: %clang++ -std=gnu++11 -O2 -g %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -v -- %s
-// RUN: %clang++ -std=gnu++11 -O0 -g %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -- %s
-
-// REQUIRES: lldb
-// Currently getting intermittent failures on darwin.
-// UNSUPPORTED: system-windows, system-darwin
-
-//// Check that the debugging experience with __attribute__((optnone)) at O2
-//// matches O0. Test simple structs and methods.
-
-long a_global_ptr[] = { 0xCAFEBABEL, 0xFEEDBEEFL };
-
-namespace {
-
-struct A {
-  int a;
-  float b;
-
-  enum B {
-    A_VALUE = 0x1,
-    B_VALUE = 0x2
-  };
-
-  struct some_data {
-    enum B other_b;
-    enum B other_other_b;
-  };
-
-  struct other_data {
-    union {
-      void *raw_ptr;
-      long  *long_ptr;
-      float *float_ptr;
-    } a;
-    struct some_data b;
-    struct some_data c;
-  };
-private:
-  struct other_data _data;
-
-public:
-  struct other_data *getOtherData() { return &_data; }
-
-  __attribute__((always_inline,nodebug))
-  void setSomeData1(A::B value, A::B other_value) {
-    struct other_data *data = getOtherData();
-    data->b.other_b = value;
-    data->b.other_other_b = other_value;
-  }
-
-  __attribute__((always_inline))
-  void setSomeData2(A::B value, A::B other_value) {
-    struct other_data *data = getOtherData();
-    data->c.other_b = value;
-    data->c.other_other_b = other_value;
-  }
-
-  void setOtherData() {
-    setSomeData2(A_VALUE, B_VALUE);
-    getOtherData()->a.long_ptr = &a_global_ptr[0];
-  }
-
-  __attribute__((optnone))
-  A() {
-    __builtin_memset(this, 0xFF, sizeof(*this));
-  } //DexLabel('break_0')
-  // DexExpectWatchValue('a', '-1', on_line=ref('break_0'))
-  //// Check b is NaN by comparing it to itself.
-  // DexExpectWatchValue('this->b == this->b', 'false', on_line=ref('break_0'))
-  // DexExpectWatchValue('_data.a.raw_ptr == -1', 'true', on_line=ref('break_0'))
-  // DexExpectWatchValue('_data.a.float_ptr == -1', 'true', on_line=ref('break_0'))
-  // DexExpectWatchValue('_data.a.float_ptr == -1', 'true', on_line=ref('break_0'))
-  // DexExpectWatchValue('a_global_ptr[0]', 0xcafebabe, on_line=ref('break_0'))
-  // DexExpectWatchValue('a_global_ptr[1]', 0xfeedbeef, on_line=ref('break_0'))
-
-  __attribute__((optnone))
-  ~A() {
-    *getOtherData()->a.long_ptr = 0xADDF00DL;
-  } //DexLabel('break_1')
-  // DexExpectWatchValue('_data.a.raw_ptr == a_global_ptr', 'true', on_line=ref('break_1'))
-  // DexExpectWatchValue('a_global_ptr[0]', 0xaddf00d, on_line=ref('break_1'))
-
-  __attribute__((optnone))
-  long getData() {
-    setSomeData1(B_VALUE, A_VALUE);
-    setOtherData();
-    return getOtherData()->a.long_ptr[1]; //DexLabel('break_2')
-  }
-  // DexExpectWatchValue('_data.b.other_b', 'B_VALUE', on_line=ref('break_2'))
-  // DexExpectWatchValue('_data.b.other_other_b', 'A_VALUE', on_line=ref('break_2'))
-};
-
-} // anonymous namespace
-
-int main() {
-  int result = 0;
-  {
-    A a;
-    result = a.getData();
-  }
-  return result;
-}
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/optnone-vectors-and-functions.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/optnone-vectors-and-functions.cpp
deleted file mode 100644
index 5c4cfc0b9c432d..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/optnone-vectors-and-functions.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-// RUN: %clang++ -std=gnu++11 -O2 -g %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -v -- %s
-// RUN: %clang++ -std=gnu++11 -O0 -g %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t --debugger 'lldb' -- %s
-
-// REQUIRES: lldb
-// Currently getting intermittent failures on darwin.
-// UNSUPPORTED: system-windows, system-darwin
-
-//// Check that the debugging experience with __attribute__((optnone)) at O2
-//// matches O0. Test simple template functions performing simple arithmetic
-//// vector operations and trivial loops.
-
-typedef int int4 __attribute__((ext_vector_type(4)));
-template<typename T> struct TypeTraits {};
-
-template<>
-struct TypeTraits<int4> {
-  static const unsigned NumElements = 4;
-  static const unsigned UnusedField = 0xDEADBEEFU;
-  static unsigned MysteryNumber;
-};
-unsigned TypeTraits<int4>::MysteryNumber = 3U;
-
-template<typename T>
-__attribute__((optnone))
-T test1(T x, T y) {
-  T tmp = x + y; // DexLabel('break_0')
-  T tmp2 = tmp + y;
-  return tmp; // DexLabel('break_1')
-}
-// DexLimitSteps('1', '1', from_line=ref('break_0'), to_line=ref('break_1'))
-//// FIXME: gdb can print this but lldb cannot. Perhaps PR42920?
-//     \DexExpectWatchValue('TypeTraits<int __attribute__((ext_vector_type(4)))>::NumElements', 4, on_line=ref('break_0'))
-//     \DexExpectWatchValue('TypeTraits<int __attribute__((ext_vector_type(4)))>::UnusedField', 0xdeadbeef, on_line=ref('break_0'))
-//   DexExpectWatchValue('x[0]', 1, on_line=ref('break_0'))
-//   DexExpectWatchValue('x[1]', 2, on_line=ref('break_0'))
-//   DexExpectWatchValue('x[2]', 3, on_line=ref('break_0'))
-//   DexExpectWatchValue('x[3]', 4, on_line=ref('break_0'))
-//   DexExpectWatchValue('y[0]', 5, on_line=ref('break_0'))
-//   DexExpectWatchValue('y[1]', 6, on_line=ref('break_0'))
-//   DexExpectWatchValue('y[2]', 7, on_line=ref('break_0'))
-//   DexExpectWatchValue('y[3]', 8, on_line=ref('break_0'))
-//   DexExpectWatchValue('tmp[0]', 6, on_line=ref('break_1'))
-//   DexExpectWatchValue('tmp[1]', 8, on_line=ref('break_1'))
-//   DexExpectWatchValue('tmp[2]', 10, on_line=ref('break_1'))
-//   DexExpectWatchValue('tmp[3]', 12, on_line=ref('break_1'))
-//   DexExpectWatchValue('tmp2[0]', 11, on_line=ref('break_1'))
-//   DexExpectWatchValue('tmp2[1]', 14, on_line=ref('break_1'))
-//   DexExpectWatchValue('tmp2[2]', 17, on_line=ref('break_1'))
-//   DexExpectWatchValue('tmp2[3]', 20, on_line=ref('break_1'))
-
-template<typename T>
-__attribute__((optnone))
-T test2(T x, T y) {
-  T tmp = x;
-  int break_2 = 0; // DexLabel('break_2')
-  for (unsigned i = 0; i != TypeTraits<T>::NumElements; ++i) {
-    tmp <<= 1; // DexLabel('break_3')
-    tmp |= y;
-  }
-
-  tmp[0] >>= TypeTraits<T>::MysteryNumber;
-  return tmp; // DexLabel('break_5')
-}
-// DexLimitSteps('1', '1', on_line=ref('break_2'))
-//   DexExpectWatchValue('x[0]', 6, on_line=ref('break_2'))
-//   DexExpectWatchValue('x[1]', 8, on_line=ref('break_2'))
-//   DexExpectWatchValue('x[2]', 10, on_line=ref('break_2'))
-//   DexExpectWatchValue('x[3]', 12, on_line=ref('break_2'))
-//   DexExpectWatchValue('y[0]', 5, on_line=ref('break_2'))
-//   DexExpectWatchValue('y[1]', 6, on_line=ref('break_2'))
-//   DexExpectWatchValue('y[2]', 7, on_line=ref('break_2'))
-//   DexExpectWatchValue('y[3]', 8, on_line=ref('break_2'))
-//   DexExpectWatchValue('tmp[0]', 6, on_line=ref('break_2'))
-//   DexExpectWatchValue('tmp[1]', 8, on_line=ref('break_2'))
-//   DexExpectWatchValue('tmp[2]', 10, on_line=ref('break_2'))
-//   DexExpectWatchValue('tmp[3]', 12, on_line=ref('break_2'))
-// DexLimitSteps('i', 3, from_line=ref('break_3'), to_line=ref('break_5'))
-//   DexExpectWatchValue('tmp[0]', 63, on_line=ref('break_3'))
-//   DexExpectWatchValue('tmp[1]', 94, on_line=ref('break_3'))
-//   DexExpectWatchValue('tmp[2]', 95, on_line=ref('break_3'))
-//   DexExpectWatchValue('tmp[3]', 120, on_line=ref('break_3'))
-//   DexExpectWatchValue('tmp[0]', 15, on_line=ref('break_5'))
-
-template<typename T>
-__attribute__((optnone))
-T test3(T InVec) {
-  T result;
-  for (unsigned i=0; i != TypeTraits<T>::NumElements; ++i)
-    result[i] = InVec[i]; // DexLabel('break_6')
-  return result; // DexLabel('break_7')
-}
-// DexLimitSteps('i', '3', from_line=ref('break_6'), to_line=ref('break_7'))
-//   DexExpectWatchValue('InVec[0]', 15, from_line=ref('break_6'), to_line=ref('break_7'))
-//   DexExpectWatchValue('InVec[1]', 190, from_line=ref('break_6'), to_line=ref('break_7'))
-//   DexExpectWatchValue('InVec[2]', 191, from_line=ref('break_6'), to_line=ref('break_7'))
-//   DexExpectWatchValue('InVec[3]', 248, from_line=ref('break_6'), to_line=ref('break_7'))
-//   DexExpectWatchValue('result[0]', 15, from_line=ref('break_6'), to_line=ref('break_7'))
-//   DexExpectWatchValue('result[1]', 190, from_line=ref('break_6'), to_line=ref('break_7'))
-//   DexExpectWatchValue('result[2]', 191, from_line=ref('break_6'), to_line=ref('break_7'))
-//   DexExpectWatchValue('result[3]', 248, on_line=ref('break_7'))
-
-template<typename T>
-__attribute__((optnone))
-T test4(T x, T y) {
-  for (unsigned i=0; i != TypeTraits<T>::NumElements; ++i)
-    x[i] = (x[i] > y[i])? x[i] : y[i] + TypeTraits<T>::MysteryNumber; // DexLabel('break_11')
-  return x; // DexLabel('break_12')
-}
-// DexLimitSteps('1', '1', from_line=ref('break_11'), to_line=ref('break_12'))
-//// FIXME: lldb won't print this but gdb unexpectedly says it's optimized out, even at O0.
-//     \DexExpectWatchValue('TypeTraits<int __attribute__((ext_vector_type(4)))>::MysteryNumber', 3, on_line=ref('break_11'))
-//   DexExpectWatchValue('i', 0, 1, 2, 3, on_line=ref('break_11'))
-//   DexExpectWatchValue('x[0]', 1, 8, from_line=ref('break_11'), to_line=ref('break_12'))
-//   DexExpectWatchValue('x[1]', 2, 9, from_line=ref('break_11'), to_line=ref('break_12'))
-//   DexExpectWatchValue('x[2]', 3, 10, from_line=ref('break_11'), to_line=ref('break_12'))
-//   DexExpectWatchValue('x[3]', 4, 11, from_line=ref('break_11'), to_line=ref('break_12'))
-//   DexExpectWatchValue('y[0]', 5, from_line=ref('break_11'), to_line=ref('break_12'))
-//   DexExpectWatchValue('y[1]', 6, from_line=ref('break_11'), to_line=ref('break_12'))
-//   DexExpectWatchValue('y[2]', 7, from_line=ref('break_11'), to_line=ref('break_12'))
-//   DexExpectWatchValue('y[3]', 8, from_line=ref('break_11'), to_line=ref('break_12'))
-
-int main() {
-  int4 a = (int4){1,2,3,4};
-  int4 b = (int4){5,6,7,8};
-
-  int4 tmp = test1(a,b);
-  tmp = test2(tmp,b);
-  tmp = test3(tmp);
-  tmp += test4(a,b);
-  return tmp[0];
-}
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/realigned-frame.cpp b/cross-project-tests/debuginfo-tests/dexter-tests/realigned-frame.cpp
deleted file mode 100644
index 24583cc968b6e2..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/realigned-frame.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-// REQUIRES: system-windows
-//
-// RUN: %clang_cl /Z7 /Zi %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'dbgeng' -- %s
-
-// From https://llvm.org/pr38857, where we had issues with stack realignment.
-
-struct Foo {
-  int x = 42;
-  int __declspec(noinline) foo();
-  void __declspec(noinline) bar(int *a, int *b, double *c);
-};
-int Foo::foo() {
-  int a = 1;
-  int b = 2;
-  double __declspec(align(32)) force_alignment = 0.42;
-  bar(&a, &b, &force_alignment); // DexLabel('in_foo')
-  x += (int)force_alignment;
-  return x;
-}
-void Foo::bar(int *a, int *b, double *c) {
-  *c += *a + *b; // DexLabel('in_bar')
-}
-int main() {
-  Foo o;
-  o.foo();
-}
-/*
-DexExpectProgramState({'frames':[
-    {'function': 'Foo::bar', 'location' : {'lineno' : ref('in_bar')} },
-    {'function': 'Foo::foo',
-     'watches' : {
-       'a' : '1',
-       'b' : '2',
-       'force_alignment' : '0.42'
-     }
-    }
-]})
-*/
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/stack-var.c b/cross-project-tests/debuginfo-tests/dexter-tests/stack-var.c
deleted file mode 100644
index 7e3c4b5d0ce1b9..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/stack-var.c
+++ /dev/null
@@ -1,17 +0,0 @@
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-//
-// RUN: %clang -std=gnu11 -O -glldb %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'lldb' -- %s
-
-void __attribute__((noinline, optnone)) bar(int *test) {}
-int main() {
-  int test;
-  test = 23;
-  bar(&test); // DexLabel('before_bar')
-  return test; // DexLabel('after_bar')
-}
-
-// DexExpectWatchValue('test', '23', on_line=ref('before_bar'))
-// DexExpectWatchValue('test', '23', on_line=ref('after_bar'))
-
diff --git a/cross-project-tests/debuginfo-tests/dexter-tests/vla.c b/cross-project-tests/debuginfo-tests/dexter-tests/vla.c
deleted file mode 100644
index ff5297f890e7a0..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter-tests/vla.c
+++ /dev/null
@@ -1,23 +0,0 @@
-// This test case verifies the debug location for variable-length arrays.
-// REQUIRES: lldb
-// UNSUPPORTED: system-windows
-//
-// RUN: %clang -std=gnu11 -O0 -glldb %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'lldb' -- %s
-
-void init_vla(int size) {
-  int i;
-  int vla[size];
-  for (i = 0; i < size; i++)
-    vla[i] = size-i;
-  vla[0] = size; // DexLabel('end_init')
-}
-
-int main(int argc, const char **argv) {
-  init_vla(23);
-  return 0;
-}
-
-// DexExpectWatchValue('vla[0]', '23', on_line=ref('end_init'))
-// DexExpectWatchValue('vla[1]', '22', on_line=ref('end_init'))
-
diff --git a/cross-project-tests/debuginfo-tests/dexter/.gitignore b/cross-project-tests/debuginfo-tests/dexter/.gitignore
deleted file mode 100644
index 042c4e06976278..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/build/
-/results/
-
diff --git a/cross-project-tests/debuginfo-tests/dexter/Commands.md b/cross-project-tests/debuginfo-tests/dexter/Commands.md
deleted file mode 100644
index a98261a5000949..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/Commands.md
+++ /dev/null
@@ -1,379 +0,0 @@
-# Dexter commands
-
-* [DexExpectProgramState](Commands.md#DexExpectProgramState)
-* [DexExpectStepKind](Commands.md#DexExpectStepKind)
-* [DexExpectStepOrder](Commands.md#DexExpectStepOrder)
-* [DexExpectWatchType](Commands.md#DexExpectWatchType)
-* [DexExpectWatchValue](Commands.md#DexExpectWatchValue)
-* [DexUnreachable](Commands.md#DexUnreachable)
-* [DexLimitSteps](Commands.md#DexLimitSteps)
-* [DexLabel](Commands.md#DexLabel)
-* [DexWatch](Commands.md#DexWatch)
-* [DexDeclareAddress](Commands.md#DexDeclareAddress)
-* [DexDeclareFile](Commands.md#DexDeclareFile)
-* [DexFinishTest](Commands.md#DexFinishTest)
-* [DexCommandLine](Commands.md#DexCommandLine)
-
----
-## DexExpectProgramState
-    DexExpectProgramState(state [,**times])
-
-    Args:
-        state (dict): { 'frames': [
-                        {
-                          # StackFrame #
-                          'function': name (str),
-                          'is_inlined': bool,
-                          'location': {
-                            # SourceLocation #
-                            'lineno': int,
-                            'path': str,
-                            'column': int,
-                          },
-                          'watches': {
-                            expr (str): value (str),
-                            expr (str): {
-                              'value': str,
-                              'type_name': str,
-                              'could_evaluate': bool,
-                              'is_optimized_away': bool,
-                              'is_irretrievable': bool,
-			    }
-                          },
-                        }
-                      ]}
-
-    Keyword args:
-        times (int): Minimum number of times this state pattern is expected to
-             be seen. Defaults to 1. Can be 0.
-
-### Description
-Expect to see a given program `state` a certain number of `times`.
-
-For every debugger step the reported state is compared with the expected state.
-To consider the states a match:
-
-* The `SourceLocation` must match in both states. Omitted fields in the
-`SourceLocation` dictionary are ignored; they always match.
-* Each `expr` in `watches` in the expected state can either be a dictionary
-with the fields shown above, or a string representing its value. In either
-case, the actual value of `expr` in the debugger must match.
-* The function name and inline status are not considered.
-
-### Heuristic
-[TODO]
-
-
----
-## DexExpectStepKind
-    DexExpectStepKind(kind, times)
-
-    Args:
-      kind (str): Expected step kind.
-      times (int): Expected number of encounters.
-
-### Description
-Expect to see a particular step `kind` a number of `times` while stepping
-through the program.
-
-`kind` must be one of:
-
-`FUNC`: The first step into a function which is defined in the test
-directory.</br>
-`FUNC_EXTERNAL`: A step over a function which is not defined in the test
-directory.</br>
-`FUNC_UNKNOWN`: The first step over a function an unknown definition
-location.</br>
-`VERTICAL_FORWARD`: A step onto a line after the previous step line in this
-frame.</br>
-`VERTICAL_BACKWARD`: A step onto a line before the previous step line in
-this frame.</br>
-`HORIZONTAL_FORWARD`: A step forward on the same line as the previous step in
-this frame.</br>
-`HORIZONTAL_BACKWARD`: A step backward on the same line as the previous step
-in this frame.</br>
-`SAME`: A step onto the same line and column as the previous step in this
-frame.</br>
-
-### Heuristic
-[TODO]
-
-
----
-## DexExpectStepOrder
-    DexExpectStepOrder(*order [,**on_line])
-
-    Arg list:
-      order (int): One or more indices.
-
-    Keyword args:
-        on_line (int): Expect this line to be stepped on in the order given.
-
-### Description
-Expect the line every `DexExpectStepOrder` is found on, or given from `on_line`, to be stepped on in
-`order`. Each instance must have a set of unique ascending indices.
-
-### Heuristic
-[TODO]
-
-
----
-## DexExpectWatchType
-    DexExpectWatchType(expr, *types [,**from_line=1][,**to_line=Max]
-                        [,**on_line][,**require_in_order=True])
-
-    Args:
-        expr (str): expression to evaluate.
-
-    Arg list:
-        types (str): At least one expected type. NOTE: string type.
-
-    Keyword args:
-        from_line (int): Evaluate the expression from this line. Defaults to 1.
-        to_line (int): Evaluate the expression to this line. Defaults to end of
-            source.
-        on_line (int): Only evaluate the expression on this line. If provided,
-            this overrides from_line and to_line.
-        require_in_order (bool): If False the values can appear in any order.
-
-### Description
-Expect the expression `expr` to evaluate be evaluated and have each evaluation's
-type checked against the list of `types`
-
-### Heuristic
-[TODO]
-
-
----
-## DexExpectWatchValue
-    DexExpectWatchValue(expr, *values [,**from_line=1][,**to_line=Max]
-                        [,**on_line][,**require_in_order=True][,**float_range])
-
-    Args:
-        expr (str): expression to evaluate.
-
-    Arg list:
-        values (str): At least one expected value. NOTE: string type.
-
-    Keyword args:
-        from_line (int): Evaluate the expression from this line. Defaults to 1.
-        to_line (int): Evaluate the expression to this line. Defaults to end of
-            source.
-        on_line (int): Only evaluate the expression on this line. If provided,
-            this overrides from_line and to_line.
-        require_in_order (bool): If False the values can appear in any order.
-        float_range (float): If provided, `values` must be floats, and will
-            match an actual value if they are within `float_range` of each other.
-
-
-### Description
-Expect the expression `expr` to evaluate to the list of `values`
-sequentially.
-
-### Heuristic
-[TODO]
-
-
----
-## DexUnreachable
-    DexUnreachable([, **from_line=1][,**to_line=Max][,**on_line])
-
-### Description
-Expect the source line this is found on will never be stepped on to. If either
-'on_line' or both 'from_line' and 'to_line' are specified, checks that the
-specified line(s) are not stepped on.
-
-### Heuristic
-[TODO]
-
-
-----
-## DexLimitSteps
-    DexLimitSteps([expr, *values][, **from_line=1][,**to_line=Max]
-                  [,**on_line][,**hit_count])
-
-    Args:
-        expr (str): variable or value to compare.
-
-    Arg list:
-        values (str): At least one potential value the expr may evaluate to.
-
-    Keyword args:
-        from_line (int): Define the start of the limited step range.
-        to_line (int): Define the end of the limited step range.
-        on_line (int): Define a range with length 1 starting and ending on the
-                       same line.
-        hit_count (int): If provided, limit the number of times the command
-                         triggers.
-
-### Description
-Define a limited stepping range that may be predicated on a condition. When the
-leading line is stepped on and any condition '(expr) == (values[n])' is true or
-there are no conditions, set a range of temporary breakpoints within the test
-file defined by the range 'from_line' and 'to_line' or 'on_line'. This only
-happens 'hit_count' number of times if the argument is provided.
-
-The condition is only evaluated on the line 'from_line' or 'on_line'. If the
-condition is not true at the start of the range, or that line is never stepped
-onto, the whole range is ignored.
-
-DexLimitSteps commands are useful for reducing the amount of steps gathered in
-large test cases that would normally take much longer to complete.
-
-----
-## DexLabel
-    DexLabel(name [, **on_line])
-
-    Args:
-        name (str): A unique name for this line.
-
-    Keyword args:
-        on_line (int): Specify a line number to label.
-
-### Description
-Name the line this command is found on or 'on_line' if it is provided. Line
-names can be converted to line numbers with the `ref(str)` function. For
-example, `DexExpectWatchValues(..., on_line=ref('my_line_name'))`. Use
-arithmetic operators to get offsets from labels:
-
-    DexExpectWatchValues(..., on_line=ref('my_line_name') + 3)
-    DexExpectWatchValues(..., on_line=ref('my_line_name') - 5)
-
-
-### Heuristic
-This command does not contribute to the heuristic score.
-
-----
-## DexDeclareAddress
-    DexDeclareAddress(declared_address, expr, **on_line[, **hit_count])
-
-    Args:
-        declared_address (str): The unique name of an address, which can be used
-                                in DexExpectWatch-commands.
-        expr (str): An expression to evaluate to provide the value of this
-                    address.
-        on_line (int): The line at which the value of the expression will be
-                       assigned to the address.
-        hit_count (int): If provided, reads the value of the source expression
-                         after the line has been stepped onto the given number
-                         of times ('hit_count = 0' gives default behaviour).
-
-### Description
-Declares a variable that can be used in DexExpectWatch- commands as an expected
-value by using the `address(str[, int])` function. This is primarily
-useful for checking the values of pointer variables, which are generally
-determined at run-time (and so cannot be consistently matched by a hard-coded
-expected value), but may be consistent relative to each other. An example use of
-this command is as follows, using a set of pointer variables "foo", "bar", and
-"baz":
-
-    DexDeclareAddress('my_addr', 'bar', on_line=12)
-    DexExpectWatchValue('foo', address('my_addr'), on_line=10)
-    DexExpectWatchValue('bar', address('my_addr'), on_line=12)
-    DexExpectWatchValue('baz', address('my_addr', 16), on_line=14)
-
-On the first line, we declare the name of our variable 'my_addr'. This name must
-be unique (the same name cannot be declared twice), and attempting to reference
-an undeclared variable with `address` will fail. The value of the address
-variable will be assigned as the value of 'bar' when line 12 is first stepped
-on.
-
-On lines 2-4, we use the `address` function to refer to our variable. The first
-usage occurs on line 10, before the line where 'my_addr' is assigned its value;
-this is a valid use, as we assign the address value and check for correctness
-after gathering all debug information for the test. Thus the first test command
-will pass if 'foo' on line 10 has the same value as 'bar' on line 12.
-
-The second command will pass iff 'bar' is available at line 12 - even if the
-variable and lines are identical in DexDeclareAddress and DexExpectWatchValue,
-the latter will still expect a valid value. Similarly, if the variable for a
-DexDeclareAddress command is not available at the given line, any test against
-that address will fail.
-
-The `address` function also accepts an optional integer argument representing an
-offset (which may be negative) to be applied to the address value, so
-`address('my_addr', 16)` resolves to `my_addr + 16`. In the above example, this
-means that we expect `baz == bar + 16`.
-
-### Heuristic
-This command does not contribute to the heuristic score.
-
-----
-## DexDeclareFile
-    DexDeclareFile(declared_file)
-
-    Args:
-        name (str): A declared file path for which all subsequent commands
-          will have their path attribute set too.
-
-### Description
-Set the path attribute of all commands from this point in the test onwards.
-The new path holds until the end of the test file or until a new DexDeclareFile
-command is encountered. Used in conjunction with .dex files, DexDeclareFile can
-be used to write your dexter commands in a separate test file avoiding inlined
-Dexter commands mixed with test source.
-
-### Heuristic
-This command does not contribute to the heuristic score.
-
-----
-## DexFinishTest
-    DexFinishTest([expr, *values], **on_line[, **hit_count=0])
-
-    Args:
-        expr (str): variable or value to compare.
-
-    Arg list:
-        values (str): At least one potential value the expr may evaluate to.
-
-    Keyword args:
-        on_line (int): Define the line on which this command will be triggered.
-        hit_count (int): If provided, triggers this command only after the line
-                         and condition have been hit the given number of times.
-
-### Description
-Defines a point at which Dexter will exit out of the debugger without waiting
-for the program to finish. This is primarily useful for testing a program that
-either does not automatically terminate or would otherwise continue for a long
-time after all test commands have finished.
-
-The command will trigger when the line 'on_line' is stepped on and either the
-condition '(expr) == (values[n])' is true or there are no conditions. If the
-optional argument 'hit_count' is provided, then the command will not trigger
-for the first 'hit_count' times the line and condition are hit.
-
-### Heuristic
-This command does not contribute to the heuristic score.
-
-----
-## DexCommandLine
-    DexCommandLine(command_line)
-
-    Args:
-        command_line (list): List of strings that form the command line.
-
-### Description
-Specifies the command line with which to launch the test. The arguments will
-be appended to the default command line, i.e. the path to the compiled binary,
-and will be passed to the program under test.
-
-This command does not contribute to any part of the debug experience testing or
-runtime instrumentation -- it's only for communicating arguments to the program
-under test.
-
-### Heuristic
-This command does not contribute to the heuristic score.
-
----
-## DexWatch
-    DexWatch(*expressions)
-
-    Arg list:
-        expressions (str): `expression` to evaluate on this line.
-
-### Description
-[Deprecated] Evaluate each given `expression` when the debugger steps onto the
-line this command is found on.
-
-### Heuristic
-[Deprecated]
diff --git a/cross-project-tests/debuginfo-tests/dexter/LICENSE.txt b/cross-project-tests/debuginfo-tests/dexter/LICENSE.txt
deleted file mode 100644
index fa6ac540007032..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/LICENSE.txt
+++ /dev/null
@@ -1,279 +0,0 @@
-==============================================================================
-The LLVM Project is under the Apache License v2.0 with LLVM Exceptions:
-==============================================================================
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-    TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-    1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-    2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-    3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-    4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-    5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-    6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-    7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-    8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-    9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-    END OF TERMS AND CONDITIONS
-
-    APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-    Copyright [yyyy] [name of copyright owner]
-
-    Licensed under the Apache License, Version 2.0 (the "License");
-    you may not use this file except in compliance with the License.
-    You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
-
----- LLVM Exceptions to the Apache 2.0 License ----
-
-As an exception, if, as a result of your compiling your source code, portions
-of this Software are embedded into an Object form of such source code, you
-may redistribute such embedded portions in such Object form without complying
-with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
-
-In addition, if you combine or link compiled forms of this Software with
-software that is licensed under the GPLv2 ("Combined Software") and if a
-court of competent jurisdiction determines that the patent provision (Section
-3), the indemnity provision (Section 9) or other Section of the License
-conflicts with the conditions of the GPLv2, you may retroactively and
-prospectively choose to deem waived or otherwise exclude such Section(s) of
-the License, but only in their entirety and only with respect to the Combined
-Software.
-
-==============================================================================
-Software from third parties included in the LLVM Project:
-==============================================================================
-The LLVM Project contains third party software which is under different license
-terms. All such code will be identified clearly using at least one of two
-mechanisms:
-1) It will be in a separate directory tree with its own `LICENSE.txt` or
-   `LICENSE` file at the top containing the specific license and restrictions
-   which apply to that software, or
-2) It will contain specific license and restriction terms at the top of every
-   file.
-
-==============================================================================
-Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy):
-==============================================================================
-University of Illinois/NCSA
-Open Source License
-
-Copyright (c) 2003-2019 University of Illinois at Urbana-Champaign.
-All rights reserved.
-
-Developed by:
-
-    LLVM Team
-
-    University of Illinois at Urbana-Champaign
-
-    http://llvm.org
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal with
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimers.
-
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimers in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the names of the LLVM Team, University of Illinois at
-      Urbana-Champaign, nor the names of its contributors may be used to
-      endorse or promote products derived from this Software without specific
-      prior written permission.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
-SOFTWARE.
-
diff --git a/cross-project-tests/debuginfo-tests/dexter/README.md b/cross-project-tests/debuginfo-tests/dexter/README.md
deleted file mode 100644
index 44c43435b20d58..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/README.md
+++ /dev/null
@@ -1,260 +0,0 @@
-# DExTer (Debugging Experience Tester)
-
-## Introduction
-
-DExTer is a suite of tools used to evaluate the "User Debugging Experience". DExTer drives an external debugger, running on small test programs, and collects information on the behavior at each debugger step to provide quantitative values that indicate the quality of the debugging experience.
-
-## Supported Debuggers
-
-DExTer currently supports the Visual Studio 2015 and Visual Studio 2017 debuggers via the [DTE interface](https://docs.microsoft.com/en-us/dotnet/api/envdte.dte), and LLDB via its [Python interface](https://lldb.llvm.org/python-reference.html). GDB is not currently supported.
-
-The following command evaluates your environment, listing the available and compatible debuggers:
-
-    dexter.py list-debuggers
-
-## Dependencies
-[TODO] Add a requirements.txt or an install.py and document it here.
-
-### Python 3.6
-
-DExTer requires python version 3.6 or greater.
-
-### pywin32 python package
-
-This is required to access the DTE interface for the Visual Studio debuggers.
-
-    <python-executable> -m pip install pywin32
-
-### clang
-
-DExTer is current compatible with 'clang' and 'clang-cl' compiler drivers.  The compiler must be available for DExTer, for example the following command should successfully build a runnable executable.
-
-     <compiler-executable> tests/nostdlib/fibonacci/test.cpp
-
-## Running a test case
-
-The following commands build fibonacci.cpp from the tests/nostdlib directory and run it in LLDB, reporting the debug experience heuristic. The first pair of commands build with no optimizations (-O0) and score 1.0000.  The second pair of commands build with optimizations (-O2) and score 0.2832 which suggests a worse debugging experience.
-
-    clang -O0 -g tests/nostdlib/fibonacci.cpp -o tests/nostdlib/fibonacci/test
-    dexter.py test --binary tests/nostdlib/fibonacci/test --debugger lldb -- tests/nostdlib/fibonacci/test.cpp
-    test.cpp = (1.0000)
-
-    clang -O2 -g tests/nostdlib/fibonacci/test.cpp -o tests/nostdlib/fibonacci/test
-    dexter.py test --binary tests/nostdlib/fibonacci/test --debugger lldb -- tests/nostdlib/fibonacci/test.cpp
-    test.cpp = (0.2832)
-
-## An example test case
-
-The sample test case (tests/nostdlib/fibonacci) looks like this:
-
-    1.  #ifdef _MSC_VER
-    2.  # define DEX_NOINLINE __declspec(noinline)
-    3.  #else
-    4.  # define DEX_NOINLINE __attribute__((__noinline__))
-    5.  #endif
-    6.
-    7.  DEX_NOINLINE
-    8.  void Fibonacci(int terms, int& total)
-    9.  {
-    0.      int first = 0;
-    11.     int second = 1;
-    12.     for (int i = 0; i < terms; ++i)
-    13.     {
-    14.         int next = first + second; // DexLabel('start')
-    15.         total += first;
-    16.         first = second;
-    17.         second = next;             // DexLabel('end')
-    18.     }
-    19. }
-    20.
-    21. int main()
-    22. {
-    23.     int total = 0;
-    24.     Fibonacci(5, total);
-    25.     return total;
-    26. }
-    27.
-    28. /*
-    29. DexExpectWatchValue('i', '0', '1', '2', '3', '4',
-    30.                     from_line='start', to_line='end')
-    31. DexExpectWatchValue('first', '0', '1', '2', '3', '5',
-    32.                     from_line='start', to_line='end')
-    33. DexExpectWatchValue('second', '1', '2', '3', '5',
-    34                      from_line='start', to_line='end')
-    35. DexExpectWatchValue('total', '0', '1', '2', '4', '7',
-    36.                     from_line='start', to_line='end')
-    37. DexExpectWatchValue('next', '1', '2', '3', '5', '8',
-    38.                     from_line='start', to_line='end')
-    39. DexExpectWatchValue('total', '7', on_line=25)
-    40. DexExpectStepKind('FUNC_EXTERNAL', 0)
-    41. */
-
-[DexLabel][1] is used to give a name to a line number.
-
-The [DexExpectWatchValue][2] command states that an expression, e.g. `i`, should
-have particular values, `'0', '1', '2', '3','4'`, sequentially over the program
-lifetime on particular lines. You can refer to a named line or simply the line
-number (See line 39).
-
-At the end of the test is the following line:
-
-    DexExpectStepKind('FUNC_EXTERNAL', 0)
-
-This [DexExpectStepKind][3] command indicates that we do not expect the debugger
-to step into a file outside of the test directory.
-
-[1]: Commands.md#DexLabel
-[2]: Commands.md#DexExpectWatchValue
-[3]: Commands.md#DexExpectStepKind
-
-## Detailed DExTer reports
-
-Running the command below launches the tests/nostdlib/fibonacci test case in DExTer, using LLDB as the debugger and producing a detailed report:
-
-    $ dexter.py test --vs-solution clang-cl_vs2015 --debugger vs2017 --cflags="/Ox /Zi" --ldflags="/Zi" -v -- tests/nostdlib/fibonacci
-
-The detailed report is enabled by `-v` and shows a breakdown of the information from each debugger step. For example:
-
-    fibonacci = (0.2832)
-
-    ## BEGIN ##
-    [1, "main", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 23, 1, "BREAKPOINT", "FUNC", {}]
-    [2, "main", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 24, 1, "BREAKPOINT", "VERTICAL_FORWARD", {}]
-    [3, "main", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 25, 1, "BREAKPOINT", "VERTICAL_FORWARD", {}]
-    .   [4, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 13, 1, "BREAKPOINT", "FUNC", {}]
-    .   [5, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 16, 1, "BREAKPOINT", "VERTICAL_FORWARD", {"i": "Variable is optimized away and not available.", "next": "Variable is optimized away and not available.", "second": "Variable is optimized away and not available.", "total": "0", "first": "Variable is optimized away and not available."}]
-    .   [6, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 13, 1, "BREAKPOINT", "VERTICAL_BACKWARD", {}]
-    .   [7, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 15, 1, "BREAKPOINT", "VERTICAL_FORWARD", {"i": "Variable is optimized away and not available.", "second": "Variable is optimized away and not available.", "total": "0", "first": "Variable is optimized away and not available."}]
-    .   [8, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 16, 1, "BREAKPOINT", "VERTICAL_FORWARD", {"i": "Variable is optimized away and not available.", "next": "Variable is optimized away and not available.", "second": "Variable is optimized away and not available.", "total": "0", "first": "Variable is optimized away and not available."}]
-    .   [9, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 15, 1, "BREAKPOINT", "VERTICAL_BACKWARD", {"i": "Variable is optimized away and not available.", "second": "1", "total": "0", "first": "0"}]
-    .   [10, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 13, 1, "BREAKPOINT", "VERTICAL_BACKWARD", {}]
-    .   [11, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 16, 1, "BREAKPOINT", "VERTICAL_FORWARD", {"i": "Variable is optimized away and not available.", "next": "Variable is optimized away and not available.", "second": "Variable is optimized away and not available.", "total": "0", "first": "Variable is optimized away and not available."}]
-    .   [12, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 15, 1, "BREAKPOINT", "VERTICAL_BACKWARD", {"i": "Variable is optimized away and not available.", "second": "1", "total": "0", "first": "1"}]
-    .   [13, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 13, 1, "BREAKPOINT", "VERTICAL_BACKWARD", {}]
-    .   [14, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 16, 1, "BREAKPOINT", "VERTICAL_FORWARD", {"i": "Variable is optimized away and not available.", "next": "Variable is optimized away and not available.", "second": "Variable is optimized away and not available.", "total": "0", "first": "Variable is optimized away and not available."}]
-    .   [15, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 15, 1, "BREAKPOINT", "VERTICAL_BACKWARD", {"i": "Variable is optimized away and not available.", "second": "2", "total": "0", "first": "1"}]
-    .   [16, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 13, 1, "BREAKPOINT", "VERTICAL_BACKWARD", {}]
-    .   [17, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 16, 1, "BREAKPOINT", "VERTICAL_FORWARD", {"i": "Variable is optimized away and not available.", "next": "Variable is optimized away and not available.", "second": "Variable is optimized away and not available.", "total": "0", "first": "Variable is optimized away and not available."}]
-    .   [18, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 15, 1, "BREAKPOINT", "VERTICAL_BACKWARD", {"i": "Variable is optimized away and not available.", "second": "3", "total": "0", "first": "2"}]
-    .   [19, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 13, 1, "BREAKPOINT", "VERTICAL_BACKWARD", {}]
-    .   [20, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 16, 1, "BREAKPOINT", "VERTICAL_FORWARD", {"i": "Variable is optimized away and not available.", "next": "Variable is optimized away and not available.", "second": "Variable is optimized away and not available.", "total": "0", "first": "Variable is optimized away and not available."}]
-    .   [21, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 15, 1, "BREAKPOINT", "VERTICAL_BACKWARD", {"i": "Variable is optimized away and not available.", "second": "5", "total": "0", "first": "3"}]
-    .   [22, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 13, 1, "BREAKPOINT", "VERTICAL_BACKWARD", {}]
-    .   [23, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 16, 1, "BREAKPOINT", "VERTICAL_FORWARD", {"i": "Variable is optimized away and not available.", "next": "Variable is optimized away and not available.", "second": "Variable is optimized away and not available.", "total": "0", "first": "Variable is optimized away and not available."}]
-    .   [24, "Fibonacci", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 20, 1, "BREAKPOINT", "VERTICAL_FORWARD", {}]
-    [25, "main", "c:\\dexter\\tests\\nostdlib\\fibonacci\\test.cpp", 26, 1, "BREAKPOINT", "FUNC", {"total": "7"}]
-    ## END (25 steps) ##
-
-
-    step kind differences [0/1]
-        FUNC_EXTERNAL:
-        0
-
-    test.cpp:15-18 [first] [9/21]
-        expected encountered values:
-        0
-        1
-        2
-        3
-
-        missing values:
-        5 [-6]
-
-        result optimized away:
-        step 5 (Variable is optimized away and not available.) [-3]
-        step 7 (Variable is optimized away and not available.)
-        step 8 (Variable is optimized away and not available.)
-        step 11 (Variable is optimized away and not available.)
-        step 14 (Variable is optimized away and not available.)
-        step 17 (Variable is optimized away and not available.)
-        step 20 (Variable is optimized away and not available.)
-        step 23 (Variable is optimized away and not available.)
-
-    test.cpp:15-18 [i] [15/21]
-        result optimized away:
-        step 5 (Variable is optimized away and not available.) [-3]
-        step 7 (Variable is optimized away and not available.) [-3]
-        step 8 (Variable is optimized away and not available.) [-3]
-        step 9 (Variable is optimized away and not available.) [-3]
-        step 11 (Variable is optimized away and not available.) [-3]
-        step 12 (Variable is optimized away and not available.)
-        step 14 (Variable is optimized away and not available.)
-        step 15 (Variable is optimized away and not available.)
-        step 17 (Variable is optimized away and not available.)
-        step 18 (Variable is optimized away and not available.)
-        step 20 (Variable is optimized away and not available.)
-        step 21 (Variable is optimized away and not available.)
-        step 23 (Variable is optimized away and not available.)
-
-    test.cpp:15-18 [second] [21/21]
-        expected encountered values:
-        1
-        2
-        3
-        5
-
-        result optimized away:
-        step 5 (Variable is optimized away and not available.) [-3]
-        step 7 (Variable is optimized away and not available.) [-3]
-        step 8 (Variable is optimized away and not available.) [-3]
-        step 11 (Variable is optimized away and not available.) [-3]
-        step 14 (Variable is optimized away and not available.) [-3]
-        step 17 (Variable is optimized away and not available.) [-3]
-        step 20 (Variable is optimized away and not available.) [-3]
-        step 23 (Variable is optimized away and not available.)
-
-    test.cpp:15-18 [total] [21/21]
-        expected encountered values:
-        0
-
-        missing values:
-        1 [-6]
-        2 [-6]
-        4 [-6]
-        7 [-3]
-
-    test.cpp:16-18 [next] [15/21]
-        result optimized away:
-        step 5 (Variable is optimized away and not available.) [-3]
-        step 8 (Variable is optimized away and not available.) [-3]
-        step 11 (Variable is optimized away and not available.) [-3]
-        step 14 (Variable is optimized away and not available.) [-3]
-        step 17 (Variable is optimized away and not available.) [-3]
-        step 20 (Variable is optimized away and not available.)
-        step 23 (Variable is optimized away and not available.)
-
-    test.cpp:26 [total] [0/7]
-        expected encountered values:
-        7
-
-The first line
-
-    fibonacci =  (0.2832)
-
-shows a score of 0.2832 suggesting that unexpected behavior has been seen.  This score is on scale of 0.0000 to 1.000, with 0.000 being the worst score possible and 1.000 being the best score possible.  The verbose output shows the reason for any scoring.  For example:
-
-    test.cpp:15-18 [first] [9/21]
-        expected encountered values:
-        0
-        1
-        2
-        3
-
-        missing values:
-        5 [-6]
-
-        result optimized away:
-        step 5 (Variable is optimized away and not available.) [-3]
-        step 7 (Variable is optimized away and not available.)
-        step 8 (Variable is optimized away and not available.)
-        step 11 (Variable is optimized away and not available.)
-        step 14 (Variable is optimized away and not available.)
-        step 17 (Variable is optimized away and not available.)
-        step 20 (Variable is optimized away and not available.)
-        step 23 (Variable is optimized away and not available.)
-
-shows that for `first` the expected values 0, 1, 2 and 3 were seen, 5 was not.  On some steps the variable was reported as being optimized away.
-
-## Writing new test cases
-
-Each test can be either embedded within the source file using comments or included as a separate file with the .dex extension. Dexter does not include support for building test cases, although if a Visual Studio Solution (.sln) is used as the test file, VS will build the program as part of launching a debugger session if it has not already been built.
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/__init__.py
deleted file mode 100644
index e79a8b3cad61a2..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-__version__ = "1.0.0"
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/CommandBase.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/CommandBase.py
deleted file mode 100644
index b52544dfbf0787..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/CommandBase.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Base class for all DExTer commands, where a command is a specific Python
-function that can be embedded into a comment in the source code under test
-which will then be executed by DExTer during debugging.
-"""
-
-import abc
-from collections import namedtuple
-from typing import List
-
-StepExpectInfo = namedtuple("StepExpectInfo", "expression, path, frame_idx, line_range")
-
-
-class CommandBase(object, metaclass=abc.ABCMeta):
-    def __init__(self):
-        self.path = None
-        self.lineno = None
-        self.raw_text = ""
-
-    def get_label_args(self):
-        return list()
-
-    def has_labels(self):
-        return False
-
-    @abc.abstractstaticmethod
-    def get_name():
-        """This abstract method is usually implemented in subclasses as:
-        return __class__.__name__
-        """
-
-    def get_watches(self) -> List[str]:
-        return []
-
-    @abc.abstractmethod
-    def eval(self):
-        """Evaluate the command.
-
-        This will be called when constructing a Heuristic object to determine
-        the debug score.
-
-        Returns:
-            The logic for handling the result of CommandBase.eval() must be
-            defined in Heuristic.__init__() so a consitent return type between
-            commands is not enforced.
-        """
-
-    @staticmethod
-    def get_subcommands() -> dict:
-        """Returns a dictionary of subcommands in the form {name: command} or
-        None if no subcommands are required.
-        """
-        return None
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/ParseCommand.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/ParseCommand.py
deleted file mode 100644
index 29d7867e808673..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/ParseCommand.py
+++ /dev/null
@@ -1,550 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Parse a DExTer command. In particular, ensure that only a very limited
-subset of Python is allowed, in order to prevent the possibility of unsafe
-Python code being embedded within DExTer commands.
-"""
-
-import os
-import unittest
-from copy import copy
-from pathlib import PurePath
-from collections import defaultdict, OrderedDict, namedtuple
-
-from dex.utils.Exceptions import CommandParseError, NonFloatValueInCommand
-
-from dex.command.CommandBase import CommandBase
-from dex.command.commands.DexCommandLine import DexCommandLine
-from dex.command.commands.DexDeclareFile import DexDeclareFile
-from dex.command.commands.DexDeclareAddress import DexDeclareAddress
-from dex.command.commands.DexExpectProgramState import DexExpectProgramState
-from dex.command.commands.DexExpectStepKind import DexExpectStepKind
-from dex.command.commands.DexExpectStepOrder import DexExpectStepOrder
-from dex.command.commands.DexExpectWatchType import DexExpectWatchType
-from dex.command.commands.DexExpectWatchValue import DexExpectWatchValue
-from dex.command.commands.DexExpectWatchBase import (
-    AddressExpression,
-    DexExpectWatchBase,
-)
-from dex.command.commands.DexLabel import DexLabel
-from dex.command.commands.DexLimitSteps import DexLimitSteps
-from dex.command.commands.DexFinishTest import DexFinishTest
-from dex.command.commands.DexUnreachable import DexUnreachable
-from dex.command.commands.DexWatch import DexWatch
-from dex.utils import Timer
-from dex.utils.Exceptions import CommandParseError, DebuggerException
-
-
-def _get_valid_commands():
-    """Return all top level DExTer test commands.
-
-    Returns:
-        { name (str): command (class) }
-    """
-    return {
-        DexCommandLine.get_name(): DexCommandLine,
-        DexDeclareAddress.get_name(): DexDeclareAddress,
-        DexDeclareFile.get_name(): DexDeclareFile,
-        DexExpectProgramState.get_name(): DexExpectProgramState,
-        DexExpectStepKind.get_name(): DexExpectStepKind,
-        DexExpectStepOrder.get_name(): DexExpectStepOrder,
-        DexExpectWatchType.get_name(): DexExpectWatchType,
-        DexExpectWatchValue.get_name(): DexExpectWatchValue,
-        DexLabel.get_name(): DexLabel,
-        DexLimitSteps.get_name(): DexLimitSteps,
-        DexFinishTest.get_name(): DexFinishTest,
-        DexUnreachable.get_name(): DexUnreachable,
-        DexWatch.get_name(): DexWatch,
-    }
-
-
-def _get_command_name(command_raw: str) -> str:
-    """Return command name by splitting up DExTer command contained in
-    command_raw on the first opening paranthesis and further stripping
-    any potential leading or trailing whitespace.
-    """
-    return command_raw.split("(", 1)[0].rstrip()
-
-
-def _merge_subcommands(command_name: str, valid_commands: dict) -> dict:
-    """Merge valid_commands and command_name's subcommands into a new dict.
-
-    Returns:
-        { name (str): command (class) }
-    """
-    subcommands = valid_commands[command_name].get_subcommands()
-    if subcommands:
-        return {**valid_commands, **subcommands}
-    return valid_commands
-
-
-def _build_command(
-    command_type, labels, addresses, raw_text: str, path, lineno: str
-) -> CommandBase:
-    """Build a command object from raw text.
-
-    This function will call eval().
-
-    Raises:
-        Any exception that eval() can raise.
-
-    Returns:
-        A dexter command object.
-    """
-
-    def label_to_line(label_name: str) -> int:
-        line = labels.get(label_name, None)
-        if line != None:
-            return line
-        raise format_unresolved_label_err(label_name, raw_text, path.base, lineno)
-
-    def get_address_object(address_name: str, offset: int = 0):
-        if address_name not in addresses:
-            raise format_undeclared_address_err(
-                address_name, raw_text, path.base, lineno
-            )
-        return AddressExpression(address_name, offset)
-
-    valid_commands = _merge_subcommands(
-        command_type.get_name(),
-        {
-            "ref": label_to_line,
-            "address": get_address_object,
-            command_type.get_name(): command_type,
-        },
-    )
-
-    # pylint: disable=eval-used
-    command = eval(raw_text, valid_commands)
-    # pylint: enable=eval-used
-    command.raw_text = raw_text
-    command.path = path.declared
-    command.lineno = lineno
-    return command
-
-
-def _search_line_for_cmd_start(line: str, start: int, valid_commands: dict) -> int:
-    """Scan `line` for a string matching any key in `valid_commands`.
-
-    Start searching from `start`.
-    Commands escaped with `\` (E.g. `\DexLabel('a')`) are ignored.
-
-    Returns:
-        int: the index of the first character of the matching string in `line`
-        or -1 if no command is found.
-    """
-    for command in valid_commands:
-        idx = line.find(command, start)
-        if idx != -1:
-            # Ignore escaped '\' commands.
-            if idx > 0 and line[idx - 1] == "\\":
-                continue
-            return idx
-    return -1
-
-
-def _search_line_for_cmd_end(line: str, start: int, paren_balance: int) -> (int, int):
-    """Find the end of a command by looking for balanced parentheses.
-
-    Args:
-        line: String to scan.
-        start: Index into `line` to start looking.
-        paren_balance(int): paren_balance after previous call.
-
-    Note:
-        On the first call `start` should point at the opening parenthesis and
-        `paren_balance` should be set to 0. Subsequent calls should pass in the
-        returned `paren_balance`.
-
-    Returns:
-        ( end,  paren_balance )
-        Where end is 1 + the index of the last char in the command or, if the
-        parentheses are not balanced, the end of the line.
-
-        paren_balance will be 0 when the parentheses are balanced.
-    """
-    for end in range(start, len(line)):
-        ch = line[end]
-        if ch == "(":
-            paren_balance += 1
-        elif ch == ")":
-            paren_balance -= 1
-        if paren_balance == 0:
-            break
-    end += 1
-    return (end, paren_balance)
-
-
-class TextPoint:
-    def __init__(self, line, char):
-        self.line = line
-        self.char = char
-
-    def get_lineno(self):
-        return self.line + 1
-
-    def get_column(self):
-        return self.char + 1
-
-
-def format_unresolved_label_err(
-    label: str, src: str, filename: str, lineno
-) -> CommandParseError:
-    err = CommandParseError()
-    err.src = src
-    err.caret = ""  # Don't bother trying to point to the bad label.
-    err.filename = filename
-    err.lineno = lineno
-    err.info = f"Unresolved label: '{label}'"
-    return err
-
-
-def format_undeclared_address_err(
-    address: str, src: str, filename: str, lineno
-) -> CommandParseError:
-    err = CommandParseError()
-    err.src = src
-    err.caret = ""  # Don't bother trying to point to the bad address.
-    err.filename = filename
-    err.lineno = lineno
-    err.info = f"Undeclared address: '{address}'"
-    return err
-
-
-def format_parse_err(
-    msg: str, path: str, lines: list, point: TextPoint
-) -> CommandParseError:
-    err = CommandParseError()
-    err.filename = path
-    err.src = lines[point.line].rstrip()
-    err.lineno = point.get_lineno()
-    err.info = msg
-    err.caret = "{}<r>^</>".format(" " * (point.char))
-    return err
-
-
-def skip_horizontal_whitespace(line, point):
-    for idx, char in enumerate(line[point.char :]):
-        if char not in " \t":
-            point.char += idx
-            return
-
-
-def add_line_label(labels, label, cmd_path, cmd_lineno):
-    # Enforce unique line labels.
-    if label.eval() in labels:
-        err = CommandParseError()
-        err.info = f"Found duplicate line label: '{label.eval()}'"
-        err.lineno = cmd_lineno
-        err.filename = cmd_path
-        err.src = label.raw_text
-        # Don't both trying to point to it since we're only printing the raw
-        # command, which isn't much text.
-        err.caret = ""
-        raise err
-    labels[label.eval()] = label.get_line()
-
-
-def add_address(addresses, address, cmd_path, cmd_lineno):
-    # Enforce unique address variables.
-    address_name = address.get_address_name()
-    if address_name in addresses:
-        err = CommandParseError()
-        err.info = f"Found duplicate address: '{address_name}'"
-        err.lineno = cmd_lineno
-        err.filename = cmd_path
-        err.src = address.raw_text
-        # Don't both trying to point to it since we're only printing the raw
-        # command, which isn't much text.
-        err.caret = ""
-        raise err
-    addresses.append(address_name)
-
-
-def _find_all_commands_in_file(path, file_lines, valid_commands, source_root_dir):
-    labels = {}  # dict of {name: line}.
-    addresses = []  # list of addresses.
-    address_resolutions = {}
-    CmdPath = namedtuple("cmd_path", "base declared")
-    cmd_path = CmdPath(path, path)
-    declared_files = set()
-    commands = defaultdict(dict)
-    paren_balance = 0
-    region_start = TextPoint(0, 0)
-
-    for region_start.line in range(len(file_lines)):
-        line = file_lines[region_start.line]
-        region_start.char = 0
-
-        # Search this line till we find no more commands.
-        while True:
-            # If parens are currently balanced we can look for a new command.
-            if paren_balance == 0:
-                region_start.char = _search_line_for_cmd_start(
-                    line, region_start.char, valid_commands
-                )
-                if region_start.char == -1:
-                    break  # Read next line.
-
-                command_name = _get_command_name(line[region_start.char :])
-                cmd_point = copy(region_start)
-                cmd_text_list = [command_name]
-
-                region_start.char += len(
-                    command_name
-                )  # Start searching for parens after cmd.
-                skip_horizontal_whitespace(line, region_start)
-                if region_start.char >= len(line) or line[region_start.char] != "(":
-                    raise format_parse_err(
-                        "Missing open parenthesis", path, file_lines, region_start
-                    )
-
-            end, paren_balance = _search_line_for_cmd_end(
-                line, region_start.char, paren_balance
-            )
-            # Add this text blob to the command.
-            cmd_text_list.append(line[region_start.char : end])
-            # Move parse ptr to end of line or parens.
-            region_start.char = end
-
-            # If the parens are unbalanced start reading the next line in an attempt
-            # to find the end of the command.
-            if paren_balance != 0:
-                break  # Read next line.
-
-            # Parens are balanced, we have a full command to evaluate.
-            raw_text = "".join(cmd_text_list)
-            try:
-                command = _build_command(
-                    valid_commands[command_name],
-                    labels,
-                    addresses,
-                    raw_text,
-                    cmd_path,
-                    cmd_point.get_lineno(),
-                )
-            except SyntaxError as e:
-                # This err should point to the problem line.
-                err_point = copy(cmd_point)
-                # To e the command start is the absolute start, so use as offset.
-                err_point.line += e.lineno - 1  # e.lineno is a position, not index.
-                err_point.char += e.offset - 1  # e.offset is a position, not index.
-                raise format_parse_err(e.msg, path, file_lines, err_point)
-            except TypeError as e:
-                # This err should always point to the end of the command name.
-                err_point = copy(cmd_point)
-                err_point.char += len(command_name)
-                raise format_parse_err(str(e), path, file_lines, err_point)
-            except NonFloatValueInCommand as e:
-                err_point = copy(cmd_point)
-                err_point.char += len(command_name)
-                raise format_parse_err(str(e), path, file_lines, err_point)
-            else:
-                if type(command) is DexLabel:
-                    add_line_label(labels, command, path, cmd_point.get_lineno())
-                elif type(command) is DexDeclareAddress:
-                    add_address(addresses, command, path, cmd_point.get_lineno())
-                elif type(command) is DexDeclareFile:
-                    declared_path = command.declared_file
-                    if not os.path.isabs(declared_path):
-                        source_dir = (
-                            source_root_dir
-                            if source_root_dir
-                            else os.path.dirname(path)
-                        )
-                        declared_path = os.path.join(source_dir, declared_path)
-                    cmd_path = CmdPath(cmd_path.base, str(PurePath(declared_path)))
-                    declared_files.add(cmd_path.declared)
-                elif type(command) is DexCommandLine and "DexCommandLine" in commands:
-                    msg = "More than one DexCommandLine in file"
-                    raise format_parse_err(msg, path, file_lines, err_point)
-
-                assert (path, cmd_point) not in commands[command_name], (
-                    command_name,
-                    commands[command_name],
-                )
-                commands[command_name][path, cmd_point] = command
-
-    if paren_balance != 0:
-        # This err should always point to the end of the command name.
-        err_point = copy(cmd_point)
-        err_point.char += len(command_name)
-        msg = "Unbalanced parenthesis starting here"
-        raise format_parse_err(msg, path, file_lines, err_point)
-    return dict(commands), declared_files
-
-
-def _find_all_commands(test_files, source_root_dir):
-    commands = defaultdict(dict)
-    valid_commands = _get_valid_commands()
-    new_source_files = set()
-    for test_file in test_files:
-        with open(test_file) as fp:
-            lines = fp.readlines()
-        file_commands, declared_files = _find_all_commands_in_file(
-            test_file, lines, valid_commands, source_root_dir
-        )
-        for command_name in file_commands:
-            commands[command_name].update(file_commands[command_name])
-        new_source_files |= declared_files
-
-    return dict(commands), new_source_files
-
-
-def get_command_infos(test_files, source_root_dir):
-    with Timer("parsing commands"):
-        try:
-            commands, new_source_files = _find_all_commands(test_files, source_root_dir)
-            command_infos = OrderedDict()
-            for command_type in commands:
-                for command in commands[command_type].values():
-                    if command_type not in command_infos:
-                        command_infos[command_type] = []
-                    command_infos[command_type].append(command)
-            return OrderedDict(command_infos), new_source_files
-        except CommandParseError as e:
-            msg = "parser error: <d>{}({}):</> {}\n{}\n{}\n".format(
-                e.filename, e.lineno, e.info, e.src, e.caret
-            )
-            raise DebuggerException(msg)
-
-
-class TestParseCommand(unittest.TestCase):
-    class MockCmd(CommandBase):
-        """A mock DExTer command for testing parsing.
-
-        Args:
-            value (str): Unique name for this instance.
-        """
-
-        def __init__(self, *args):
-            self.value = args[0]
-
-        def get_name():
-            return __class__.__name__
-
-        def eval(this):
-            pass
-
-    def __init__(self, *args):
-        super().__init__(*args)
-
-        self.valid_commands = {
-            TestParseCommand.MockCmd.get_name(): TestParseCommand.MockCmd
-        }
-
-    def _find_all_commands_in_lines(self, lines):
-        """Use DExTer parsing methods to find all the mock commands in lines.
-
-        Returns:
-            { cmd_name: { (path, line): command_obj } }
-        """
-        cmds, declared_files = _find_all_commands_in_file(
-            __file__, lines, self.valid_commands, None
-        )
-        return cmds
-
-    def _find_all_mock_values_in_lines(self, lines):
-        """Use DExTer parsing methods to find all mock command values in lines.
-
-        Returns:
-            values (list(str)): MockCmd values found in lines.
-        """
-        cmds = self._find_all_commands_in_lines(lines)
-        mocks = cmds.get(TestParseCommand.MockCmd.get_name(), None)
-        return [v.value for v in mocks.values()] if mocks else []
-
-    def test_parse_inline(self):
-        """Commands can be embedded in other text."""
-
-        lines = [
-            'MockCmd("START") Lorem ipsum dolor sit amet, consectetur\n',
-            'adipiscing elit, MockCmd("EMBEDDED") sed doeiusmod tempor,\n',
-            "incididunt ut labore et dolore magna aliqua.\n",
-        ]
-
-        values = self._find_all_mock_values_in_lines(lines)
-
-        self.assertTrue("START" in values)
-        self.assertTrue("EMBEDDED" in values)
-
-    def test_parse_multi_line_comment(self):
-        """Multi-line commands can embed comments."""
-
-        lines = [
-            "Lorem ipsum dolor sit amet, consectetur\n",
-            "adipiscing elit, sed doeiusmod tempor,\n",
-            "incididunt ut labore et MockCmd(\n",
-            '    "WITH_COMMENT" # THIS IS A COMMENT\n',
-            ") dolore magna aliqua. Ut enim ad minim\n",
-        ]
-
-        values = self._find_all_mock_values_in_lines(lines)
-
-        self.assertTrue("WITH_COMMENT" in values)
-
-    def test_parse_empty(self):
-        """Empty files are silently ignored."""
-
-        lines = []
-        values = self._find_all_mock_values_in_lines(lines)
-        self.assertTrue(len(values) == 0)
-
-    def test_parse_bad_whitespace(self):
-        """Throw exception when parsing badly formed whitespace."""
-        lines = [
-            "MockCmd\n",
-            '("XFAIL_CMD_LF_PAREN")\n',
-        ]
-
-        with self.assertRaises(CommandParseError):
-            values = self._find_all_mock_values_in_lines(lines)
-
-    def test_parse_good_whitespace(self):
-        """Try to emulate python whitespace rules"""
-
-        lines = [
-            'MockCmd("NONE")\n',
-            'MockCmd    ("SPACE")\n',
-            'MockCmd\t\t("TABS")\n',
-            'MockCmd(    "ARG_SPACE"    )\n',
-            'MockCmd(\t\t"ARG_TABS"\t\t)\n',
-            "MockCmd(\n",
-            '"CMD_PAREN_LF")\n',
-        ]
-
-        values = self._find_all_mock_values_in_lines(lines)
-
-        self.assertTrue("NONE" in values)
-        self.assertTrue("SPACE" in values)
-        self.assertTrue("TABS" in values)
-        self.assertTrue("ARG_SPACE" in values)
-        self.assertTrue("ARG_TABS" in values)
-        self.assertTrue("CMD_PAREN_LF" in values)
-
-    def test_parse_share_line(self):
-        """More than one command can appear on one line."""
-
-        lines = [
-            'MockCmd("START") MockCmd("CONSECUTIVE") words '
-            'MockCmd("EMBEDDED") more words\n'
-        ]
-
-        values = self._find_all_mock_values_in_lines(lines)
-
-        self.assertTrue("START" in values)
-        self.assertTrue("CONSECUTIVE" in values)
-        self.assertTrue("EMBEDDED" in values)
-
-    def test_parse_escaped(self):
-        """Escaped commands are ignored."""
-
-        lines = ['words \MockCmd("IGNORED") words words words\n']
-
-        values = self._find_all_mock_values_in_lines(lines)
-
-        self.assertFalse("IGNORED" in values)
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/StepValueInfo.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/StepValueInfo.py
deleted file mode 100644
index 92cd576533fa2c..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/StepValueInfo.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-
-class StepValueInfo(object):
-    def __init__(self, step_index, watch_info, expected_value):
-        self.step_index = step_index
-        self.watch_info = watch_info
-        self.expected_value = expected_value
-
-    def __str__(self):
-        return "{}:{}: expected value:{}".format(
-            self.step_index, self.watch_info, self.expected_value
-        )
-
-    def __eq__(self, other):
-        return (
-            self.watch_info.expression == other.watch_info.expression
-            and self.expected_value == other.expected_value
-        )
-
-    def __hash__(self):
-        return hash(self.watch_info.expression, self.expected_value)
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/__init__.py
deleted file mode 100644
index 3b1c448f70dda5..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/__init__.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from dex.command.ParseCommand import get_command_infos
-from dex.command.StepValueInfo import StepValueInfo
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexCommandLine.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexCommandLine.py
deleted file mode 100644
index 77615e7845f55b..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexCommandLine.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""A Command that specifies the command line with which to run the test.
-"""
-
-from dex.command.CommandBase import CommandBase
-
-
-class DexCommandLine(CommandBase):
-    def __init__(self, the_cmdline):
-        if type(the_cmdline) is not list:
-            raise TypeError("Expected list, got {}".format(type(the_cmdline)))
-        for x in the_cmdline:
-            if type(x) is not str:
-                raise TypeError(
-                    'Command line element "{}" has type {}'.format(x, type(x))
-                )
-        self.the_cmdline = the_cmdline
-        super(DexCommandLine, self).__init__()
-
-    def eval(self):
-        raise NotImplementedError("DexCommandLine commands cannot be evaled.")
-
-    @staticmethod
-    def get_name():
-        return __class__.__name__
-
-    @staticmethod
-    def get_subcommands() -> dict:
-        return None
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareAddress.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareAddress.py
deleted file mode 100644
index a98401b9f8d69a..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareAddress.py
+++ /dev/null
@@ -1,67 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Commmand sets the path for all following commands to 'declared_file'.
-"""
-
-import os
-from pathlib import PurePath
-
-from dex.command.CommandBase import CommandBase, StepExpectInfo
-
-
-class DexDeclareAddress(CommandBase):
-    def __init__(self, addr_name, expression, **kwargs):
-        if not isinstance(addr_name, str):
-            raise TypeError("invalid argument type")
-
-        self.addr_name = addr_name
-        self.expression = expression
-        self.on_line = kwargs.pop("on_line")
-        self.hit_count = kwargs.pop("hit_count", 0)
-
-        self.address_resolutions = None
-
-        super(DexDeclareAddress, self).__init__()
-
-    @staticmethod
-    def get_name():
-        return __class__.__name__
-
-    def get_watches(self):
-        return [
-            StepExpectInfo(
-                self.expression, self.path, 0, range(self.on_line, self.on_line + 1)
-            )
-        ]
-
-    def get_address_name(self):
-        return self.addr_name
-
-    def eval(self, step_collection):
-        self.address_resolutions[self.get_address_name()] = None
-        for step in step_collection.steps:
-            loc = step.current_location
-
-            if (
-                loc.path
-                and self.path
-                and PurePath(loc.path) == PurePath(self.path)
-                and loc.lineno == self.on_line
-            ):
-                if self.hit_count > 0:
-                    self.hit_count -= 1
-                    continue
-                try:
-                    watch = step.program_state.frames[0].watches[self.expression]
-                except KeyError:
-                    continue
-                try:
-                    hex_val = int(watch.value, 16)
-                except ValueError:
-                    hex_val = None
-                self.address_resolutions[self.get_address_name()] = hex_val
-                break
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareFile.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareFile.py
deleted file mode 100644
index 44784191b6f80f..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexDeclareFile.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Commmand sets the path for all following commands to 'declared_file'.
-"""
-
-from pathlib import PurePath
-
-from dex.command.CommandBase import CommandBase
-
-
-class DexDeclareFile(CommandBase):
-    def __init__(self, declared_file):
-        if not isinstance(declared_file, str):
-            raise TypeError("invalid argument type")
-
-        # Use PurePath to create a cannonical platform path.
-        # TODO: keep paths as PurePath objects for 'longer'
-        self.declared_file = str(PurePath(declared_file))
-        super(DexDeclareFile, self).__init__()
-
-    @staticmethod
-    def get_name():
-        return __class__.__name__
-
-    def eval(self):
-        return self.declared_file
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectProgramState.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectProgramState.py
deleted file mode 100644
index 54c62a1be8d008..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectProgramState.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Command for specifying a partial or complete state for the program to enter
-during execution.
-"""
-
-from itertools import chain
-
-from dex.command.CommandBase import CommandBase, StepExpectInfo
-from dex.dextIR import ProgramState, SourceLocation, StackFrame, DextIR
-
-
-def frame_from_dict(source: dict) -> StackFrame:
-    if "location" in source:
-        assert isinstance(source["location"], dict)
-        source["location"] = SourceLocation(**source["location"])
-    return StackFrame(**source)
-
-
-def state_from_dict(source: dict) -> ProgramState:
-    if "frames" in source:
-        assert isinstance(source["frames"], list)
-        source["frames"] = list(map(frame_from_dict, source["frames"]))
-    return ProgramState(**source)
-
-
-class DexExpectProgramState(CommandBase):
-    """Expect to see a given program `state` a certain numer of `times`.
-
-    DexExpectProgramState(state [,**times])
-
-    See Commands.md for more info.
-    """
-
-    def __init__(self, *args, **kwargs):
-        if len(args) != 1:
-            raise TypeError("expected exactly one unnamed arg")
-
-        self.program_state_text = str(args[0])
-
-        self.expected_program_state = state_from_dict(args[0])
-
-        self.times = kwargs.pop("times", -1)
-        if kwargs:
-            raise TypeError("unexpected named args: {}".format(", ".join(kwargs)))
-
-        # Step indices at which the expected program state was encountered.
-        self.encounters = []
-
-        super(DexExpectProgramState, self).__init__()
-
-    @staticmethod
-    def get_name():
-        return __class__.__name__
-
-    def get_watches(self):
-        frame_expects = set()
-        for idx, frame in enumerate(self.expected_program_state.frames):
-            path = (
-                frame.location.path
-                if frame.location and frame.location.path
-                else self.path
-            )
-            line_range = (
-                range(frame.location.lineno, frame.location.lineno + 1)
-                if frame.location and frame.location.lineno
-                else None
-            )
-            for watch in frame.watches:
-                frame_expects.add(
-                    StepExpectInfo(
-                        expression=watch,
-                        path=path,
-                        frame_idx=idx,
-                        line_range=line_range,
-                    )
-                )
-        return frame_expects
-
-    def eval(self, step_collection: DextIR) -> bool:
-        for step in step_collection.steps:
-            if self.expected_program_state.match(step.program_state):
-                self.encounters.append(step.step_index)
-
-        return (
-            self.times < 0 < len(self.encounters) or len(self.encounters) == self.times
-        )
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectStepKind.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectStepKind.py
deleted file mode 100644
index 333b765459e51f..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectStepKind.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Command for specifying an expected number of steps of a particular kind."""
-
-from dex.command.CommandBase import CommandBase
-from dex.dextIR.StepIR import StepKind
-
-
-class DexExpectStepKind(CommandBase):
-    """Expect to see a particular step `kind` a number of `times` while stepping
-    through the program.
-
-    DexExpectStepKind(kind, times)
-
-    See Commands.md for more info.
-    """
-
-    def __init__(self, *args):
-        if len(args) != 2:
-            raise TypeError("expected two args")
-
-        try:
-            step_kind = StepKind[args[0]]
-        except KeyError:
-            raise TypeError(
-                "expected arg 0 to be one of {}".format(
-                    [kind for kind, _ in StepKind.__members__.items()]
-                )
-            )
-
-        self.name = step_kind
-        self.count = args[1]
-
-        super(DexExpectStepKind, self).__init__()
-
-    @staticmethod
-    def get_name():
-        return __class__.__name__
-
-    def eval(self):
-        # DexExpectStepKind eval() implementation is mixed into
-        # Heuristic.__init__()
-        # [TODO] Fix this ^.
-        pass
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectStepOrder.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectStepOrder.py
deleted file mode 100644
index d6954a440f1ae4..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectStepOrder.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from dex.command.CommandBase import CommandBase
-from dex.dextIR import LocIR
-from dex.dextIR import ValueIR
-
-
-class DexExpectStepOrder(CommandBase):
-    """Expect the line every `DexExpectStepOrder` is found on to be stepped on
-    in `order`. Each instance must have a set of unique ascending indices.
-
-    DexExpectStepOrder(*order)
-
-    See Commands.md for more info.
-    """
-
-    def __init__(self, *args, **kwargs):
-        if not args:
-            raise TypeError("Need at least one order number")
-
-        if "on_line" in kwargs:
-            try:
-                on_line = kwargs.pop("on_line")
-                self.on_line = int(on_line)
-            except ValueError:
-                raise ValueError(
-                    "on_line value '{0}' cannot be parsed to an integer".format(on_line)
-                )
-        self.sequence = [int(x) for x in args]
-        super(DexExpectStepOrder, self).__init__()
-
-    @staticmethod
-    def get_name():
-        return __class__.__name__
-
-    def get_line(self):
-        return self.on_line if hasattr(self, "on_line") else self.lineno
-
-    def eval(self, step_info):
-        return {
-            "DexExpectStepOrder": ValueIR(
-                expression=str(step_info.current_location.lineno),
-                value=str(step_info.step_index),
-                type_name=None,
-                error_string=None,
-                could_evaluate=True,
-                is_optimized_away=True,
-                is_irretrievable=False,
-            )
-        }
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchBase.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchBase.py
deleted file mode 100644
index 21f1b719c68172..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchBase.py
+++ /dev/null
@@ -1,315 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-"""DexExpectWatch base class, holds logic for how to build and process expected
- watch commands.
-"""
-
-import abc
-import difflib
-import os
-import math
-from collections import namedtuple
-from pathlib import PurePath
-
-from dex.command.CommandBase import CommandBase, StepExpectInfo
-from dex.command.StepValueInfo import StepValueInfo
-from dex.utils.Exceptions import NonFloatValueInCommand
-
-
-class AddressExpression(object):
-    def __init__(self, name, offset=0):
-        self.name = name
-        self.offset = offset
-
-    def is_resolved(self, resolutions):
-        return self.name in resolutions
-
-    # Given the resolved value of the address, resolve the final value of
-    # this expression.
-    def resolved_value(self, resolutions):
-        if not self.name in resolutions or resolutions[self.name] is None:
-            return None
-        # Technically we should fill(8) if we're debugging on a 32bit architecture?
-        return format_address(resolutions[self.name] + self.offset)
-
-
-def format_address(value, address_width=64):
-    return "0x" + hex(value)[2:].zfill(math.ceil(address_width / 4))
-
-
-def resolved_value(value, resolutions):
-    return (
-        value.resolved_value(resolutions)
-        if isinstance(value, AddressExpression)
-        else value
-    )
-
-
-class DexExpectWatchBase(CommandBase):
-    def __init__(self, *args, **kwargs):
-        if len(args) < 2:
-            raise TypeError("expected at least two args")
-
-        self.expression = args[0]
-        self.values = [
-            arg if isinstance(arg, AddressExpression) else str(arg) for arg in args[1:]
-        ]
-        try:
-            on_line = kwargs.pop("on_line")
-            self._from_line = on_line
-            self._to_line = on_line
-        except KeyError:
-            self._from_line = kwargs.pop("from_line", 1)
-            self._to_line = kwargs.pop("to_line", 999999)
-        self._require_in_order = kwargs.pop("require_in_order", True)
-        self.float_range = kwargs.pop("float_range", None)
-        if self.float_range is not None:
-            for value in self.values:
-                try:
-                    float(value)
-                except ValueError:
-                    raise NonFloatValueInCommand(
-                        f"Non-float value '{value}' when float_range arg provided"
-                    )
-        if kwargs:
-            raise TypeError("unexpected named args: {}".format(", ".join(kwargs)))
-
-        # Number of times that this watch has been encountered.
-        self.times_encountered = 0
-
-        # We'll pop from this set as we encounter values so anything left at
-        # the end can be considered as not having been seen.
-        self._missing_values = set(self.values)
-
-        self.misordered_watches = []
-
-        # List of StepValueInfos for any watch that is encountered as invalid.
-        self.invalid_watches = []
-
-        # List of StepValueInfo any any watch where we couldn't retrieve its
-        # data.
-        self.irretrievable_watches = []
-
-        # List of StepValueInfos for any watch that is encountered as having
-        # been optimized out.
-        self.optimized_out_watches = []
-
-        # List of StepValueInfos for any watch that is encountered that has an
-        # expected value.
-        self.expected_watches = []
-
-        # List of StepValueInfos for any watch that is encountered that has an
-        # unexpected value.
-        self.unexpected_watches = []
-
-        # List of StepValueInfos for all observed watches that were not
-        # invalid, irretrievable, or optimized out (combines expected and
-        # unexpected).
-        self.observed_watches = []
-
-        # dict of address names to their final resolved values, None until it
-        # gets assigned externally.
-        self.address_resolutions = None
-
-        super(DexExpectWatchBase, self).__init__()
-
-    def resolve_value(self, value):
-        return (
-            value.resolved_value(self.address_resolutions)
-            if isinstance(value, AddressExpression)
-            else value
-        )
-
-    def describe_value(self, value):
-        if isinstance(value, AddressExpression):
-            offset = ""
-            if value.offset > 0:
-                offset = f"+{value.offset}"
-            elif value.offset < 0:
-                offset = str(value.offset)
-            desc = f"address '{value.name}'{offset}"
-            if self.resolve_value(value) is not None:
-                desc += f" ({self.resolve_value(value)})"
-            return desc
-        return value
-
-    def get_watches(self):
-        return [
-            StepExpectInfo(
-                self.expression, self.path, 0, range(self._from_line, self._to_line + 1)
-            )
-        ]
-
-    @property
-    def line_range(self):
-        return list(range(self._from_line, self._to_line + 1))
-
-    @property
-    def missing_values(self):
-        return sorted(list(self.describe_value(v) for v in self._missing_values))
-
-    @property
-    def encountered_values(self):
-        return sorted(
-            list(
-                set(
-                    self.describe_value(v)
-                    for v in set(self.values) - self._missing_values
-                )
-            )
-        )
-
-    @abc.abstractmethod
-    def _get_expected_field(self, watch):
-        """Return a field from watch that this ExpectWatch command is checking."""
-
-    def _match_expected_floating_point(self, value):
-        """Checks to see whether value is a float that falls within the
-        acceptance range of one of this command's expected float values, and
-        returns the expected value if so; otherwise returns the original
-        value."""
-        try:
-            value_as_float = float(value)
-        except ValueError:
-            return value
-
-        possible_values = self.values
-        for expected in possible_values:
-            try:
-                expected_as_float = float(expected)
-                difference = abs(value_as_float - expected_as_float)
-                if difference <= self.float_range:
-                    return expected
-            except ValueError:
-                pass
-        return value
-
-    def _maybe_fix_float(self, value):
-        if self.float_range is not None:
-            return self._match_expected_floating_point(value)
-        else:
-            return value
-
-    def _handle_watch(self, step_info):
-        self.times_encountered += 1
-
-        if not step_info.watch_info.could_evaluate:
-            self.invalid_watches.append(step_info)
-            return
-
-        if step_info.watch_info.is_optimized_away:
-            self.optimized_out_watches.append(step_info)
-            return
-
-        if step_info.watch_info.is_irretrievable:
-            self.irretrievable_watches.append(step_info)
-            return
-
-        expected_value = self._maybe_fix_float(step_info.expected_value)
-
-        # Check to see if this value matches with a resolved address.
-        matching_address = None
-        for v in self.values:
-            if (
-                isinstance(v, AddressExpression)
-                and v.name in self.address_resolutions
-                and self.resolve_value(v) == expected_value
-            ):
-                matching_address = v
-                break
-
-        # If this is not an expected value, either a direct value or an address,
-        # then this is an unexpected watch.
-        if expected_value not in self.values and matching_address is None:
-            self.unexpected_watches.append(step_info)
-            return
-
-        self.expected_watches.append(step_info)
-        value_to_remove = (
-            matching_address if matching_address is not None else expected_value
-        )
-        try:
-            self._missing_values.remove(value_to_remove)
-        except KeyError:
-            pass
-
-    def _check_watch_order(self, actual_watches, expected_values):
-        """Use difflib to figure out whether the values are in the expected order
-        or not.
-        """
-        differences = []
-        actual_values = [
-            self._maybe_fix_float(w.expected_value) for w in actual_watches
-        ]
-        value_differences = list(
-            difflib.Differ().compare(actual_values, expected_values)
-        )
-
-        missing_value = False
-        index = 0
-        for vd in value_differences:
-            kind = vd[0]
-            if kind == "+":
-                # A value that is encountered in the expected list but not in the
-                # actual list.  We'll keep a note that something is wrong and flag
-                # the next value that matches as misordered.
-                missing_value = True
-            elif kind == " ":
-                # This value is as expected.  It might still be wrong if we've
-                # previously encountered a value that is in the expected list but
-                #  not the actual list.
-                if missing_value:
-                    missing_value = False
-                    differences.append(actual_watches[index])
-                index += 1
-            elif kind == "-":
-                # A value that is encountered in the actual list but not the
-                #  expected list.
-                differences.append(actual_watches[index])
-                index += 1
-            else:
-                assert False, "unexpected diff:{}".format(vd)
-
-        return differences
-
-    def eval(self, step_collection):
-        for step in step_collection.steps:
-            loc = step.current_location
-
-            if (
-                loc.path
-                and self.path
-                and PurePath(loc.path) == PurePath(self.path)
-                and loc.lineno in self.line_range
-            ):
-                try:
-                    watch = step.program_state.frames[0].watches[self.expression]
-                except KeyError:
-                    pass
-                else:
-                    expected_field = self._get_expected_field(watch)
-                    step_info = StepValueInfo(step.step_index, watch, expected_field)
-                    self._handle_watch(step_info)
-
-        if self._require_in_order:
-            # A list of all watches where the value has changed.
-            value_change_watches = []
-            prev_value = None
-            all_expected_values = []
-            for watch in self.expected_watches:
-                expected_value = self._maybe_fix_float(watch.expected_value)
-                all_expected_values.append(expected_value)
-                if expected_value != prev_value:
-                    value_change_watches.append(watch)
-                    prev_value = expected_value
-
-            resolved_values = [self.resolve_value(v) for v in self.values]
-            self.misordered_watches = self._check_watch_order(
-                value_change_watches,
-                [v for v in resolved_values if v in all_expected_values],
-            )
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchType.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchType.py
deleted file mode 100644
index 0f0c65f49bfee2..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchType.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Command for specifying an expected set of types for a particular watch."""
-
-
-from dex.command.commands.DexExpectWatchBase import DexExpectWatchBase
-
-
-class DexExpectWatchType(DexExpectWatchBase):
-    """Expect the expression `expr` to evaluate be evaluated and have each
-    evaluation's type checked against the list of `types`.
-
-    DexExpectWatchType(expr, *types [,**from_line=1][,**to_line=Max]
-                        [,**on_line])
-
-    See Commands.md for more info.
-    """
-
-    @staticmethod
-    def get_name():
-        return __class__.__name__
-
-    def _get_expected_field(self, watch):
-        return watch.type_name
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchValue.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchValue.py
deleted file mode 100644
index df5bb09c03651c..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchValue.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Command for specifying an expected set of values for a particular watch."""
-
-
-from dex.command.commands.DexExpectWatchBase import DexExpectWatchBase
-
-
-class DexExpectWatchValue(DexExpectWatchBase):
-    """Expect the expression `expr` to evaluate to the list of `values`
-    sequentially.
-
-    DexExpectWatchValue(expr, *values [,**from_line=1][,**to_line=Max]
-                        [,**on_line])
-
-    See Commands.md for more info.
-    """
-
-    @staticmethod
-    def get_name():
-        return __class__.__name__
-
-    def _get_expected_field(self, watch):
-        return watch.value
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexFinishTest.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexFinishTest.py
deleted file mode 100644
index 7a28f1c175e7a7..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexFinishTest.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""A Command that enables test writers to terminate a test after a specified
-breakpoint has been hit a number of times.
-"""
-
-from dex.command.CommandBase import CommandBase
-
-
-class DexFinishTest(CommandBase):
-    def __init__(self, *args, **kwargs):
-        if len(args) == 0:
-            self.expression = None
-            self.values = []
-        elif len(args) == 1:
-            raise TypeError("expected 0 or at least 2 positional arguments")
-        else:
-            self.expression = args[0]
-            self.values = [str(arg) for arg in args[1:]]
-        self.on_line = kwargs.pop("on_line")
-        self.hit_count = kwargs.pop("hit_count", 0)
-        if kwargs:
-            raise TypeError("unexpected named args: {}".format(", ".join(kwargs)))
-        super(DexFinishTest, self).__init__()
-
-    def eval(self):
-        raise NotImplementedError("DexFinishTest commands cannot be evaled.")
-
-    @staticmethod
-    def get_name():
-        return __class__.__name__
-
-    @staticmethod
-    def get_subcommands() -> dict:
-        return None
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexLabel.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexLabel.py
deleted file mode 100644
index 1dd0e5454e247b..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexLabel.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Command used to give a line in a test a named psuedonym. Every DexLabel has
-   a line number and Label string component.
-"""
-
-from dex.command.CommandBase import CommandBase
-
-
-class DexLabel(CommandBase):
-    def __init__(self, label, **kwargs):
-        if not isinstance(label, str):
-            raise TypeError("invalid argument type")
-
-        try:
-            self.on_line = kwargs.pop("on_line")
-        except KeyError:
-            # We cannot use self.lineno because it hasn't been set yet.
-            pass
-        if kwargs:
-            raise TypeError(f'unexpected named args: {", ".join(kwargs)}')
-
-        self._label = label
-        super(DexLabel, self).__init__()
-
-    def get_line(self):
-        return getattr(self, "on_line", self.lineno)
-
-    def get_as_pair(self):
-        return (self._label, self.get_line())
-
-    @staticmethod
-    def get_name():
-        return __class__.__name__
-
-    def eval(self):
-        return self._label
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexLimitSteps.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexLimitSteps.py
deleted file mode 100644
index 1c6aee196331af..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexLimitSteps.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""A Command that enables test writers to specify a limited number of break
-points using an start condition and range.
-"""
-
-from dex.command.CommandBase import CommandBase
-
-
-class DexLimitSteps(CommandBase):
-    def __init__(self, *args, **kwargs):
-        if len(args) == 0:
-            self.expression = None
-            self.values = []
-        elif len(args) == 1:
-            raise TypeError("expected 0 or at least 2 positional arguments")
-        else:
-            self.expression = args[0]
-            self.values = [str(arg) for arg in args[1:]]
-        try:
-            on_line = kwargs.pop("on_line")
-            self.from_line = on_line
-            self.to_line = on_line
-        except KeyError:
-            self.from_line = kwargs.pop("from_line", 1)
-            self.to_line = kwargs.pop("to_line", 999999)
-        self.hit_count = kwargs.pop("hit_count", None)
-        if kwargs:
-            raise TypeError("unexpected named args: {}".format(", ".join(kwargs)))
-        super(DexLimitSteps, self).__init__()
-
-    def eval(self):
-        raise NotImplementedError("DexLimitSteps commands cannot be evaled.")
-
-    @staticmethod
-    def get_name():
-        return __class__.__name__
-
-    @staticmethod
-    def get_subcommands() -> dict:
-        return None
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexUnreachable.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexUnreachable.py
deleted file mode 100644
index 8356ed7a7a0bbd..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexUnreachable.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-
-from dex.command.CommandBase import CommandBase
-from dex.dextIR import ValueIR
-
-
-class DexUnreachable(CommandBase):
-    """Expect the source line this is found on will never be stepped on to.
-
-    DexUnreachable()
-
-    See Commands.md for more info.
-    """
-
-    def __init__(self, *args, **kwargs):
-        if len(args) != 0:
-            raise TypeError("DexUnreachable takes no positional arguments")
-        if "on_line" in kwargs:
-            on_line = kwargs.pop("on_line")
-            self._from_line = on_line
-            self._to_line = on_line
-        elif "from_line" in kwargs and "to_line" in kwargs:
-            self._from_line = kwargs.pop("from_line")
-            self._to_line = kwargs.pop("to_line")
-        elif "from_line" in kwargs or "to_line" in kwargs:
-            raise TypeError("Must provide both from_line and to_line to DexUnreachable")
-
-        if len(kwargs) > 0:
-            raise TypeError("Unexpected kwargs {}".format(kwargs.keys()))
-        super(DexUnreachable, self).__init__()
-        pass
-
-    @staticmethod
-    def get_name():
-        return __class__.__name__
-
-    def eval(self, step_info):
-        # If we're ever called, at all, then we're evaluating a line that has
-        # been marked as unreachable. Which means a failure.
-        vir = ValueIR(
-            expression="Unreachable",
-            value="True",
-            type_name=None,
-            error_string=None,
-            could_evaluate=True,
-            is_optimized_away=True,
-            is_irretrievable=False,
-        )
-        return {"DexUnreachable": vir}
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexWatch.py b/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexWatch.py
deleted file mode 100644
index 62f12c354e22fc..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexWatch.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Command to instruct the debugger to inspect the value of some set of
-expressions on the current source line.
-"""
-
-from dex.command.CommandBase import CommandBase
-
-
-class DexWatch(CommandBase):
-    """[Deprecated] Evaluate each given `expression` when the debugger steps onto the
-    line this command is found on
-
-    DexWatch(*expressions)
-
-    See Commands.md for more info.
-    """
-
-    def __init__(self, *args):
-        if not args:
-            raise TypeError("expected some arguments")
-
-        for arg in args:
-            if not isinstance(arg, str):
-                raise TypeError("invalid argument type")
-
-        self._args = args
-        super(DexWatch, self).__init__()
-
-    @staticmethod
-    def get_name():
-        return __class__.__name__
-
-    def eval(self, debugger):
-        return {arg: debugger.evaluate_expression(arg) for arg in self._args}
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerBase.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerBase.py
deleted file mode 100644
index d4a555085faced..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerBase.py
+++ /dev/null
@@ -1,317 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Base class for all debugger interface implementations."""
-
-import abc
-import os
-import sys
-import traceback
-import unittest
-
-from types import SimpleNamespace
-from dex.command.CommandBase import StepExpectInfo
-from dex.dextIR import DebuggerIR, FrameIR, LocIR, StepIR, ValueIR
-from dex.utils.Exceptions import DebuggerException
-from dex.utils.ReturnCode import ReturnCode
-
-
-def watch_is_active(watch_info: StepExpectInfo, path, frame_idx, line_no):
-    _, watch_path, watch_frame_idx, watch_line_range = watch_info
-    # If this watch should only be active for a specific file...
-    if watch_path and os.path.isfile(watch_path):
-        # If the current path does not match the expected file, this watch is
-        # not active.
-        if not (path and os.path.isfile(path) and os.path.samefile(path, watch_path)):
-            return False
-    if watch_frame_idx != frame_idx:
-        return False
-    if watch_line_range and line_no not in list(watch_line_range):
-        return False
-    return True
-
-
-class DebuggerBase(object, metaclass=abc.ABCMeta):
-    def __init__(self, context):
-        self.context = context
-        # Note: We can't already read values from options
-        # as DebuggerBase is created before we initialize options
-        # to read potential_debuggers.
-        self.options = self.context.options
-
-        self._interface = None
-        self.has_loaded = False
-        self._loading_error = None
-        try:
-            self._interface = self._load_interface()
-            self.has_loaded = True
-        except DebuggerException:
-            self._loading_error = sys.exc_info()
-
-    def __enter__(self):
-        try:
-            self._custom_init()
-            self.clear_breakpoints()
-        except DebuggerException:
-            self._loading_error = sys.exc_info()
-        return self
-
-    def __exit__(self, *args):
-        self._custom_exit()
-
-    def _custom_init(self):
-        pass
-
-    def _custom_exit(self):
-        pass
-
-    @property
-    def debugger_info(self):
-        return DebuggerIR(name=self.name, version=self.version)
-
-    @property
-    def is_available(self):
-        return self.has_loaded and self.loading_error is None
-
-    @property
-    def loading_error(self):
-        return str(self._loading_error[1]) if self._loading_error is not None else None
-
-    @property
-    def loading_error_trace(self):
-        if not self._loading_error:
-            return None
-
-        tb = traceback.format_exception(*self._loading_error)
-
-        if self._loading_error[1].orig_exception is not None:
-            orig_exception = traceback.format_exception(
-                *self._loading_error[1].orig_exception
-            )
-
-            if "".join(orig_exception) not in "".join(tb):
-                tb.extend(["\n"])
-                tb.extend(orig_exception)
-
-        tb = "".join(tb).splitlines(True)
-        return tb
-
-    def _sanitize_function_name(self, name):  # pylint: disable=no-self-use
-        """If the function name returned by the debugger needs any post-
-        processing to make it fit (for example, if it includes a byte offset),
-        do that here.
-        """
-        return name
-
-    @abc.abstractmethod
-    def _load_interface(self):
-        pass
-
-    @classmethod
-    def get_option_name(cls):
-        """Short name that will be used on the command line to specify this
-        debugger.
-        """
-        raise NotImplementedError()
-
-    @classmethod
-    def get_name(cls):
-        """Full name of this debugger."""
-        raise NotImplementedError()
-
-    @property
-    def name(self):
-        return self.__class__.get_name()
-
-    @property
-    def option_name(self):
-        return self.__class__.get_option_name()
-
-    @abc.abstractproperty
-    def version(self):
-        pass
-
-    @abc.abstractmethod
-    def clear_breakpoints(self):
-        pass
-
-    def add_breakpoint(self, file_, line):
-        """Returns a unique opaque breakpoint id.
-
-        The ID type depends on the debugger being used, but will probably be
-        an int.
-        """
-        return self._add_breakpoint(self._external_to_debug_path(file_), line)
-
-    @abc.abstractmethod
-    def _add_breakpoint(self, file_, line):
-        """Returns a unique opaque breakpoint id."""
-        pass
-
-    def add_conditional_breakpoint(self, file_, line, condition):
-        """Returns a unique opaque breakpoint id.
-
-        The ID type depends on the debugger being used, but will probably be
-        an int.
-        """
-        return self._add_conditional_breakpoint(
-            self._external_to_debug_path(file_), line, condition
-        )
-
-    @abc.abstractmethod
-    def _add_conditional_breakpoint(self, file_, line, condition):
-        """Returns a unique opaque breakpoint id."""
-        pass
-
-    @abc.abstractmethod
-    def delete_breakpoints(self, ids):
-        """Delete a set of breakpoints by ids.
-
-        Raises a KeyError if, for any id, no breakpoint with that id exists.
-        """
-        pass
-
-    @abc.abstractmethod
-    def get_triggered_breakpoint_ids(self):
-        """Returns a set of opaque ids for just-triggered breakpoints."""
-        pass
-
-    @abc.abstractmethod
-    def launch(self):
-        pass
-
-    @abc.abstractmethod
-    def step(self):
-        pass
-
-    @abc.abstractmethod
-    def go(self) -> ReturnCode:
-        pass
-
-    def get_step_info(self, watches, step_index):
-        step_info = self._get_step_info(watches, step_index)
-        for frame in step_info.frames:
-            frame.loc.path = self._debug_to_external_path(frame.loc.path)
-        return step_info
-
-    @abc.abstractmethod
-    def _get_step_info(self, watches, step_index):
-        pass
-
-    @abc.abstractproperty
-    def is_running(self):
-        pass
-
-    @abc.abstractproperty
-    def is_finished(self):
-        pass
-
-    @abc.abstractproperty
-    def frames_below_main(self):
-        pass
-
-    @abc.abstractmethod
-    def evaluate_expression(self, expression, frame_idx=0) -> ValueIR:
-        pass
-
-    def _external_to_debug_path(self, path):
-        if not self.options.debugger_use_relative_paths:
-            return path
-        root_dir = self.options.source_root_dir
-        if not root_dir or not path:
-            return path
-        assert path.startswith(root_dir)
-        return path[len(root_dir) :].lstrip(os.path.sep)
-
-    def _debug_to_external_path(self, path):
-        if not self.options.debugger_use_relative_paths:
-            return path
-        if not path or not self.options.source_root_dir:
-            return path
-        for file in self.options.source_files:
-            if path.endswith(self._external_to_debug_path(file)):
-                return file
-        return path
-
-
-class TestDebuggerBase(unittest.TestCase):
-    class MockDebugger(DebuggerBase):
-        def __init__(self, context, *args):
-            super().__init__(context, *args)
-            self.step_info = None
-            self.breakpoint_file = None
-
-        def _add_breakpoint(self, file, line):
-            self.breakpoint_file = file
-
-        def _get_step_info(self, watches, step_index):
-            return self.step_info
-
-    def __init__(self, *args):
-        super().__init__(*args)
-        TestDebuggerBase.MockDebugger.__abstractmethods__ = set()
-        self.options = SimpleNamespace(source_root_dir="", source_files=[])
-        context = SimpleNamespace(options=self.options)
-        self.dbg = TestDebuggerBase.MockDebugger(context)
-
-    def _new_step(self, paths):
-        frames = [
-            FrameIR(
-                function=None,
-                is_inlined=False,
-                loc=LocIR(path=path, lineno=0, column=0),
-            )
-            for path in paths
-        ]
-        return StepIR(step_index=0, stop_reason=None, frames=frames)
-
-    def _step_paths(self, step):
-        return [frame.loc.path for frame in step.frames]
-
-    def test_add_breakpoint_no_source_root_dir(self):
-        self.options.debugger_use_relative_paths = True
-        self.options.source_root_dir = ""
-        path = os.path.join(os.path.sep + "root", "some_file")
-        self.dbg.add_breakpoint(path, 12)
-        self.assertEqual(path, self.dbg.breakpoint_file)
-
-    def test_add_breakpoint_with_source_root_dir(self):
-        self.options.debugger_use_relative_paths = True
-        self.options.source_root_dir = os.path.sep + "my_root"
-        path = os.path.join(self.options.source_root_dir, "some_file")
-        self.dbg.add_breakpoint(path, 12)
-        self.assertEqual("some_file", self.dbg.breakpoint_file)
-
-    def test_add_breakpoint_with_source_root_dir_slash_suffix(self):
-        self.options.debugger_use_relative_paths = True
-        self.options.source_root_dir = os.path.sep + "my_root" + os.path.sep
-        path = os.path.join(self.options.source_root_dir, "some_file")
-        self.dbg.add_breakpoint(path, 12)
-        self.assertEqual("some_file", self.dbg.breakpoint_file)
-
-    def test_get_step_info_no_source_root_dir(self):
-        self.options.debugger_use_relative_paths = True
-        path = os.path.join(os.path.sep + "root", "some_file")
-        self.dbg.step_info = self._new_step([path])
-        self.assertEqual([path], self._step_paths(self.dbg.get_step_info([], 0)))
-
-    def test_get_step_info_no_frames(self):
-        self.options.debugger_use_relative_paths = True
-        self.options.source_root_dir = os.path.sep + "my_root"
-        self.dbg.step_info = self._new_step([])
-        self.assertEqual([], self._step_paths(self.dbg.get_step_info([], 0)))
-
-    def test_get_step_info(self):
-        self.options.debugger_use_relative_paths = True
-        self.options.source_root_dir = os.path.sep + "my_root"
-        path = os.path.join(self.options.source_root_dir, "some_file")
-        self.options.source_files = [path]
-        other_path = os.path.join(os.path.sep + "other", "file")
-        dbg_path = os.path.join(os.path.sep + "dbg", "some_file")
-        self.dbg.step_info = self._new_step([None, other_path, dbg_path])
-        self.assertEqual(
-            [None, other_path, path], self._step_paths(self.dbg.get_step_info([], 0))
-        )
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/ConditionalController.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/ConditionalController.py
deleted file mode 100644
index a7d6b570b55e89..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/ConditionalController.py
+++ /dev/null
@@ -1,224 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Conditional Controller Class for DExTer.-"""
-
-
-import os
-import time
-from collections import defaultdict
-from itertools import chain
-
-from dex.debugger.DebuggerControllers.ControllerHelpers import (
-    in_source_file,
-    update_step_watches,
-)
-from dex.debugger.DebuggerControllers.DebuggerControllerBase import (
-    DebuggerControllerBase,
-)
-from dex.debugger.DebuggerBase import DebuggerBase
-from dex.utils.Exceptions import DebuggerException
-from dex.utils.Timeout import Timeout
-
-
-class BreakpointRange:
-    """A range of breakpoints and a set of conditions.
-
-    The leading breakpoint (on line `range_from`) is always active.
-
-    When the leading breakpoint is hit the trailing range should be activated
-    when `expression` evaluates to any value in `values`. If there are no
-    conditions (`expression` is None) then the trailing breakpoint range should
-    always be activated upon hitting the leading breakpoint.
-
-    Args:
-       expression: None for no conditions, or a str expression to compare
-       against `values`.
-
-       hit_count: None for no limit, or int to set the number of times the
-                  leading breakpoint is triggered before it is removed.
-    """
-
-    def __init__(
-        self,
-        expression: str,
-        path: str,
-        range_from: int,
-        range_to: int,
-        values: list,
-        hit_count: int,
-        finish_on_remove: bool,
-    ):
-        self.expression = expression
-        self.path = path
-        self.range_from = range_from
-        self.range_to = range_to
-        self.conditional_values = values
-        self.max_hit_count = hit_count
-        self.current_hit_count = 0
-        self.finish_on_remove = finish_on_remove
-
-    def has_conditions(self):
-        return self.expression != None
-
-    def get_conditional_expression_list(self):
-        conditional_list = []
-        for value in self.conditional_values:
-            # (<expression>) == (<value>)
-            conditional_expression = "({}) == ({})".format(self.expression, value)
-            conditional_list.append(conditional_expression)
-        return conditional_list
-
-    def add_hit(self):
-        self.current_hit_count += 1
-
-    def should_be_removed(self):
-        if self.max_hit_count == None:
-            return False
-        return self.current_hit_count >= self.max_hit_count
-
-
-class ConditionalController(DebuggerControllerBase):
-    def __init__(self, context, step_collection):
-        self._bp_ranges = None
-        self._watches = set()
-        self._step_index = 0
-        self._pause_between_steps = context.options.pause_between_steps
-        self._max_steps = context.options.max_steps
-        # Map {id: BreakpointRange}
-        self._leading_bp_handles = {}
-        super(ConditionalController, self).__init__(context, step_collection)
-        self._build_bp_ranges()
-
-    def _build_bp_ranges(self):
-        commands = self.step_collection.commands
-        self._bp_ranges = []
-        try:
-            limit_commands = commands["DexLimitSteps"]
-            for lc in limit_commands:
-                bpr = BreakpointRange(
-                    lc.expression,
-                    lc.path,
-                    lc.from_line,
-                    lc.to_line,
-                    lc.values,
-                    lc.hit_count,
-                    False,
-                )
-                self._bp_ranges.append(bpr)
-        except KeyError:
-            raise DebuggerException(
-                "Missing DexLimitSteps commands, cannot conditionally step."
-            )
-        if "DexFinishTest" in commands:
-            finish_commands = commands["DexFinishTest"]
-            for ic in finish_commands:
-                bpr = BreakpointRange(
-                    ic.expression,
-                    ic.path,
-                    ic.on_line,
-                    ic.on_line,
-                    ic.values,
-                    ic.hit_count + 1,
-                    True,
-                )
-                self._bp_ranges.append(bpr)
-
-    def _set_leading_bps(self):
-        # Set a leading breakpoint for each BreakpointRange, building a
-        # map of {leading bp id: BreakpointRange}.
-        for bpr in self._bp_ranges:
-            if bpr.has_conditions():
-                # Add a conditional breakpoint for each condition.
-                for cond_expr in bpr.get_conditional_expression_list():
-                    id = self.debugger.add_conditional_breakpoint(
-                        bpr.path, bpr.range_from, cond_expr
-                    )
-                    self._leading_bp_handles[id] = bpr
-            else:
-                # Add an unconditional breakpoint.
-                id = self.debugger.add_breakpoint(bpr.path, bpr.range_from)
-                self._leading_bp_handles[id] = bpr
-
-    def _run_debugger_custom(self, cmdline):
-        # TODO: Add conditional and unconditional breakpoint support to dbgeng.
-        if self.debugger.get_name() == "dbgeng":
-            raise DebuggerException(
-                "DexLimitSteps commands are not supported by dbgeng"
-            )
-
-        self.step_collection.clear_steps()
-        self._set_leading_bps()
-
-        for command_obj in chain.from_iterable(self.step_collection.commands.values()):
-            self._watches.update(command_obj.get_watches())
-
-        self.debugger.launch(cmdline)
-        time.sleep(self._pause_between_steps)
-
-        exit_desired = False
-        timed_out = False
-        total_timeout = Timeout(self.context.options.timeout_total)
-
-        while not self.debugger.is_finished:
-            breakpoint_timeout = Timeout(self.context.options.timeout_breakpoint)
-            while self.debugger.is_running and not timed_out:
-                # Check to see whether we've timed out while we're waiting.
-                if total_timeout.timed_out():
-                    self.context.logger.error(
-                        "Debugger session has been "
-                        f"running for {total_timeout.elapsed}s, timeout reached!"
-                    )
-                    timed_out = True
-                if breakpoint_timeout.timed_out():
-                    self.context.logger.error(
-                        f"Debugger session has not "
-                        f"hit a breakpoint for {breakpoint_timeout.elapsed}s, timeout "
-                        "reached!"
-                    )
-                    timed_out = True
-
-            if timed_out:
-                break
-
-            step_info = self.debugger.get_step_info(self._watches, self._step_index)
-            if step_info.current_frame:
-                self._step_index += 1
-                update_step_watches(
-                    step_info, self._watches, self.step_collection.commands
-                )
-                self.step_collection.new_step(self.context, step_info)
-
-            bp_to_delete = []
-            for bp_id in self.debugger.get_triggered_breakpoint_ids():
-                try:
-                    # See if this is one of our leading breakpoints.
-                    bpr = self._leading_bp_handles[bp_id]
-                except KeyError:
-                    # This is a trailing bp. Mark it for removal.
-                    bp_to_delete.append(bp_id)
-                    continue
-
-                bpr.add_hit()
-                if bpr.should_be_removed():
-                    if bpr.finish_on_remove:
-                        exit_desired = True
-                    bp_to_delete.append(bp_id)
-                    del self._leading_bp_handles[bp_id]
-                # Add a range of trailing breakpoints covering the lines
-                # requested in the DexLimitSteps command. Ignore first line as
-                # that's covered by the leading bp we just hit and include the
-                # final line.
-                for line in range(bpr.range_from + 1, bpr.range_to + 1):
-                    self.debugger.add_breakpoint(bpr.path, line)
-
-            # Remove any trailing or expired leading breakpoints we just hit.
-            self.debugger.delete_breakpoints(bp_to_delete)
-
-            if exit_desired:
-                break
-            self.debugger.go()
-            time.sleep(self._pause_between_steps)
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/ControllerHelpers.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/ControllerHelpers.py
deleted file mode 100644
index 3e5a7b919d7032..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/ControllerHelpers.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-import os
-from itertools import chain
-
-
-def in_source_file(source_files, step_info):
-    if not step_info.current_frame:
-        return False
-    if not step_info.current_location.path:
-        return False
-    if not os.path.exists(step_info.current_location.path):
-        return False
-    return any(
-        os.path.samefile(step_info.current_location.path, f) for f in source_files
-    )
-
-
-def have_hit_line(watch, loc):
-    if hasattr(watch, "on_line"):
-        return watch.on_line == loc.lineno
-    elif hasattr(watch, "_from_line"):
-        return watch._from_line <= loc.lineno and watch._to_line >= loc.lineno
-    elif watch.lineno == loc.lineno:
-        return True
-    return False
-
-
-def update_step_watches(step_info, watches, commands):
-    watch_cmds = ["DexUnreachable", "DexExpectStepOrder"]
-    towatch = chain.from_iterable(commands[x] for x in watch_cmds if x in commands)
-    try:
-        # Iterate over all watches of the types named in watch_cmds
-        for watch in towatch:
-            loc = step_info.current_location
-            if (
-                loc.path != None
-                and os.path.exists(loc.path)
-                and os.path.samefile(watch.path, loc.path)
-                and have_hit_line(watch, loc)
-            ):
-                result = watch.eval(step_info)
-                step_info.watches.update(result)
-                break
-    except KeyError:
-        pass
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/DebuggerControllerBase.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/DebuggerControllerBase.py
deleted file mode 100644
index 4cd44bb9aa2231..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/DebuggerControllerBase.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Abstract Base class for controlling debuggers."""
-
-import abc
-
-
-class DebuggerControllerBase(object, metaclass=abc.ABCMeta):
-    def __init__(self, context, step_collection):
-        self.context = context
-        self.step_collection = step_collection
-
-    @abc.abstractclassmethod
-    def _run_debugger_custom(self):
-        """Specify your own implementation of run_debugger_custom in your own
-        controller.
-        """
-        pass
-
-    def run_debugger(self, debugger):
-        """Responsible for correctly launching and tearing down the debugger."""
-        self.debugger = debugger
-
-        # Fetch command line options, if any.
-        the_cmdline = []
-        commands = self.step_collection.commands
-        if "DexCommandLine" in commands:
-            cmd_line_objs = commands["DexCommandLine"]
-            assert len(cmd_line_objs) == 1
-            cmd_line_obj = cmd_line_objs[0]
-            the_cmdline = cmd_line_obj.the_cmdline
-
-        with self.debugger:
-            if not self.debugger.loading_error:
-                self._run_debugger_custom(the_cmdline)
-
-        # We may need to pickle this debugger controller after running the
-        # debugger. Debuggers are not picklable objects, so set to None.
-        self.debugger = None
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/DefaultController.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/DefaultController.py
deleted file mode 100644
index 709bd76e2050cb..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/DebuggerControllers/DefaultController.py
+++ /dev/null
@@ -1,139 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Default class for controlling debuggers."""
-
-from itertools import chain
-import os
-import time
-
-from dex.debugger.DebuggerControllers.DebuggerControllerBase import (
-    DebuggerControllerBase,
-)
-from dex.debugger.DebuggerControllers.ControllerHelpers import (
-    in_source_file,
-    update_step_watches,
-)
-from dex.utils.Exceptions import DebuggerException, LoadDebuggerException
-from dex.utils.Timeout import Timeout
-
-
-class EarlyExitCondition(object):
-    def __init__(self, on_line, hit_count, expression, values):
-        self.on_line = on_line
-        self.hit_count = hit_count
-        self.expression = expression
-        self.values = values
-
-
-class DefaultController(DebuggerControllerBase):
-    def __init__(self, context, step_collection):
-        self.source_files = context.options.source_files
-        self.watches = set()
-        self.step_index = 0
-        super(DefaultController, self).__init__(context, step_collection)
-
-    def _break_point_all_lines(self):
-        for s in self.context.options.source_files:
-            with open(s, "r") as fp:
-                num_lines = len(fp.readlines())
-            for line in range(1, num_lines + 1):
-                try:
-                    self.debugger.add_breakpoint(s, line)
-                except DebuggerException:
-                    raise LoadDebuggerException(DebuggerException.msg)
-
-    def _get_early_exit_conditions(self):
-        commands = self.step_collection.commands
-        early_exit_conditions = []
-        if "DexFinishTest" in commands:
-            finish_commands = commands["DexFinishTest"]
-            for fc in finish_commands:
-                condition = EarlyExitCondition(
-                    on_line=fc.on_line,
-                    hit_count=fc.hit_count,
-                    expression=fc.expression,
-                    values=fc.values,
-                )
-                early_exit_conditions.append(condition)
-        return early_exit_conditions
-
-    def _should_exit(self, early_exit_conditions, line_no):
-        for condition in early_exit_conditions:
-            if condition.on_line == line_no:
-                exit_condition_hit = condition.expression is None
-                if condition.expression is not None:
-                    # For the purposes of consistent behaviour with the
-                    # Conditional Controller, check equality in the debugger
-                    # rather than in python (as the two can differ).
-                    for value in condition.values:
-                        expr_val = self.debugger.evaluate_expression(
-                            f"({condition.expression}) == ({value})"
-                        )
-                        if expr_val.value == "true":
-                            exit_condition_hit = True
-                            break
-                if exit_condition_hit:
-                    if condition.hit_count <= 0:
-                        return True
-                    else:
-                        condition.hit_count -= 1
-        return False
-
-    def _run_debugger_custom(self, cmdline):
-        self.step_collection.debugger = self.debugger.debugger_info
-        self._break_point_all_lines()
-        self.debugger.launch(cmdline)
-        for command_obj in chain.from_iterable(self.step_collection.commands.values()):
-            self.watches.update(command_obj.get_watches())
-        early_exit_conditions = self._get_early_exit_conditions()
-        timed_out = False
-        total_timeout = Timeout(self.context.options.timeout_total)
-        max_steps = self.context.options.max_steps
-        for _ in range(max_steps):
-            breakpoint_timeout = Timeout(self.context.options.timeout_breakpoint)
-            while self.debugger.is_running and not timed_out:
-                # Check to see whether we've timed out while we're waiting.
-                if total_timeout.timed_out():
-                    self.context.logger.error(
-                        "Debugger session has been "
-                        f"running for {total_timeout.elapsed}s, timeout reached!"
-                    )
-                    timed_out = True
-                if breakpoint_timeout.timed_out():
-                    self.context.logger.error(
-                        f"Debugger session has not "
-                        f"hit a breakpoint for {breakpoint_timeout.elapsed}s, timeout "
-                        "reached!"
-                    )
-                    timed_out = True
-
-            if timed_out or self.debugger.is_finished:
-                break
-
-            self.step_index += 1
-            step_info = self.debugger.get_step_info(self.watches, self.step_index)
-
-            if step_info.current_frame:
-                update_step_watches(
-                    step_info, self.watches, self.step_collection.commands
-                )
-                self.step_collection.new_step(self.context, step_info)
-                if self._should_exit(
-                    early_exit_conditions, step_info.current_frame.loc.lineno
-                ):
-                    break
-
-            if in_source_file(self.source_files, step_info):
-                self.debugger.step()
-            else:
-                self.debugger.go()
-
-            time.sleep(self.context.options.pause_between_steps)
-        else:
-            raise DebuggerException(
-                "maximum number of steps reached ({})".format(max_steps)
-            )
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/Debuggers.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/Debuggers.py
deleted file mode 100644
index 1b0d4d5871cbeb..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/Debuggers.py
+++ /dev/null
@@ -1,334 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Discover potential/available debugger interfaces."""
-
-from collections import OrderedDict
-import os
-import pickle
-import platform
-import subprocess
-import sys
-from tempfile import NamedTemporaryFile
-
-from dex.command import get_command_infos
-from dex.dextIR import DextIR
-from dex.utils import get_root_directory, Timer
-from dex.utils.Environment import is_native_windows
-from dex.utils.Exceptions import ToolArgumentError
-from dex.utils.Exceptions import DebuggerException
-
-from dex.debugger.DebuggerControllers.DefaultController import DefaultController
-
-from dex.debugger.dbgeng.dbgeng import DbgEng
-from dex.debugger.lldb.LLDB import LLDB
-from dex.debugger.visualstudio.VisualStudio2015 import VisualStudio2015
-from dex.debugger.visualstudio.VisualStudio2017 import VisualStudio2017
-from dex.debugger.visualstudio.VisualStudio2019 import VisualStudio2019
-from dex.debugger.visualstudio.VisualStudio2022 import VisualStudio2022
-
-
-def _get_potential_debuggers():  # noqa
-    """Return a dict of the supported debuggers.
-    Returns:
-        { name (str): debugger (class) }
-    """
-    return {
-        DbgEng.get_option_name(): DbgEng,
-        LLDB.get_option_name(): LLDB,
-        VisualStudio2015.get_option_name(): VisualStudio2015,
-        VisualStudio2017.get_option_name(): VisualStudio2017,
-        VisualStudio2019.get_option_name(): VisualStudio2019,
-        VisualStudio2022.get_option_name(): VisualStudio2022,
-    }
-
-
-def _warn_meaningless_option(context, option):
-    if hasattr(context.options, "list_debuggers"):
-        return
-
-    context.logger.warning(
-        f'option "{option}" is meaningless with this debugger',
-        enable_prefix=True,
-        flag=f"--debugger={context.options.debugger}",
-    )
-
-
-def add_debugger_tool_base_arguments(parser, defaults):
-    defaults.lldb_executable = "lldb.exe" if is_native_windows() else "lldb"
-    parser.add_argument(
-        "--lldb-executable",
-        type=str,
-        metavar="<file>",
-        default=None,
-        display_default=defaults.lldb_executable,
-        help="location of LLDB executable",
-    )
-
-
-def add_debugger_tool_arguments(parser, context, defaults):
-    debuggers = Debuggers(context)
-    potential_debuggers = sorted(debuggers.potential_debuggers().keys())
-
-    add_debugger_tool_base_arguments(parser, defaults)
-
-    parser.add_argument(
-        "--debugger",
-        type=str,
-        choices=potential_debuggers,
-        required=True,
-        help="debugger to use",
-    )
-    parser.add_argument(
-        "--max-steps",
-        metavar="<int>",
-        type=int,
-        default=1000,
-        help="maximum number of program steps allowed",
-    )
-    parser.add_argument(
-        "--pause-between-steps",
-        metavar="<seconds>",
-        type=float,
-        default=0.0,
-        help="number of seconds to pause between steps",
-    )
-    defaults.show_debugger = False
-    parser.add_argument(
-        "--show-debugger", action="store_true", default=None, help="show the debugger"
-    )
-    defaults.arch = platform.machine()
-    parser.add_argument(
-        "--arch",
-        type=str,
-        metavar="<architecture>",
-        default=None,
-        display_default=defaults.arch,
-        help="target architecture",
-    )
-    defaults.source_root_dir = ""
-    parser.add_argument(
-        "--source-root-dir",
-        type=str,
-        metavar="<directory>",
-        default=None,
-        help="source root directory",
-    )
-    parser.add_argument(
-        "--debugger-use-relative-paths",
-        action="store_true",
-        default=False,
-        help="pass the debugger paths relative to --source-root-dir",
-    )
-    parser.add_argument(
-        "--target-run-args",
-        type=str,
-        metavar="<flags>",
-        default="",
-        help="command line arguments for the test program, in addition to any "
-        "provided by DexCommandLine",
-    )
-    parser.add_argument(
-        "--timeout-total",
-        metavar="<seconds>",
-        type=float,
-        default=0.0,
-        help="if >0, debugger session will automatically exit after "
-        "running for <timeout-total> seconds",
-    )
-    parser.add_argument(
-        "--timeout-breakpoint",
-        metavar="<seconds>",
-        type=float,
-        default=0.0,
-        help="if >0, debugger session will automatically exit after "
-        "waiting <timeout-breakpoint> seconds without hitting a "
-        "breakpoint",
-    )
-
-
-def handle_debugger_tool_base_options(context, defaults):  # noqa
-    options = context.options
-
-    if options.lldb_executable is None:
-        options.lldb_executable = defaults.lldb_executable
-    else:
-        if getattr(options, "debugger", "lldb") != "lldb":
-            _warn_meaningless_option(context, "--lldb-executable")
-
-        options.lldb_executable = os.path.abspath(options.lldb_executable)
-        if not os.path.isfile(options.lldb_executable):
-            raise ToolArgumentError(
-                '<d>could not find</> <r>"{}"</>'.format(options.lldb_executable)
-            )
-
-
-def handle_debugger_tool_options(context, defaults):  # noqa
-    options = context.options
-
-    handle_debugger_tool_base_options(context, defaults)
-
-    if options.arch is None:
-        options.arch = defaults.arch
-    else:
-        if options.debugger != "lldb":
-            _warn_meaningless_option(context, "--arch")
-
-    if options.show_debugger is None:
-        options.show_debugger = defaults.show_debugger
-    else:
-        if options.debugger == "lldb":
-            _warn_meaningless_option(context, "--show-debugger")
-
-    if options.source_root_dir != None:
-        if not os.path.isabs(options.source_root_dir):
-            raise ToolArgumentError(
-                f'<d>--source-root-dir: expected absolute path, got</> <r>"{options.source_root_dir}"</>'
-            )
-        if not os.path.isdir(options.source_root_dir):
-            raise ToolArgumentError(
-                f'<d>--source-root-dir: could not find directory</> <r>"{options.source_root_dir}"</>'
-            )
-
-    if options.debugger_use_relative_paths:
-        if not options.source_root_dir:
-            raise ToolArgumentError(
-                f"<d>--debugger-relative-paths</> <r>requires --source-root-dir</>"
-            )
-
-
-def run_debugger_subprocess(debugger_controller, working_dir_path):
-    with NamedTemporaryFile(dir=working_dir_path, delete=False, mode="wb") as fp:
-        pickle.dump(debugger_controller, fp, protocol=pickle.HIGHEST_PROTOCOL)
-        controller_path = fp.name
-
-    dexter_py = os.path.basename(sys.argv[0])
-    if not os.path.isfile(dexter_py):
-        dexter_py = os.path.join(get_root_directory(), "..", dexter_py)
-    assert os.path.isfile(dexter_py)
-
-    with NamedTemporaryFile(dir=working_dir_path) as fp:
-        args = [
-            sys.executable,
-            dexter_py,
-            "run-debugger-internal-",
-            controller_path,
-            "--working-directory={}".format(working_dir_path),
-            "--unittest=off",
-            "--indent-timer-level={}".format(Timer.indent + 2),
-        ]
-        try:
-            with Timer("running external debugger process"):
-                subprocess.check_call(args)
-        except subprocess.CalledProcessError as e:
-            raise DebuggerException(e)
-
-    with open(controller_path, "rb") as fp:
-        debugger_controller = pickle.load(fp)
-    return debugger_controller
-
-
-class Debuggers(object):
-    @classmethod
-    def potential_debuggers(cls):
-        try:
-            return cls._potential_debuggers
-        except AttributeError:
-            cls._potential_debuggers = _get_potential_debuggers()
-            return cls._potential_debuggers
-
-    def __init__(self, context):
-        self.context = context
-
-    def load(self, key):
-        with Timer("load {}".format(key)):
-            return Debuggers.potential_debuggers()[key](self.context)
-
-    def _populate_debugger_cache(self):
-        debuggers = []
-        for key in sorted(Debuggers.potential_debuggers()):
-            debugger = self.load(key)
-
-            class LoadedDebugger(object):
-                pass
-
-            LoadedDebugger.option_name = key
-            LoadedDebugger.full_name = "[{}]".format(debugger.name)
-            LoadedDebugger.is_available = debugger.is_available
-
-            if LoadedDebugger.is_available:
-                try:
-                    LoadedDebugger.version = debugger.version.splitlines()
-                except AttributeError:
-                    LoadedDebugger.version = [""]
-            else:
-                try:
-                    LoadedDebugger.error = debugger.loading_error.splitlines()
-                except AttributeError:
-                    LoadedDebugger.error = [""]
-
-                try:
-                    LoadedDebugger.error_trace = debugger.loading_error_trace
-                except AttributeError:
-                    LoadedDebugger.error_trace = None
-
-            debuggers.append(LoadedDebugger)
-        return debuggers
-
-    def list(self):
-        debuggers = self._populate_debugger_cache()
-
-        max_o_len = max(len(d.option_name) for d in debuggers)
-        max_n_len = max(len(d.full_name) for d in debuggers)
-
-        msgs = []
-
-        for d in debuggers:
-            # Option name, right padded with spaces for alignment
-            option_name = "{{name: <{}}}".format(max_o_len).format(name=d.option_name)
-
-            # Full name, right padded with spaces for alignment
-            full_name = "{{name: <{}}}".format(max_n_len).format(name=d.full_name)
-
-            if d.is_available:
-                name = "<b>{} {}</>".format(option_name, full_name)
-
-                # If the debugger is available, show the first line of the
-                #  version info.
-                available = "<g>YES</>"
-                info = "<b>({})</>".format(d.version[0])
-            else:
-                name = "<y>{} {}</>".format(option_name, full_name)
-
-                # If the debugger is not available, show the first line of the
-                # error reason.
-                available = "<r>NO</> "
-                info = "<y>({})</>".format(d.error[0])
-
-            msg = "{} {} {}".format(name, available, info)
-
-            if self.context.options.verbose:
-                # If verbose mode and there was more version or error output
-                # than could be displayed in a single line, display the whole
-                # lot slightly indented.
-                verbose_info = None
-                if d.is_available:
-                    if d.version[1:]:
-                        verbose_info = d.version + ["\n"]
-                else:
-                    # Some of list elems may contain multiple lines, so make
-                    # sure each elem is a line of its own.
-                    verbose_info = d.error_trace
-
-                if verbose_info:
-                    verbose_info = (
-                        "\n".join("        {}".format(l.rstrip()) for l in verbose_info)
-                        + "\n"
-                    )
-                    msg = "{}\n\n{}".format(msg, verbose_info)
-
-            msgs.append(msg)
-        self.context.o.auto("\n{}\n\n".format("\n".join(msgs)))
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/__init__.py
deleted file mode 100644
index 6bd389a1dc9060..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/__init__.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from dex.debugger.Debuggers import Debuggers
-from dex.debugger.DebuggerControllers.DebuggerControllerBase import (
-    DebuggerControllerBase,
-)
-from dex.debugger.DebuggerControllers.DefaultController import DefaultController
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/README.md b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/README.md
deleted file mode 100644
index 208e6289fdabe6..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/README.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# Debugger Engine backend
-
-This directory contains the Dexter backend for the Windows Debugger Engine
-(DbgEng), which powers tools such as WinDbg and CDB.
-
-## Overview
-
-DbgEng is available as a collection of unregistered COM-"like" objects that
-one accesses by calling DebugCreate in DbgEng.dll. The unregistered nature
-means normal COM tooling can't access them; as a result, this backend uses
-ctypes to describe the COM objects and call their methods.
-
-This is obviously not a huge amount of fun; on the other hand, COM has
-maintained ABI compatible interfaces for decades, and nothing is for free.
-
-The dexter backend follows the same formula as others; it creates a process
-and breaks on "main", then steps through the program, observing states and
-stack frames along the way.
-
-## Implementation details
-
-This backend uses a mixture of both APIs for accessing information, and the
-direct command-string interface to DbgEng for performing some actions. We
-have to use the DbgEng stepping interface, or we would effectively be
-building a new debugger, but certain things (like enabling source-line
-stepping) only seem to be possible from the command interface.
-
-Each segment of debugger responsibility has its own COM object: Client,
-Control, Symbols, SymbolGroups, Breakpoint, SystemObjects. In this python
-wrapper, each COM object gets a python object wrapping it. COM methods
-that are relevant to our interests have a python method that wraps the COM
-one and performs data marshalling. Some additional helper methods are added
-to the python objects to extract data.
-
-The majority of the work occurs in setup.py and probe_process.py. The
-former contains routines to launch a process and attach the debugger to
-it, while the latter extracts as much information as possible from a
-stopped process, returning a list of stack frames with associated variable
-information.
-
-## Sharp edges
-
-On process startup, we set a breakpoint on main and then continue running
-to it. This has the potential to never complete -- although of course,
-there's no guarantee that the debuggee will ever do anything anyway.
-
-There doesn't appear to be a way to instruct DbgEng to "step into" a
-function call, thus after reaching main, we scan the module for all
-functions with line numbers in the source directory, and put breakpoints
-on them. An alternative implementation would be putting breakpoints on
-every known line number.
-
-Finally, it's unclear whether arbitrary expressions can be evaluated in
-arbitrary stack frames, although this isn't something that Dexter currently
-supports.
- 
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/__init__.py
deleted file mode 100644
index 78e599de8083f5..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/__init__.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from . import dbgeng
-
-import platform
-
-if platform.system() == "Windows":
-    from . import breakpoint
-    from . import control
-    from . import probe_process
-    from . import setup
-    from . import symbols
-    from . import symgroup
-    from . import sysobjs
-    from . import utils
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/breakpoint.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/breakpoint.py
deleted file mode 100644
index 0bac87328e57e7..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/breakpoint.py
+++ /dev/null
@@ -1,100 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from ctypes import *
-from enum import *
-from functools import partial
-
-from .utils import *
-
-
-class BreakpointTypes(IntEnum):
-    DEBUG_BREAKPOINT_CODE = 0
-    DEBUG_BREAKPOINT_DATA = 1
-    DEBUG_BREAKPOINT_TIME = 2
-    DEBUG_BREAKPOINT_INLINE = 3
-
-
-class BreakpointFlags(IntFlag):
-    DEBUG_BREAKPOINT_GO_ONLY = 0x00000001
-    DEBUG_BREAKPOINT_DEFERRED = 0x00000002
-    DEBUG_BREAKPOINT_ENABLED = 0x00000004
-    DEBUG_BREAKPOINT_ADDER_ONLY = 0x00000008
-    DEBUG_BREAKPOINT_ONE_SHOT = 0x00000010
-
-
-DebugBreakpoint2IID = IID(
-    0x1B278D20,
-    0x79F2,
-    0x426E,
-    IID_Data4_Type(0xA3, 0xF9, 0xC1, 0xDD, 0xF3, 0x75, 0xD4, 0x8E),
-)
-
-
-class DebugBreakpoint2(Structure):
-    pass
-
-
-class DebugBreakpoint2Vtbl(Structure):
-    wrp = partial(WINFUNCTYPE, c_long, POINTER(DebugBreakpoint2))
-    idb_setoffset = wrp(c_ulonglong)
-    idb_setflags = wrp(c_ulong)
-    _fields_ = [
-        ("QueryInterface", c_void_p),
-        ("AddRef", c_void_p),
-        ("Release", c_void_p),
-        ("GetId", c_void_p),
-        ("GetType", c_void_p),
-        ("GetAdder", c_void_p),
-        ("GetFlags", c_void_p),
-        ("AddFlags", c_void_p),
-        ("RemoveFlags", c_void_p),
-        ("SetFlags", idb_setflags),
-        ("GetOffset", c_void_p),
-        ("SetOffset", idb_setoffset),
-        ("GetDataParameters", c_void_p),
-        ("SetDataParameters", c_void_p),
-        ("GetPassCount", c_void_p),
-        ("SetPassCount", c_void_p),
-        ("GetCurrentPassCount", c_void_p),
-        ("GetMatchThreadId", c_void_p),
-        ("SetMatchThreadId", c_void_p),
-        ("GetCommand", c_void_p),
-        ("SetCommand", c_void_p),
-        ("GetOffsetExpression", c_void_p),
-        ("SetOffsetExpression", c_void_p),
-        ("GetParameters", c_void_p),
-        ("GetCommandWide", c_void_p),
-        ("SetCommandWide", c_void_p),
-        ("GetOffsetExpressionWide", c_void_p),
-        ("SetOffsetExpressionWide", c_void_p),
-    ]
-
-
-DebugBreakpoint2._fields_ = [("lpVtbl", POINTER(DebugBreakpoint2Vtbl))]
-
-
-class Breakpoint(object):
-    def __init__(self, breakpoint):
-        self.breakpoint = breakpoint.contents
-        self.vt = self.breakpoint.lpVtbl.contents
-
-    def SetFlags(self, flags):
-        res = self.vt.SetFlags(self.breakpoint, flags)
-        aborter(res, "Breakpoint SetFlags")
-
-    def SetOffset(self, offs):
-        res = self.vt.SetOffset(self.breakpoint, offs)
-        aborter(res, "Breakpoint SetOffset")
-
-    def RemoveFlags(self, flags):
-        res = self.vt.RemoveFlags(self.breakpoint, flags)
-        aborter(res, "Breakpoint RemoveFlags")
-
-    def die(self):
-        self.breakpoint = None
-        self.vt = None
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/client.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/client.py
deleted file mode 100644
index d5fb504be73f4d..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/client.py
+++ /dev/null
@@ -1,237 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from ctypes import *
-from enum import *
-from functools import partial
-
-from .utils import *
-from . import control
-from . import symbols
-from . import sysobjs
-
-
-class DebugAttach(IntFlag):
-    DEBUG_ATTACH_DEFAULT = 0
-    DEBUG_ATTACH_NONINVASIVE = 1
-    DEBUG_ATTACH_EXISTING = 2
-    DEBUG_ATTACH_NONINVASIVE_NO_SUSPEND = 4
-    DEBUG_ATTACH_INVASIVE_NO_INITIAL_BREAK = 8
-    DEBUG_ATTACH_INVASIVE_RESUME_PROCESS = 0x10
-    DEBUG_ATTACH_NONINVASIVE_ALLOW_PARTIAL = 0x20
-
-
-# UUID for DebugClient7 interface.
-DebugClient7IID = IID(
-    0x13586BE3,
-    0x542E,
-    0x481E,
-    IID_Data4_Type(0xB1, 0xF2, 0x84, 0x97, 0xBA, 0x74, 0xF9, 0xA9),
-)
-
-
-class DEBUG_CREATE_PROCESS_OPTIONS(Structure):
-    _fields_ = [
-        ("CreateFlags", c_ulong),
-        ("EngCreateFlags", c_ulong),
-        ("VerifierFlags", c_ulong),
-        ("Reserved", c_ulong),
-    ]
-
-
-class IDebugClient7(Structure):
-    pass
-
-
-class IDebugClient7Vtbl(Structure):
-    wrp = partial(WINFUNCTYPE, c_long, POINTER(IDebugClient7))
-    idc_queryinterface = wrp(POINTER(IID), POINTER(c_void_p))
-    idc_attachprocess = wrp(c_longlong, c_long, c_long)
-    idc_detachprocesses = wrp()
-    idc_terminateprocesses = wrp()
-    idc_createprocessandattach2 = wrp(
-        c_ulonglong, c_char_p, c_void_p, c_ulong, c_char_p, c_char_p, c_ulong, c_ulong
-    )
-    _fields_ = [
-        ("QueryInterface", idc_queryinterface),
-        ("AddRef", c_void_p),
-        ("Release", c_void_p),
-        ("AttachKernel", c_void_p),
-        ("GetKernelConnectionOptions", c_void_p),
-        ("SetKernelConnectionOptions", c_void_p),
-        ("StartProcessServer", c_void_p),
-        ("ConnectProcessServer", c_void_p),
-        ("DisconnectProcessServer", c_void_p),
-        ("GetRunningProcessSystemIds", c_void_p),
-        ("GetRunningProcessSystemIdsByExecutableName", c_void_p),
-        ("GetRunningProcessDescription", c_void_p),
-        ("AttachProcess", idc_attachprocess),
-        ("CreateProcess", c_void_p),
-        ("CreateProcessAndAttach", c_void_p),
-        ("GetProcessOptions", c_void_p),
-        ("AddProcessOptions", c_void_p),
-        ("RemoveProcessOptions", c_void_p),
-        ("SetProcessOptions", c_void_p),
-        ("OpenDumpFile", c_void_p),
-        ("WriteDumpFile", c_void_p),
-        ("ConnectSession", c_void_p),
-        ("StartServer", c_void_p),
-        ("OutputServers", c_void_p),
-        ("TerminateProcesses", idc_terminateprocesses),
-        ("DetachProcesses", idc_detachprocesses),
-        ("EndSession", c_void_p),
-        ("GetExitCode", c_void_p),
-        ("DispatchCallbacks", c_void_p),
-        ("ExitDispatch", c_void_p),
-        ("CreateClient", c_void_p),
-        ("GetInputCallbacks", c_void_p),
-        ("SetInputCallbacks", c_void_p),
-        ("GetOutputCallbacks", c_void_p),
-        ("SetOutputCallbacks", c_void_p),
-        ("GetOutputMask", c_void_p),
-        ("SetOutputMask", c_void_p),
-        ("GetOtherOutputMask", c_void_p),
-        ("SetOtherOutputMask", c_void_p),
-        ("GetOutputWidth", c_void_p),
-        ("SetOutputWidth", c_void_p),
-        ("GetOutputLinePrefix", c_void_p),
-        ("SetOutputLinePrefix", c_void_p),
-        ("GetIdentity", c_void_p),
-        ("OutputIdentity", c_void_p),
-        ("GetEventCallbacks", c_void_p),
-        ("SetEventCallbacks", c_void_p),
-        ("FlushCallbacks", c_void_p),
-        ("WriteDumpFile2", c_void_p),
-        ("AddDumpInformationFile", c_void_p),
-        ("EndProcessServer", c_void_p),
-        ("WaitForProcessServerEnd", c_void_p),
-        ("IsKernelDebuggerEnabled", c_void_p),
-        ("TerminateCurrentProcess", c_void_p),
-        ("DetachCurrentProcess", c_void_p),
-        ("AbandonCurrentProcess", c_void_p),
-        ("GetRunningProcessSystemIdByExecutableNameWide", c_void_p),
-        ("GetRunningProcessDescriptionWide", c_void_p),
-        ("CreateProcessWide", c_void_p),
-        ("CreateProcessAndAttachWide", c_void_p),
-        ("OpenDumpFileWide", c_void_p),
-        ("WriteDumpFileWide", c_void_p),
-        ("AddDumpInformationFileWide", c_void_p),
-        ("GetNumberDumpFiles", c_void_p),
-        ("GetDumpFile", c_void_p),
-        ("GetDumpFileWide", c_void_p),
-        ("AttachKernelWide", c_void_p),
-        ("GetKernelConnectionOptionsWide", c_void_p),
-        ("SetKernelConnectionOptionsWide", c_void_p),
-        ("StartProcessServerWide", c_void_p),
-        ("ConnectProcessServerWide", c_void_p),
-        ("StartServerWide", c_void_p),
-        ("OutputServerWide", c_void_p),
-        ("GetOutputCallbacksWide", c_void_p),
-        ("SetOutputCallbacksWide", c_void_p),
-        ("GetOutputLinePrefixWide", c_void_p),
-        ("SetOutputLinePrefixWide", c_void_p),
-        ("GetIdentityWide", c_void_p),
-        ("OutputIdentityWide", c_void_p),
-        ("GetEventCallbacksWide", c_void_p),
-        ("SetEventCallbacksWide", c_void_p),
-        ("CreateProcess2", c_void_p),
-        ("CreateProcess2Wide", c_void_p),
-        ("CreateProcessAndAttach2", idc_createprocessandattach2),
-        ("CreateProcessAndAttach2Wide", c_void_p),
-        ("PushOutputLinePrefix", c_void_p),
-        ("PushOutputLinePrefixWide", c_void_p),
-        ("PopOutputLinePrefix", c_void_p),
-        ("GetNumberInputCallbacks", c_void_p),
-        ("GetNumberOutputCallbacks", c_void_p),
-        ("GetNumberEventCallbacks", c_void_p),
-        ("GetQuitLockString", c_void_p),
-        ("SetQuitLockString", c_void_p),
-        ("GetQuitLockStringWide", c_void_p),
-        ("SetQuitLockStringWide", c_void_p),
-        ("SetEventContextCallbacks", c_void_p),
-        ("SetClientContext", c_void_p),
-    ]
-
-
-IDebugClient7._fields_ = [("lpVtbl", POINTER(IDebugClient7Vtbl))]
-
-
-class Client(object):
-    def __init__(self):
-        DbgEng = WinDLL("DbgEng")
-        DbgEng.DebugCreate.argtypes = [POINTER(IID), POINTER(POINTER(IDebugClient7))]
-        DbgEng.DebugCreate.restype = c_ulong
-
-        # Call DebugCreate to create a new debug client
-        ptr = POINTER(IDebugClient7)()
-        res = DbgEng.DebugCreate(byref(DebugClient7IID), ptr)
-        aborter(res, "DebugCreate")
-        self.client = ptr.contents
-        self.vt = vt = self.client.lpVtbl.contents
-
-        def QI(iface, ptr):
-            return vt.QueryInterface(self.client, byref(iface), byref(ptr))
-
-        # Query for a control object
-        ptr = c_void_p()
-        res = QI(control.DebugControl7IID, ptr)
-        aborter(res, "QueryInterface control")
-        self.control_ptr = cast(ptr, POINTER(control.IDebugControl7))
-        self.Control = control.Control(self.control_ptr)
-
-        # Query for a SystemObjects object
-        ptr = c_void_p()
-        res = QI(sysobjs.DebugSystemObjects4IID, ptr)
-        aborter(res, "QueryInterface sysobjects")
-        self.sysobjects_ptr = cast(ptr, POINTER(sysobjs.IDebugSystemObjects4))
-        self.SysObjects = sysobjs.SysObjects(self.sysobjects_ptr)
-
-        # Query for a Symbols object
-        ptr = c_void_p()
-        res = QI(symbols.DebugSymbols5IID, ptr)
-        aborter(res, "QueryInterface debugsymbosl5")
-        self.symbols_ptr = cast(ptr, POINTER(symbols.IDebugSymbols5))
-        self.Symbols = symbols.Symbols(self.symbols_ptr)
-
-    def AttachProcess(self, pid):
-        # Zero process-server id means no process-server.
-        res = self.vt.AttachProcess(
-            self.client, 0, pid, DebugAttach.DEBUG_ATTACH_DEFAULT
-        )
-        aborter(res, "AttachProcess")
-        return
-
-    def DetachProcesses(self):
-        res = self.vt.DetachProcesses(self.client)
-        aborter(res, "DetachProcesses")
-        return
-
-    def TerminateProcesses(self):
-        res = self.vt.TerminateProcesses(self.client)
-        aborter(res, "TerminateProcesses")
-        return
-
-    def CreateProcessAndAttach2(self, cmdline):
-        options = DEBUG_CREATE_PROCESS_OPTIONS()
-        options.CreateFlags = 0x2  # DEBUG_ONLY_THIS_PROCESS
-        options.EngCreateFlags = 0
-        options.VerifierFlags = 0
-        options.Reserved = 0
-        attach_flags = 0
-        res = self.vt.CreateProcessAndAttach2(
-            self.client,
-            0,
-            cmdline.encode("ascii"),
-            byref(options),
-            sizeof(options),
-            None,
-            None,
-            0,
-            attach_flags,
-        )
-        aborter(res, "CreateProcessAndAttach2")
-        return
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/control.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/control.py
deleted file mode 100644
index e370738c3776d3..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/control.py
+++ /dev/null
@@ -1,450 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from ctypes import *
-from functools import partial
-
-from .utils import *
-from .breakpoint import *
-
-
-class DEBUG_STACK_FRAME_EX(Structure):
-    _fields_ = [
-        ("InstructionOffset", c_ulonglong),
-        ("ReturnOffset", c_ulonglong),
-        ("FrameOffset", c_ulonglong),
-        ("StackOffset", c_ulonglong),
-        ("FuncTableEntry", c_ulonglong),
-        ("Params", c_ulonglong * 4),
-        ("Reserved", c_ulonglong * 6),
-        ("Virtual", c_bool),
-        ("FrameNumber", c_ulong),
-        ("InlineFrameContext", c_ulong),
-        ("Reserved1", c_ulong),
-    ]
-
-
-PDEBUG_STACK_FRAME_EX = POINTER(DEBUG_STACK_FRAME_EX)
-
-
-class DEBUG_VALUE_U(Union):
-    _fields_ = [
-        ("I8", c_byte),
-        ("I16", c_short),
-        ("I32", c_int),
-        ("I64", c_long),
-        ("F32", c_float),
-        ("F64", c_double),
-        ("RawBytes", c_ubyte * 24),  # Force length to 24b.
-    ]
-
-
-class DEBUG_VALUE(Structure):
-    _fields_ = [("U", DEBUG_VALUE_U), ("TailOfRawBytes", c_ulong), ("Type", c_ulong)]
-
-
-PDEBUG_VALUE = POINTER(DEBUG_VALUE)
-
-
-class DebugValueType(IntEnum):
-    DEBUG_VALUE_INVALID = 0
-    DEBUG_VALUE_INT8 = 1
-    DEBUG_VALUE_INT16 = 2
-    DEBUG_VALUE_INT32 = 3
-    DEBUG_VALUE_INT64 = 4
-    DEBUG_VALUE_FLOAT32 = 5
-    DEBUG_VALUE_FLOAT64 = 6
-    DEBUG_VALUE_FLOAT80 = 7
-    DEBUG_VALUE_FLOAT82 = 8
-    DEBUG_VALUE_FLOAT128 = 9
-    DEBUG_VALUE_VECTOR64 = 10
-    DEBUG_VALUE_VECTOR128 = 11
-    DEBUG_VALUE_TYPES = 12
-
-
-# UUID for DebugControl7 interface.
-DebugControl7IID = IID(
-    0xB86FB3B1,
-    0x80D4,
-    0x475B,
-    IID_Data4_Type(0xAE, 0xA3, 0xCF, 0x06, 0x53, 0x9C, 0xF6, 0x3A),
-)
-
-
-class IDebugControl7(Structure):
-    pass
-
-
-class IDebugControl7Vtbl(Structure):
-    wrp = partial(WINFUNCTYPE, c_long, POINTER(IDebugControl7))
-    idc_getnumbereventfilters = wrp(c_ulong_p, c_ulong_p, c_ulong_p)
-    idc_setexceptionfiltersecondcommand = wrp(c_ulong, c_char_p)
-    idc_waitforevent = wrp(c_long, c_long)
-    idc_execute = wrp(c_long, c_char_p, c_long)
-    idc_setexpressionsyntax = wrp(c_ulong)
-    idc_addbreakpoint2 = wrp(c_ulong, c_ulong, POINTER(POINTER(DebugBreakpoint2)))
-    idc_setexecutionstatus = wrp(c_ulong)
-    idc_getexecutionstatus = wrp(c_ulong_p)
-    idc_getstacktraceex = wrp(
-        c_ulonglong, c_ulonglong, c_ulonglong, PDEBUG_STACK_FRAME_EX, c_ulong, c_ulong_p
-    )
-    idc_evaluate = wrp(c_char_p, c_ulong, PDEBUG_VALUE, c_ulong_p)
-    idc_setengineoptions = wrp(c_ulong)
-    _fields_ = [
-        ("QueryInterface", c_void_p),
-        ("AddRef", c_void_p),
-        ("Release", c_void_p),
-        ("GetInterrupt", c_void_p),
-        ("SetInterrupt", c_void_p),
-        ("GetInterruptTimeout", c_void_p),
-        ("SetInterruptTimeout", c_void_p),
-        ("GetLogFile", c_void_p),
-        ("OpenLogFile", c_void_p),
-        ("CloseLogFile", c_void_p),
-        ("GetLogMask", c_void_p),
-        ("SetLogMask", c_void_p),
-        ("Input", c_void_p),
-        ("ReturnInput", c_void_p),
-        ("Output", c_void_p),
-        ("OutputVaList", c_void_p),
-        ("ControlledOutput", c_void_p),
-        ("ControlledOutputVaList", c_void_p),
-        ("OutputPrompt", c_void_p),
-        ("OutputPromptVaList", c_void_p),
-        ("GetPromptText", c_void_p),
-        ("OutputCurrentState", c_void_p),
-        ("OutputVersionInformation", c_void_p),
-        ("GetNotifyEventHandle", c_void_p),
-        ("SetNotifyEventHandle", c_void_p),
-        ("Assemble", c_void_p),
-        ("Disassemble", c_void_p),
-        ("GetDisassembleEffectiveOffset", c_void_p),
-        ("OutputDisassembly", c_void_p),
-        ("OutputDisassemblyLines", c_void_p),
-        ("GetNearInstruction", c_void_p),
-        ("GetStackTrace", c_void_p),
-        ("GetReturnOffset", c_void_p),
-        ("OutputStackTrace", c_void_p),
-        ("GetDebuggeeType", c_void_p),
-        ("GetActualProcessorType", c_void_p),
-        ("GetExecutingProcessorType", c_void_p),
-        ("GetNumberPossibleExecutingProcessorTypes", c_void_p),
-        ("GetPossibleExecutingProcessorTypes", c_void_p),
-        ("GetNumberProcessors", c_void_p),
-        ("GetSystemVersion", c_void_p),
-        ("GetPageSize", c_void_p),
-        ("IsPointer64Bit", c_void_p),
-        ("ReadBugCheckData", c_void_p),
-        ("GetNumberSupportedProcessorTypes", c_void_p),
-        ("GetSupportedProcessorTypes", c_void_p),
-        ("GetProcessorTypeNames", c_void_p),
-        ("GetEffectiveProcessorType", c_void_p),
-        ("SetEffectiveProcessorType", c_void_p),
-        ("GetExecutionStatus", idc_getexecutionstatus),
-        ("SetExecutionStatus", idc_setexecutionstatus),
-        ("GetCodeLevel", c_void_p),
-        ("SetCodeLevel", c_void_p),
-        ("GetEngineOptions", c_void_p),
-        ("AddEngineOptions", c_void_p),
-        ("RemoveEngineOptions", c_void_p),
-        ("SetEngineOptions", idc_setengineoptions),
-        ("GetSystemErrorControl", c_void_p),
-        ("SetSystemErrorControl", c_void_p),
-        ("GetTextMacro", c_void_p),
-        ("SetTextMacro", c_void_p),
-        ("GetRadix", c_void_p),
-        ("SetRadix", c_void_p),
-        ("Evaluate", idc_evaluate),
-        ("CoerceValue", c_void_p),
-        ("CoerceValues", c_void_p),
-        ("Execute", idc_execute),
-        ("ExecuteCommandFile", c_void_p),
-        ("GetNumberBreakpoints", c_void_p),
-        ("GetBreakpointByIndex", c_void_p),
-        ("GetBreakpointById", c_void_p),
-        ("GetBreakpointParameters", c_void_p),
-        ("AddBreakpoint", c_void_p),
-        ("RemoveBreakpoint", c_void_p),
-        ("AddExtension", c_void_p),
-        ("RemoveExtension", c_void_p),
-        ("GetExtensionByPath", c_void_p),
-        ("CallExtension", c_void_p),
-        ("GetExtensionFunction", c_void_p),
-        ("GetWindbgExtensionApis32", c_void_p),
-        ("GetWindbgExtensionApis64", c_void_p),
-        ("GetNumberEventFilters", idc_getnumbereventfilters),
-        ("GetEventFilterText", c_void_p),
-        ("GetEventFilterCommand", c_void_p),
-        ("SetEventFilterCommand", c_void_p),
-        ("GetSpecificFilterParameters", c_void_p),
-        ("SetSpecificFilterParameters", c_void_p),
-        ("GetSpecificFilterArgument", c_void_p),
-        ("SetSpecificFilterArgument", c_void_p),
-        ("GetExceptionFilterParameters", c_void_p),
-        ("SetExceptionFilterParameters", c_void_p),
-        ("GetExceptionFilterSecondCommand", c_void_p),
-        ("SetExceptionFilterSecondCommand", idc_setexceptionfiltersecondcommand),
-        ("WaitForEvent", idc_waitforevent),
-        ("GetLastEventInformation", c_void_p),
-        ("GetCurrentTimeDate", c_void_p),
-        ("GetCurrentSystemUpTime", c_void_p),
-        ("GetDumpFormatFlags", c_void_p),
-        ("GetNumberTextReplacements", c_void_p),
-        ("GetTextReplacement", c_void_p),
-        ("SetTextReplacement", c_void_p),
-        ("RemoveTextReplacements", c_void_p),
-        ("OutputTextReplacements", c_void_p),
-        ("GetAssemblyOptions", c_void_p),
-        ("AddAssemblyOptions", c_void_p),
-        ("RemoveAssemblyOptions", c_void_p),
-        ("SetAssemblyOptions", c_void_p),
-        ("GetExpressionSyntax", c_void_p),
-        ("SetExpressionSyntax", idc_setexpressionsyntax),
-        ("SetExpressionSyntaxByName", c_void_p),
-        ("GetNumberExpressionSyntaxes", c_void_p),
-        ("GetExpressionSyntaxNames", c_void_p),
-        ("GetNumberEvents", c_void_p),
-        ("GetEventIndexDescription", c_void_p),
-        ("GetCurrentEventIndex", c_void_p),
-        ("SetNextEventIndex", c_void_p),
-        ("GetLogFileWide", c_void_p),
-        ("OpenLogFileWide", c_void_p),
-        ("InputWide", c_void_p),
-        ("ReturnInputWide", c_void_p),
-        ("OutputWide", c_void_p),
-        ("OutputVaListWide", c_void_p),
-        ("ControlledOutputWide", c_void_p),
-        ("ControlledOutputVaListWide", c_void_p),
-        ("OutputPromptWide", c_void_p),
-        ("OutputPromptVaListWide", c_void_p),
-        ("GetPromptTextWide", c_void_p),
-        ("AssembleWide", c_void_p),
-        ("DisassembleWide", c_void_p),
-        ("GetProcessrTypeNamesWide", c_void_p),
-        ("GetTextMacroWide", c_void_p),
-        ("SetTextMacroWide", c_void_p),
-        ("EvaluateWide", c_void_p),
-        ("ExecuteWide", c_void_p),
-        ("ExecuteCommandFileWide", c_void_p),
-        ("GetBreakpointByIndex2", c_void_p),
-        ("GetBreakpointById2", c_void_p),
-        ("AddBreakpoint2", idc_addbreakpoint2),
-        ("RemoveBreakpoint2", c_void_p),
-        ("AddExtensionWide", c_void_p),
-        ("GetExtensionByPathWide", c_void_p),
-        ("CallExtensionWide", c_void_p),
-        ("GetExtensionFunctionWide", c_void_p),
-        ("GetEventFilterTextWide", c_void_p),
-        ("GetEventfilterCommandWide", c_void_p),
-        ("SetEventFilterCommandWide", c_void_p),
-        ("GetSpecificFilterArgumentWide", c_void_p),
-        ("SetSpecificFilterArgumentWide", c_void_p),
-        ("GetExceptionFilterSecondCommandWide", c_void_p),
-        ("SetExceptionFilterSecondCommandWider", c_void_p),
-        ("GetLastEventInformationWide", c_void_p),
-        ("GetTextReplacementWide", c_void_p),
-        ("SetTextReplacementWide", c_void_p),
-        ("SetExpressionSyntaxByNameWide", c_void_p),
-        ("GetExpressionSyntaxNamesWide", c_void_p),
-        ("GetEventIndexDescriptionWide", c_void_p),
-        ("GetLogFile2", c_void_p),
-        ("OpenLogFile2", c_void_p),
-        ("GetLogFile2Wide", c_void_p),
-        ("OpenLogFile2Wide", c_void_p),
-        ("GetSystemVersionValues", c_void_p),
-        ("GetSystemVersionString", c_void_p),
-        ("GetSystemVersionStringWide", c_void_p),
-        ("GetContextStackTrace", c_void_p),
-        ("OutputContextStackTrace", c_void_p),
-        ("GetStoredEventInformation", c_void_p),
-        ("GetManagedStatus", c_void_p),
-        ("GetManagedStatusWide", c_void_p),
-        ("ResetManagedStatus", c_void_p),
-        ("GetStackTraceEx", idc_getstacktraceex),
-        ("OutputStackTraceEx", c_void_p),
-        ("GetContextStackTraceEx", c_void_p),
-        ("OutputContextStackTraceEx", c_void_p),
-        ("GetBreakpointByGuid", c_void_p),
-        ("GetExecutionStatusEx", c_void_p),
-        ("GetSynchronizationStatus", c_void_p),
-        ("GetDebuggeeType2", c_void_p),
-    ]
-
-
-IDebugControl7._fields_ = [("lpVtbl", POINTER(IDebugControl7Vtbl))]
-
-
-class DebugStatus(IntEnum):
-    DEBUG_STATUS_NO_CHANGE = 0
-    DEBUG_STATUS_GO = 1
-    DEBUG_STATUS_GO_HANDLED = 2
-    DEBUG_STATUS_GO_NOT_HANDLED = 3
-    DEBUG_STATUS_STEP_OVER = 4
-    DEBUG_STATUS_STEP_INTO = 5
-    DEBUG_STATUS_BREAK = 6
-    DEBUG_STATUS_NO_DEBUGGEE = 7
-    DEBUG_STATUS_STEP_BRANCH = 8
-    DEBUG_STATUS_IGNORE_EVENT = 9
-    DEBUG_STATUS_RESTART_REQUESTED = 10
-    DEBUG_STATUS_REVERSE_GO = 11
-    DEBUG_STATUS_REVERSE_STEP_BRANCH = 12
-    DEBUG_STATUS_REVERSE_STEP_OVER = 13
-    DEBUG_STATUS_REVERSE_STEP_INTO = 14
-    DEBUG_STATUS_OUT_OF_SYNC = 15
-    DEBUG_STATUS_WAIT_INPUT = 16
-    DEBUG_STATUS_TIMEOUT = 17
-
-
-class DebugSyntax(IntEnum):
-    DEBUG_EXPR_MASM = 0
-    DEBUG_EXPR_CPLUSPLUS = 1
-
-
-class Control(object):
-    def __init__(self, control):
-        self.ptr = control
-        self.control = control.contents
-        self.vt = self.control.lpVtbl.contents
-        # Keep a handy ulong for passing into C methods.
-        self.ulong = c_ulong()
-
-    def GetExecutionStatus(self, doprint=False):
-        ret = self.vt.GetExecutionStatus(self.control, byref(self.ulong))
-        aborter(ret, "GetExecutionStatus")
-        status = DebugStatus(self.ulong.value)
-        if doprint:
-            print("Execution status: {}".format(status))
-        return status
-
-    def SetExecutionStatus(self, status):
-        assert isinstance(status, DebugStatus)
-        res = self.vt.SetExecutionStatus(self.control, status.value)
-        aborter(res, "SetExecutionStatus")
-
-    def WaitForEvent(self, timeout=100):
-        # No flags are taken by WaitForEvent, hence 0
-        ret = self.vt.WaitForEvent(self.control, 0, timeout)
-        aborter(ret, "WaitforEvent", ignore=[S_FALSE])
-        return ret
-
-    def GetNumberEventFilters(self):
-        specific_events = c_ulong()
-        specific_exceptions = c_ulong()
-        arbitrary_exceptions = c_ulong()
-        res = self.vt.GetNumberEventFilters(
-            self.control,
-            byref(specific_events),
-            byref(specific_exceptions),
-            byref(arbitrary_exceptions),
-        )
-        aborter(res, "GetNumberEventFilters")
-        return (
-            specific_events.value,
-            specific_exceptions.value,
-            arbitrary_exceptions.value,
-        )
-
-    def SetExceptionFilterSecondCommand(self, index, command):
-        buf = create_string_buffer(command.encode("ascii"))
-        res = self.vt.SetExceptionFilterSecondCommand(self.control, index, buf)
-        aborter(res, "SetExceptionFilterSecondCommand")
-        return
-
-    def AddBreakpoint2(self, offset=None, enabled=None):
-        breakpoint = POINTER(DebugBreakpoint2)()
-        res = self.vt.AddBreakpoint2(
-            self.control,
-            BreakpointTypes.DEBUG_BREAKPOINT_CODE,
-            DEBUG_ANY_ID,
-            byref(breakpoint),
-        )
-        aborter(res, "Add breakpoint 2")
-        bp = Breakpoint(breakpoint)
-
-        if offset is not None:
-            bp.SetOffset(offset)
-        if enabled is not None and enabled:
-            bp.SetFlags(BreakpointFlags.DEBUG_BREAKPOINT_ENABLED)
-
-        return bp
-
-    def RemoveBreakpoint(self, bp):
-        res = self.vt.RemoveBreakpoint2(self.control, bp.breakpoint)
-        aborter(res, "RemoveBreakpoint2")
-        bp.die()
-
-    def GetStackTraceEx(self):
-        # XXX -- I can't find a way to query for how many stack frames there _are_
-        # in  advance. Guess 128 for now.
-        num_frames_buffer = 128
-
-        frames = (DEBUG_STACK_FRAME_EX * num_frames_buffer)()
-        numframes = c_ulong()
-
-        # First three args are frame/stack/IP offsets -- leave them as zero to
-        # default to the current instruction.
-        res = self.vt.GetStackTraceEx(
-            self.control, 0, 0, 0, frames, num_frames_buffer, byref(numframes)
-        )
-        aborter(res, "GetStackTraceEx")
-        return frames, numframes.value
-
-    def Execute(self, command):
-        # First zero is DEBUG_OUTCTL_*, which we leave as a default, second
-        # zero is DEBUG_EXECUTE_* flags, of which we set none.
-        res = self.vt.Execute(self.control, 0, command.encode("ascii"), 0)
-        aborter(res, "Client execute")
-
-    def SetExpressionSyntax(self, cpp=True):
-        if cpp:
-            syntax = DebugSyntax.DEBUG_EXPR_CPLUSPLUS
-        else:
-            syntax = DebugSyntax.DEBUG_EXPR_MASM
-
-        res = self.vt.SetExpressionSyntax(self.control, syntax)
-        aborter(res, "SetExpressionSyntax")
-
-    def Evaluate(self, expr):
-        ptr = DEBUG_VALUE()
-        res = self.vt.Evaluate(
-            self.control,
-            expr.encode("ascii"),
-            DebugValueType.DEBUG_VALUE_INVALID,
-            byref(ptr),
-            None,
-        )
-        aborter(res, "Evaluate", ignore=[E_INTERNALEXCEPTION, E_FAIL])
-        if res != 0:
-            return None
-
-        val_type = DebugValueType(ptr.Type)
-
-        # Here's a map from debug value types to fields. Unclear what happens
-        # with unsigned values, as DbgEng doesn't present any unsigned fields.
-
-        extract_map = {
-            DebugValueType.DEBUG_VALUE_INT8: ("I8", "char"),
-            DebugValueType.DEBUG_VALUE_INT16: ("I16", "short"),
-            DebugValueType.DEBUG_VALUE_INT32: ("I32", "int"),
-            DebugValueType.DEBUG_VALUE_INT64: ("I64", "long"),
-            DebugValueType.DEBUG_VALUE_FLOAT32: ("F32", "float"),
-            DebugValueType.DEBUG_VALUE_FLOAT64: ("F64", "double"),
-        }  # And everything else is invalid.
-
-        if val_type not in extract_map:
-            raise Exception(
-                "Unexpected debug value type {} when evalutaing".format(val_type)
-            )
-
-        # Also produce a type name...
-
-        return getattr(ptr.U, extract_map[val_type][0]), extract_map[val_type][1]
-
-    def SetEngineOptions(self, opt):
-        res = self.vt.SetEngineOptions(self.control, opt)
-        aborter(res, "SetEngineOptions")
-        return
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/dbgeng.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/dbgeng.py
deleted file mode 100644
index 03aa548495ce13..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/dbgeng.py
+++ /dev/null
@@ -1,204 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-import sys
-import os
-import platform
-
-from dex.debugger.DebuggerBase import DebuggerBase, watch_is_active
-from dex.dextIR import FrameIR, LocIR, StepIR, StopReason, ValueIR
-from dex.dextIR import ProgramState, StackFrame, SourceLocation
-from dex.utils.Exceptions import DebuggerException, LoadDebuggerException
-from dex.utils.ReturnCode import ReturnCode
-
-if platform.system() == "Windows":
-    # Don't load on linux; _load_interface will croak before any names are used.
-    from . import setup
-    from . import probe_process
-    from . import breakpoint
-
-
-class DbgEng(DebuggerBase):
-    def __init__(self, context, *args):
-        self.breakpoints = []
-        self.running = False
-        self.finished = False
-        self.step_info = None
-        super(DbgEng, self).__init__(context, *args)
-
-    def _custom_init(self):
-        try:
-            res = setup.setup_everything(self.context.options.executable)
-            self.client = res
-            self.running = True
-        except Exception as e:
-            raise Exception("Failed to start debuggee: {}".format(e))
-
-    def _custom_exit(self):
-        setup.cleanup(self.client)
-
-    def _load_interface(self):
-        arch = platform.architecture()[0]
-        machine = platform.machine()
-        if arch == "32bit" and machine == "AMD64":
-            # This python process is 32 bits, but is sitting on a 64 bit machine.
-            # Bad things may happen, don't support it.
-            raise LoadDebuggerException(
-                "Can't run Dexter dbgeng on 32 bit python in a 64 bit environment"
-            )
-
-        if platform.system() != "Windows":
-            raise LoadDebuggerException("DbgEng supports Windows only")
-
-        # Otherwise, everything was imported earlier
-
-    @classmethod
-    def get_name(cls):
-        return "dbgeng"
-
-    @classmethod
-    def get_option_name(cls):
-        return "dbgeng"
-
-    @property
-    def frames_below_main(self):
-        return []
-
-    @property
-    def version(self):
-        # I don't believe there's a well defined DbgEng version, outside of the
-        # version of Windows being used.
-        return "1"
-
-    def clear_breakpoints(self):
-        for x in self.breakpoints:
-            x.RemoveFlags(breakpoint.BreakpointFlags.DEBUG_BREAKPOINT_ENABLED)
-            self.client.Control.RemoveBreakpoint(x)
-
-    def _add_breakpoint(self, file_, line):
-        # Breakpoint setting/deleting is not supported by dbgeng at this moment
-        # but is something that should be considered in the future.
-        # TODO: this method is called in the DefaultController but has no effect.
-        pass
-
-    def _add_conditional_breakpoint(self, file_, line, condition):
-        # breakpoint setting/deleting is not supported by dbgeng at this moment
-        # but is something that should be considered in the future.
-        raise NotImplementedError(
-            "add_conditional_breakpoint is not yet implemented by dbgeng"
-        )
-
-    def get_triggered_breakpoint_ids(self):
-        raise NotImplementedError(
-            "get_triggered_breakpoint_ids is not yet implemented by dbgeng"
-        )
-
-    def delete_breakpoints(self, ids):
-        # breakpoint setting/deleting is not supported by dbgeng at this moment
-        # but is something that should be considered in the future.
-        raise NotImplementedError(
-            "delete_conditional_breakpoint is not yet implemented by dbgeng"
-        )
-
-    def launch(self, cmdline):
-        assert (
-            len(cmdline) == 0 and not self.context.options.target_run_args
-        ), "Command lines unimplemented for dbgeng right now"
-        # We are, by this point, already launched.
-        self.step_info = probe_process.probe_state(self.client)
-
-    def step(self):
-        res = setup.step_once(self.client)
-        if not res:
-            self.finished = True
-        self.step_info = res
-
-    def go(self):
-        # FIXME: running freely doesn't seem to reliably stop when back in a
-        # relevant source file -- this is likely to be a problem when setting
-        # breakpoints. Until that's fixed, single step instead of running
-        # freely. This isn't very efficient, but at least makes progress.
-        self.step()
-
-    def _get_step_info(self, watches, step_index):
-        frames = self.step_info
-        state_frames = []
-
-        # For now assume the base function is the... function, ignoring
-        # inlining.
-        dex_frames = []
-        for i, x in enumerate(frames):
-            # XXX Might be able to get columns out through
-            # GetSourceEntriesByOffset, not a priority now
-            loc = LocIR(path=x.source_file, lineno=x.line_no, column=0)
-            new_frame = FrameIR(function=x.function_name, is_inlined=False, loc=loc)
-            dex_frames.append(new_frame)
-
-            state_frame = StackFrame(
-                function=new_frame.function,
-                is_inlined=new_frame.is_inlined,
-                location=SourceLocation(path=x.source_file, lineno=x.line_no, column=0),
-                watches={},
-            )
-            for expr in map(
-                # Filter out watches that are not active in the current frame,
-                # and then evaluate all the active watches.
-                lambda watch_info, idx=i: self.evaluate_expression(
-                    watch_info.expression, idx
-                ),
-                filter(
-                    lambda watch_info, idx=i, line_no=loc.lineno, path=loc.path: watch_is_active(
-                        watch_info, path, idx, line_no
-                    ),
-                    watches,
-                ),
-            ):
-                state_frame.watches[expr.expression] = expr
-            state_frames.append(state_frame)
-
-        return StepIR(
-            step_index=step_index,
-            frames=dex_frames,
-            stop_reason=StopReason.STEP,
-            program_state=ProgramState(state_frames),
-        )
-
-    @property
-    def is_running(self):
-        return False  # We're never free-running
-
-    @property
-    def is_finished(self):
-        return self.finished
-
-    def evaluate_expression(self, expression, frame_idx=0):
-        # XXX: cdb insists on using '->' to examine fields of structures,
-        # as it appears to reserve '.' for other purposes.
-        fixed_expr = expression.replace(".", "->")
-
-        orig_scope_idx = self.client.Symbols.GetCurrentScopeFrameIndex()
-        self.client.Symbols.SetScopeFrameByIndex(frame_idx)
-
-        res = self.client.Control.Evaluate(fixed_expr)
-        if res is not None:
-            result, typename = self.client.Control.Evaluate(fixed_expr)
-            could_eval = True
-        else:
-            result, typename = (None, None)
-            could_eval = False
-
-        self.client.Symbols.SetScopeFrameByIndex(orig_scope_idx)
-
-        return ValueIR(
-            expression=expression,
-            value=str(result),
-            type_name=typename,
-            error_string="",
-            could_evaluate=could_eval,
-            is_optimized_away=False,
-            is_irretrievable=not could_eval,
-        )
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/probe_process.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/probe_process.py
deleted file mode 100644
index b47bb3881997fb..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/probe_process.py
+++ /dev/null
@@ -1,83 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-import os
-
-from .utils import *
-
-
-class Frame(object):
-    def __init__(self, frame, idx, Symbols):
-        # Store some base information about the frame
-        self.ip = frame.InstructionOffset
-        self.scope_idx = idx
-        self.virtual = frame.Virtual
-        self.inline_frame_context = frame.InlineFrameContext
-        self.func_tbl_entry = frame.FuncTableEntry
-
-        # Fetch the module/symbol we're in, with displacement. Useful for debugging.
-        self.descr = Symbols.GetNearNameByOffset(self.ip)
-        split = self.descr.split("!")[0]
-        self.module = split[0]
-        self.symbol = split[1]
-
-        # Fetch symbol group for this scope.
-        prevscope = Symbols.GetCurrentScopeFrameIndex()
-        if Symbols.SetScopeFrameByIndex(idx):
-            symgroup = Symbols.GetScopeSymbolGroup2()
-            Symbols.SetScopeFrameByIndex(prevscope)
-            self.symgroup = symgroup
-        else:
-            self.symgroup = None
-
-        # Fetch the name according to the line-table, using inlining context.
-        name = Symbols.GetNameByInlineContext(self.ip, self.inline_frame_context)
-        self.function_name = name.split("!")[-1]
-
-        try:
-            tup = Symbols.GetLineByInlineContext(self.ip, self.inline_frame_context)
-            self.source_file, self.line_no = tup
-        except WinError as e:
-            # Fall back to trying to use a non-inlining-aware line number
-            # XXX - this is not inlining aware
-            sym = Symbols.GetLineByOffset(self.ip)
-            if sym is not None:
-                self.source_file, self.line_no = sym
-            else:
-                self.source_file = None
-                self.line_no = None
-                self.basename = None
-
-        if self.source_file is not None:
-            self.basename = os.path.basename(self.source_file)
-        else:
-            self.basename = None
-
-    def __str__(self):
-        return "{}:{}({}) {}".format(
-            self.basename, self.line, self.descr, self.function_name
-        )
-
-
-def main_on_stack(Symbols, frames):
-    module_name = Symbols.get_exefile_module_name()
-    main_name = "{}!main".format(module_name)
-    for x in frames:
-        if main_name in x.descr:  # Could be less hard coded...
-            return True
-    return False
-
-
-def probe_state(Client):
-    # Fetch the state of the program -- represented by the stack frames.
-    frames, numframes = Client.Control.GetStackTraceEx()
-
-    the_frames = [Frame(frames[x], x, Client.Symbols) for x in range(numframes)]
-    if not main_on_stack(Client.Symbols, the_frames):
-        return None
-
-    return the_frames
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/setup.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/setup.py
deleted file mode 100644
index fab423c488ecae..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/setup.py
+++ /dev/null
@@ -1,157 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from ctypes import *
-
-from . import client
-from . import control
-from . import symbols
-from .probe_process import probe_state
-from .utils import *
-
-
-class STARTUPINFOA(Structure):
-    _fields_ = [
-        ("cb", c_ulong),
-        ("lpReserved", c_char_p),
-        ("lpDesktop", c_char_p),
-        ("lpTitle", c_char_p),
-        ("dwX", c_ulong),
-        ("dwY", c_ulong),
-        ("dwXSize", c_ulong),
-        ("dwYSize", c_ulong),
-        ("dwXCountChars", c_ulong),
-        ("dwYCountChars", c_ulong),
-        ("dwFillAttribute", c_ulong),
-        ("wShowWindow", c_ushort),
-        ("cbReserved2", c_ushort),
-        ("lpReserved2", c_char_p),
-        ("hStdInput", c_void_p),
-        ("hStdOutput", c_void_p),
-        ("hStdError", c_void_p),
-    ]
-
-
-class PROCESS_INFORMATION(Structure):
-    _fields_ = [
-        ("hProcess", c_void_p),
-        ("hThread", c_void_p),
-        ("dwProcessId", c_ulong),
-        ("dwThreadId", c_ulong),
-    ]
-
-
-def fetch_local_function_syms(Symbols, prefix):
-    syms = Symbols.get_all_functions()
-
-    def is_sym_in_src_dir(sym):
-        name, data = sym
-        symdata = Symbols.GetLineByOffset(data.Offset)
-        if symdata is not None:
-            srcfile, line = symdata
-            if prefix in srcfile:
-                return True
-        return False
-
-    syms = [x for x in syms if is_sym_in_src_dir(x)]
-    return syms
-
-
-def break_on_all_but_main(Control, Symbols, main_offset):
-    mainfile, _ = Symbols.GetLineByOffset(main_offset)
-    prefix = "\\".join(mainfile.split("\\")[:-1])
-
-    for name, rec in fetch_local_function_syms(Symbols, prefix):
-        if name == "main":
-            continue
-        bp = Control.AddBreakpoint2(offset=rec.Offset, enabled=True)
-
-    # All breakpoints are currently discarded: we just sys.exit for cleanup
-    return
-
-
-def setup_everything(binfile):
-    from . import client
-    from . import symbols
-
-    Client = client.Client()
-
-    Client.Control.SetEngineOptions(0x20)  # DEBUG_ENGOPT_INITIAL_BREAK
-
-    Client.CreateProcessAndAttach2(binfile)
-
-    # Load lines as well as general symbols
-    sym_opts = Client.Symbols.GetSymbolOptions()
-    sym_opts |= symbols.SymbolOptionFlags.SYMOPT_LOAD_LINES
-    Client.Symbols.SetSymbolOptions(sym_opts)
-
-    # Need to enter the debugger engine to let it attach properly.
-    res = Client.Control.WaitForEvent(timeout=1000)
-    if res == S_FALSE:
-        # The debugee apparently didn't do anything at all. Rather than risk
-        # hanging, bail out at this point.
-        client.TerminateProcesses()
-        raise Exception("Debuggee did not start in a timely manner")
-
-    # Enable line stepping.
-    Client.Control.Execute("l+t")
-    # Enable C++ expression interpretation.
-    Client.Control.SetExpressionSyntax(cpp=True)
-
-    # We've requested to break into the process at the earliest opportunity,
-    # and WaitForEvent'ing means we should have reached that break state.
-    # Now set a breakpoint on the main symbol, and "go" until we reach it.
-    module_name = Client.Symbols.get_exefile_module_name()
-    offset = Client.Symbols.GetOffsetByName("{}!main".format(module_name))
-    breakpoint = Client.Control.AddBreakpoint2(offset=offset, enabled=True)
-    Client.Control.SetExecutionStatus(control.DebugStatus.DEBUG_STATUS_GO)
-
-    # Problem: there is no guarantee that the client will ever reach main,
-    # something else exciting could happen in that time, the host system may
-    # be very loaded, and similar. Wait for some period, say, five seconds, and
-    # abort afterwards: this is a trade-off between spurious timeouts and
-    # completely hanging in the case of a environmental/programming error.
-    res = Client.Control.WaitForEvent(timeout=5000)
-    if res == S_FALSE:
-        client.TerminateProcesses()
-        raise Exception("Debuggee did not reach main function in a timely manner")
-
-    break_on_all_but_main(Client.Control, Client.Symbols, offset)
-
-    # Set the default action on all exceptions to be "quit and detach". If we
-    # don't, dbgeng will merrily spin at the exception site forever.
-    filts = Client.Control.GetNumberEventFilters()
-    for x in range(filts[0], filts[0] + filts[1]):
-        Client.Control.SetExceptionFilterSecondCommand(x, "qd")
-
-    return Client
-
-
-def step_once(client):
-    client.Control.Execute("p")
-    try:
-        client.Control.WaitForEvent()
-    except Exception as e:
-        if (
-            client.Control.GetExecutionStatus()
-            == control.DebugStatus.DEBUG_STATUS_NO_DEBUGGEE
-        ):
-            return None  # Debuggee has gone away, likely due to an exception.
-        raise e
-    # Could assert here that we're in the "break" state
-    client.Control.GetExecutionStatus()
-    return probe_state(client)
-
-
-def main_loop(client):
-    res = True
-    while res is not None:
-        res = step_once(client)
-
-
-def cleanup(client):
-    client.TerminateProcesses()
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/symbols.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/symbols.py
deleted file mode 100644
index 8ba8fad49c0aee..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/symbols.py
+++ /dev/null
@@ -1,606 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from collections import namedtuple
-from ctypes import *
-from enum import *
-from functools import reduce, partial
-
-from .symgroup import SymbolGroup, IDebugSymbolGroup2
-from .utils import *
-
-
-class SymbolOptionFlags(IntFlag):
-    SYMOPT_CASE_INSENSITIVE = 0x00000001
-    SYMOPT_UNDNAME = 0x00000002
-    SYMOPT_DEFERRED_LOADS = 0x00000004
-    SYMOPT_NO_CPP = 0x00000008
-    SYMOPT_LOAD_LINES = 0x00000010
-    SYMOPT_OMAP_FIND_NEAREST = 0x00000020
-    SYMOPT_LOAD_ANYTHING = 0x00000040
-    SYMOPT_IGNORE_CVREC = 0x00000080
-    SYMOPT_NO_UNQUALIFIED_LOADS = 0x00000100
-    SYMOPT_FAIL_CRITICAL_ERRORS = 0x00000200
-    SYMOPT_EXACT_SYMBOLS = 0x00000400
-    SYMOPT_ALLOW_ABSOLUTE_SYMBOLS = 0x00000800
-    SYMOPT_IGNORE_NT_SYMPATH = 0x00001000
-    SYMOPT_INCLUDE_32BIT_MODULES = 0x00002000
-    SYMOPT_PUBLICS_ONLY = 0x00004000
-    SYMOPT_NO_PUBLICS = 0x00008000
-    SYMOPT_AUTO_PUBLICS = 0x00010000
-    SYMOPT_NO_IMAGE_SEARCH = 0x00020000
-    SYMOPT_SECURE = 0x00040000
-    SYMOPT_NO_PROMPTS = 0x00080000
-    SYMOPT_DEBUG = 0x80000000
-
-
-class ScopeGroupFlags(IntFlag):
-    DEBUG_SCOPE_GROUP_ARGUMENTS = 0x00000001
-    DEBUG_SCOPE_GROUP_LOCALS = 0x00000002
-    DEBUG_SCOPE_GROUP_ALL = 0x00000003
-    DEBUG_SCOPE_GROUP_BY_DATAMODEL = 0x00000004
-
-
-class DebugModuleNames(IntEnum):
-    DEBUG_MODNAME_IMAGE = 0x00000000
-    DEBUG_MODNAME_MODULE = 0x00000001
-    DEBUG_MODNAME_LOADED_IMAGE = 0x00000002
-    DEBUG_MODNAME_SYMBOL_FILE = 0x00000003
-    DEBUG_MODNAME_MAPPED_IMAGE = 0x00000004
-
-
-class DebugModuleFlags(IntFlag):
-    DEBUG_MODULE_LOADED = 0x00000000
-    DEBUG_MODULE_UNLOADED = 0x00000001
-    DEBUG_MODULE_USER_MODE = 0x00000002
-    DEBUG_MODULE_EXE_MODULE = 0x00000004
-    DEBUG_MODULE_EXPLICIT = 0x00000008
-    DEBUG_MODULE_SECONDARY = 0x00000010
-    DEBUG_MODULE_SYNTHETIC = 0x00000020
-    DEBUG_MODULE_SYM_BAD_CHECKSUM = 0x00010000
-
-
-class DEBUG_MODULE_PARAMETERS(Structure):
-    _fields_ = [
-        ("Base", c_ulonglong),
-        ("Size", c_ulong),
-        ("TimeDateStamp", c_ulong),
-        ("Checksum", c_ulong),
-        ("Flags", c_ulong),
-        ("SymbolType", c_ulong),
-        ("ImageNameSize", c_ulong),
-        ("ModuleNameSize", c_ulong),
-        ("LoadedImageNameSize", c_ulong),
-        ("SymbolFileNameSize", c_ulong),
-        ("MappedImageNameSize", c_ulong),
-        ("Reserved", c_ulonglong * 2),
-    ]
-
-
-PDEBUG_MODULE_PARAMETERS = POINTER(DEBUG_MODULE_PARAMETERS)
-
-
-class DEBUG_MODULE_AND_ID(Structure):
-    _fields_ = [("ModuleBase", c_ulonglong), ("Id", c_ulonglong)]
-
-
-PDEBUG_MODULE_AND_ID = POINTER(DEBUG_MODULE_AND_ID)
-
-
-class DEBUG_SYMBOL_ENTRY(Structure):
-    _fields_ = [
-        ("ModuleBase", c_ulonglong),
-        ("Offset", c_ulonglong),
-        ("Id", c_ulonglong),
-        ("Arg64", c_ulonglong),
-        ("Size", c_ulong),
-        ("Flags", c_ulong),
-        ("TypeId", c_ulong),
-        ("NameSize", c_ulong),
-        ("Token", c_ulong),
-        ("Tag", c_ulong),
-        ("Arg32", c_ulong),
-        ("Reserved", c_ulong),
-    ]
-
-
-PDEBUG_SYMBOL_ENTRY = POINTER(DEBUG_SYMBOL_ENTRY)
-
-# UUID for DebugSymbols5 interface.
-DebugSymbols5IID = IID(
-    0xC65FA83E,
-    0x1E69,
-    0x475E,
-    IID_Data4_Type(0x8E, 0x0E, 0xB5, 0xD7, 0x9E, 0x9C, 0xC1, 0x7E),
-)
-
-
-class IDebugSymbols5(Structure):
-    pass
-
-
-class IDebugSymbols5Vtbl(Structure):
-    wrp = partial(WINFUNCTYPE, c_long, POINTER(IDebugSymbols5))
-    ids_getsymboloptions = wrp(c_ulong_p)
-    ids_setsymboloptions = wrp(c_ulong)
-    ids_getmoduleparameters = wrp(
-        c_ulong, c_ulong64_p, c_ulong, PDEBUG_MODULE_PARAMETERS
-    )
-    ids_getmodulenamestring = wrp(
-        c_ulong, c_ulong, c_ulonglong, c_char_p, c_ulong, c_ulong_p
-    )
-    ids_getoffsetbyname = wrp(c_char_p, c_ulong64_p)
-    ids_getlinebyoffset = wrp(
-        c_ulonglong, c_ulong_p, c_char_p, c_ulong, c_ulong_p, c_ulong64_p
-    )
-    ids_getsymbolentriesbyname = wrp(
-        c_char_p, c_ulong, PDEBUG_MODULE_AND_ID, c_ulong, c_ulong_p
-    )
-    ids_getsymbolentrystring = wrp(
-        PDEBUG_MODULE_AND_ID, c_ulong, c_char_p, c_ulong, c_ulong_p
-    )
-    ids_getsymbolentryinformation = wrp(PDEBUG_MODULE_AND_ID, PDEBUG_SYMBOL_ENTRY)
-    ids_getcurrentscopeframeindex = wrp(c_ulong_p)
-    ids_getnearnamebyoffset = wrp(
-        c_ulonglong, c_long, c_char_p, c_ulong, c_ulong_p, c_ulong64_p
-    )
-    ids_setscopeframebyindex = wrp(c_ulong)
-    ids_getscopesymbolgroup2 = wrp(
-        c_ulong, POINTER(IDebugSymbolGroup2), POINTER(POINTER(IDebugSymbolGroup2))
-    )
-    ids_getnamebyinlinecontext = wrp(
-        c_ulonglong, c_ulong, c_char_p, c_ulong, c_ulong_p, c_ulong64_p
-    )
-    ids_getlinebyinlinecontext = wrp(
-        c_ulonglong, c_ulong, c_ulong_p, c_char_p, c_ulong, c_ulong_p, c_ulong64_p
-    )
-    _fields_ = [
-        ("QueryInterface", c_void_p),
-        ("AddRef", c_void_p),
-        ("Release", c_void_p),
-        ("GetSymbolOptions", ids_getsymboloptions),
-        ("AddSymbolOptions", c_void_p),
-        ("RemoveSymbolOptions", c_void_p),
-        ("SetSymbolOptions", ids_setsymboloptions),
-        ("GetNameByOffset", c_void_p),
-        ("GetOffsetByName", ids_getoffsetbyname),
-        ("GetNearNameByOffset", ids_getnearnamebyoffset),
-        ("GetLineByOffset", ids_getlinebyoffset),
-        ("GetOffsetByLine", c_void_p),
-        ("GetNumberModules", c_void_p),
-        ("GetModuleByIndex", c_void_p),
-        ("GetModuleByModuleName", c_void_p),
-        ("GetModuleByOffset", c_void_p),
-        ("GetModuleNames", c_void_p),
-        ("GetModuleParameters", ids_getmoduleparameters),
-        ("GetSymbolModule", c_void_p),
-        ("GetTypeName", c_void_p),
-        ("GetTypeId", c_void_p),
-        ("GetTypeSize", c_void_p),
-        ("GetFieldOffset", c_void_p),
-        ("GetSymbolTypeId", c_void_p),
-        ("GetOffsetTypeId", c_void_p),
-        ("ReadTypedDataVirtual", c_void_p),
-        ("WriteTypedDataVirtual", c_void_p),
-        ("OutputTypedDataVirtual", c_void_p),
-        ("ReadTypedDataPhysical", c_void_p),
-        ("WriteTypedDataPhysical", c_void_p),
-        ("OutputTypedDataPhysical", c_void_p),
-        ("GetScope", c_void_p),
-        ("SetScope", c_void_p),
-        ("ResetScope", c_void_p),
-        ("GetScopeSymbolGroup", c_void_p),
-        ("CreateSymbolGroup", c_void_p),
-        ("StartSymbolMatch", c_void_p),
-        ("GetNextSymbolMatch", c_void_p),
-        ("EndSymbolMatch", c_void_p),
-        ("Reload", c_void_p),
-        ("GetSymbolPath", c_void_p),
-        ("SetSymbolPath", c_void_p),
-        ("AppendSymbolPath", c_void_p),
-        ("GetImagePath", c_void_p),
-        ("SetImagePath", c_void_p),
-        ("AppendImagePath", c_void_p),
-        ("GetSourcePath", c_void_p),
-        ("GetSourcePathElement", c_void_p),
-        ("SetSourcePath", c_void_p),
-        ("AppendSourcePath", c_void_p),
-        ("FindSourceFile", c_void_p),
-        ("GetSourceFileLineOffsets", c_void_p),
-        ("GetModuleVersionInformation", c_void_p),
-        ("GetModuleNameString", ids_getmodulenamestring),
-        ("GetConstantName", c_void_p),
-        ("GetFieldName", c_void_p),
-        ("GetTypeOptions", c_void_p),
-        ("AddTypeOptions", c_void_p),
-        ("RemoveTypeOptions", c_void_p),
-        ("SetTypeOptions", c_void_p),
-        ("GetNameByOffsetWide", c_void_p),
-        ("GetOffsetByNameWide", c_void_p),
-        ("GetNearNameByOffsetWide", c_void_p),
-        ("GetLineByOffsetWide", c_void_p),
-        ("GetOffsetByLineWide", c_void_p),
-        ("GetModuleByModuleNameWide", c_void_p),
-        ("GetSymbolModuleWide", c_void_p),
-        ("GetTypeNameWide", c_void_p),
-        ("GetTypeIdWide", c_void_p),
-        ("GetFieldOffsetWide", c_void_p),
-        ("GetSymbolTypeIdWide", c_void_p),
-        ("GetScopeSymbolGroup2", ids_getscopesymbolgroup2),
-        ("CreateSymbolGroup2", c_void_p),
-        ("StartSymbolMatchWide", c_void_p),
-        ("GetNextSymbolMatchWide", c_void_p),
-        ("ReloadWide", c_void_p),
-        ("GetSymbolPathWide", c_void_p),
-        ("SetSymbolPathWide", c_void_p),
-        ("AppendSymbolPathWide", c_void_p),
-        ("GetImagePathWide", c_void_p),
-        ("SetImagePathWide", c_void_p),
-        ("AppendImagePathWide", c_void_p),
-        ("GetSourcePathWide", c_void_p),
-        ("GetSourcePathElementWide", c_void_p),
-        ("SetSourcePathWide", c_void_p),
-        ("AppendSourcePathWide", c_void_p),
-        ("FindSourceFileWide", c_void_p),
-        ("GetSourceFileLineOffsetsWide", c_void_p),
-        ("GetModuleVersionInformationWide", c_void_p),
-        ("GetModuleNameStringWide", c_void_p),
-        ("GetConstantNameWide", c_void_p),
-        ("GetFieldNameWide", c_void_p),
-        ("IsManagedModule", c_void_p),
-        ("GetModuleByModuleName2", c_void_p),
-        ("GetModuleByModuleName2Wide", c_void_p),
-        ("GetModuleByOffset2", c_void_p),
-        ("AddSyntheticModule", c_void_p),
-        ("AddSyntheticModuleWide", c_void_p),
-        ("RemoveSyntheticModule", c_void_p),
-        ("GetCurrentScopeFrameIndex", ids_getcurrentscopeframeindex),
-        ("SetScopeFrameByIndex", ids_setscopeframebyindex),
-        ("SetScopeFromJitDebugInfo", c_void_p),
-        ("SetScopeFromStoredEvent", c_void_p),
-        ("OutputSymbolByOffset", c_void_p),
-        ("GetFunctionEntryByOffset", c_void_p),
-        ("GetFieldTypeAndOffset", c_void_p),
-        ("GetFieldTypeAndOffsetWide", c_void_p),
-        ("AddSyntheticSymbol", c_void_p),
-        ("AddSyntheticSymbolWide", c_void_p),
-        ("RemoveSyntheticSymbol", c_void_p),
-        ("GetSymbolEntriesByOffset", c_void_p),
-        ("GetSymbolEntriesByName", ids_getsymbolentriesbyname),
-        ("GetSymbolEntriesByNameWide", c_void_p),
-        ("GetSymbolEntryByToken", c_void_p),
-        ("GetSymbolEntryInformation", ids_getsymbolentryinformation),
-        ("GetSymbolEntryString", ids_getsymbolentrystring),
-        ("GetSymbolEntryStringWide", c_void_p),
-        ("GetSymbolEntryOffsetRegions", c_void_p),
-        ("GetSymbolEntryBySymbolEntry", c_void_p),
-        ("GetSourceEntriesByOffset", c_void_p),
-        ("GetSourceEntriesByLine", c_void_p),
-        ("GetSourceEntriesByLineWide", c_void_p),
-        ("GetSourceEntryString", c_void_p),
-        ("GetSourceEntryStringWide", c_void_p),
-        ("GetSourceEntryOffsetRegions", c_void_p),
-        ("GetsourceEntryBySourceEntry", c_void_p),
-        ("GetScopeEx", c_void_p),
-        ("SetScopeEx", c_void_p),
-        ("GetNameByInlineContext", ids_getnamebyinlinecontext),
-        ("GetNameByInlineContextWide", c_void_p),
-        ("GetLineByInlineContext", ids_getlinebyinlinecontext),
-        ("GetLineByInlineContextWide", c_void_p),
-        ("OutputSymbolByInlineContext", c_void_p),
-        ("GetCurrentScopeFrameIndexEx", c_void_p),
-        ("SetScopeFrameByIndexEx", c_void_p),
-    ]
-
-
-IDebugSymbols5._fields_ = [("lpVtbl", POINTER(IDebugSymbols5Vtbl))]
-
-SymbolId = namedtuple("SymbolId", ["ModuleBase", "Id"])
-SymbolEntry = namedtuple(
-    "SymbolEntry",
-    [
-        "ModuleBase",
-        "Offset",
-        "Id",
-        "Arg64",
-        "Size",
-        "Flags",
-        "TypeId",
-        "NameSize",
-        "Token",
-        "Tag",
-        "Arg32",
-    ],
-)
-DebugModuleParams = namedtuple(
-    "DebugModuleParams",
-    [
-        "Base",
-        "Size",
-        "TimeDateStamp",
-        "Checksum",
-        "Flags",
-        "SymbolType",
-        "ImageNameSize",
-        "ModuleNameSize",
-        "LoadedImageNameSize",
-        "SymbolFileNameSize",
-        "MappedImageNameSize",
-    ],
-)
-
-
-class SymTags(IntEnum):
-    Null = 0
-    Exe = 1
-    SymTagFunction = 5
-
-
-def make_debug_module_params(cdata):
-    fieldvalues = map(lambda y: getattr(cdata, y), DebugModuleParams._fields)
-    return DebugModuleParams(*fieldvalues)
-
-
-class Symbols(object):
-    def __init__(self, symbols):
-        self.ptr = symbols
-        self.symbols = symbols.contents
-        self.vt = self.symbols.lpVtbl.contents
-        # Keep some handy ulongs for passing into C methods.
-        self.ulong = c_ulong()
-        self.ulong64 = c_ulonglong()
-
-    def GetCurrentScopeFrameIndex(self):
-        res = self.vt.GetCurrentScopeFrameIndex(self.symbols, byref(self.ulong))
-        aborter(res, "GetCurrentScopeFrameIndex")
-        return self.ulong.value
-
-    def SetScopeFrameByIndex(self, idx):
-        res = self.vt.SetScopeFrameByIndex(self.symbols, idx)
-        aborter(res, "SetScopeFrameByIndex", ignore=[E_EINVAL])
-        return res != E_EINVAL
-
-    def GetOffsetByName(self, name):
-        res = self.vt.GetOffsetByName(
-            self.symbols, name.encode("ascii"), byref(self.ulong64)
-        )
-        aborter(res, "GetOffsetByName {}".format(name))
-        return self.ulong64.value
-
-    def GetNearNameByOffset(self, addr):
-        ptr = create_string_buffer(256)
-        pulong = c_ulong()
-        disp = c_ulonglong()
-        # Zero arg -> "delta" indicating how many symbols to skip
-        res = self.vt.GetNearNameByOffset(
-            self.symbols, addr, 0, ptr, 255, byref(pulong), byref(disp)
-        )
-        if res == E_NOINTERFACE:
-            return "{noname}"
-        aborter(res, "GetNearNameByOffset")
-        ptr[255] = "\0".encode("ascii")
-        return "{}+{}".format(string_at(ptr).decode("ascii"), disp.value)
-
-    def GetModuleByModuleName2(self, name):
-        # First zero arg -> module index to search from, second zero arg ->
-        # DEBUG_GETMOD_* flags, none of which we use.
-        res = self.vt.GetModuleByModuleName2(
-            self.symbols, name, 0, 0, None, byref(self.ulong64)
-        )
-        aborter(res, "GetModuleByModuleName2")
-        return self.ulong64.value
-
-    def GetScopeSymbolGroup2(self):
-        retptr = POINTER(IDebugSymbolGroup2)()
-        res = self.vt.GetScopeSymbolGroup2(
-            self.symbols, ScopeGroupFlags.DEBUG_SCOPE_GROUP_ALL, None, retptr
-        )
-        aborter(res, "GetScopeSymbolGroup2")
-        return SymbolGroup(retptr)
-
-    def GetSymbolEntryString(self, idx, module):
-        symid = DEBUG_MODULE_AND_ID()
-        symid.ModuleBase = module
-        symid.Id = idx
-        ptr = create_string_buffer(1024)
-        # Zero arg is the string index -- symbols can have multiple names, for now
-        # only support the first one.
-        res = self.vt.GetSymbolEntryString(
-            self.symbols, symid, 0, ptr, 1023, byref(self.ulong)
-        )
-        aborter(res, "GetSymbolEntryString")
-        return string_at(ptr).decode("ascii")
-
-    def GetSymbolEntryInformation(self, module, theid):
-        symid = DEBUG_MODULE_AND_ID()
-        symentry = DEBUG_SYMBOL_ENTRY()
-        symid.ModuleBase = module
-        symid.Id = theid
-        res = self.vt.GetSymbolEntryInformation(self.symbols, symid, symentry)
-        aborter(res, "GetSymbolEntryInformation")
-        # Fetch fields into SymbolEntry object
-        fields = map(lambda x: getattr(symentry, x), SymbolEntry._fields)
-        return SymbolEntry(*fields)
-
-    def GetSymbolEntriesByName(self, symstr):
-        # Initial query to find number of symbol entries
-        res = self.vt.GetSymbolEntriesByName(
-            self.symbols, symstr.encode("ascii"), 0, None, 0, byref(self.ulong)
-        )
-        aborter(res, "GetSymbolEntriesByName")
-
-        # Build a buffer and query for 'length' entries
-        length = self.ulong.value
-        symrecs = (DEBUG_MODULE_AND_ID * length)()
-        # Zero arg -> flags, of which there are none defined.
-        res = self.vt.GetSymbolEntriesByName(
-            self.symbols, symstr.encode("ascii"), 0, symrecs, length, byref(self.ulong)
-        )
-        aborter(res, "GetSymbolEntriesByName")
-
-        # Extract 'length' number of SymbolIds
-        length = self.ulong.value
-
-        def extract(x):
-            sym = symrecs[x]
-            return SymbolId(sym.ModuleBase, sym.Id)
-
-        return [extract(x) for x in range(length)]
-
-    def GetSymbolPath(self):
-        # Query for length of buffer to allocate
-        res = self.vt.GetSymbolPath(self.symbols, None, 0, byref(self.ulong))
-        aborter(res, "GetSymbolPath", ignore=[S_FALSE])
-
-        # Fetch 'length' length symbol path string
-        length = self.ulong.value
-        arr = create_string_buffer(length)
-        res = self.vt.GetSymbolPath(self.symbols, arr, length, byref(self.ulong))
-        aborter(res, "GetSymbolPath")
-
-        return string_at(arr).decode("ascii")
-
-    def GetSourcePath(self):
-        # Query for length of buffer to allocate
-        res = self.vt.GetSourcePath(self.symbols, None, 0, byref(self.ulong))
-        aborter(res, "GetSourcePath", ignore=[S_FALSE])
-
-        # Fetch a string of len 'length'
-        length = self.ulong.value
-        arr = create_string_buffer(length)
-        res = self.vt.GetSourcePath(self.symbols, arr, length, byref(self.ulong))
-        aborter(res, "GetSourcePath")
-
-        return string_at(arr).decode("ascii")
-
-    def SetSourcePath(self, string):
-        res = self.vt.SetSourcePath(self.symbols, string.encode("ascii"))
-        aborter(res, "SetSourcePath")
-        return
-
-    def GetModuleParameters(self, base):
-        self.ulong64.value = base
-        params = DEBUG_MODULE_PARAMETERS()
-        # Fetch one module params struct, starting at idx zero
-        res = self.vt.GetModuleParameters(
-            self.symbols, 1, byref(self.ulong64), 0, byref(params)
-        )
-        aborter(res, "GetModuleParameters")
-        return make_debug_module_params(params)
-
-    def GetSymbolOptions(self):
-        res = self.vt.GetSymbolOptions(self.symbols, byref(self.ulong))
-        aborter(res, "GetSymbolOptions")
-        return SymbolOptionFlags(self.ulong.value)
-
-    def SetSymbolOptions(self, opts):
-        assert isinstance(opts, SymbolOptionFlags)
-        res = self.vt.SetSymbolOptions(self.symbols, opts.value)
-        aborter(res, "SetSymbolOptions")
-        return
-
-    def GetLineByOffset(self, offs):
-        # Initial query for filename buffer size
-        res = self.vt.GetLineByOffset(
-            self.symbols, offs, None, None, 0, byref(self.ulong), None
-        )
-        if res == E_FAIL:
-            return None  # Sometimes we just can't get line numbers, of course
-        aborter(res, "GetLineByOffset", ignore=[S_FALSE])
-
-        # Allocate filename buffer and query for line number too
-        filenamelen = self.ulong.value
-        text = create_string_buffer(filenamelen)
-        line = c_ulong()
-        res = self.vt.GetLineByOffset(
-            self.symbols, offs, byref(line), text, filenamelen, byref(self.ulong), None
-        )
-        aborter(res, "GetLineByOffset")
-
-        return string_at(text).decode("ascii"), line.value
-
-    def GetModuleNameString(self, whichname, base):
-        # Initial query for name string length
-        res = self.vt.GetModuleNameString(
-            self.symbols, whichname, DEBUG_ANY_ID, base, None, 0, byref(self.ulong)
-        )
-        aborter(res, "GetModuleNameString", ignore=[S_FALSE])
-
-        module_name_len = self.ulong.value
-        module_name = (c_char * module_name_len)()
-        res = self.vt.GetModuleNameString(
-            self.symbols,
-            whichname,
-            DEBUG_ANY_ID,
-            base,
-            module_name,
-            module_name_len,
-            None,
-        )
-        aborter(res, "GetModuleNameString")
-
-        return string_at(module_name).decode("ascii")
-
-    def GetNameByInlineContext(self, pc, ctx):
-        # None args -> ignore output name size and displacement
-        buf = create_string_buffer(256)
-        res = self.vt.GetNameByInlineContext(
-            self.symbols, pc, ctx, buf, 255, None, None
-        )
-        aborter(res, "GetNameByInlineContext")
-        return string_at(buf).decode("ascii")
-
-    def GetLineByInlineContext(self, pc, ctx):
-        # None args -> ignore output filename size and displacement
-        buf = create_string_buffer(256)
-        res = self.vt.GetLineByInlineContext(
-            self.symbols, pc, ctx, byref(self.ulong), buf, 255, None, None
-        )
-        aborter(res, "GetLineByInlineContext")
-        return string_at(buf).decode("ascii"), self.ulong.value
-
-    def get_all_symbols(self):
-        main_module_name = self.get_exefile_module_name()
-        idnumbers = self.GetSymbolEntriesByName("{}!*".format(main_module_name))
-        lst = []
-        for symid in idnumbers:
-            s = self.GetSymbolEntryString(symid.Id, symid.ModuleBase)
-            symentry = self.GetSymbolEntryInformation(symid.ModuleBase, symid.Id)
-            lst.append((s, symentry))
-        return lst
-
-    def get_all_functions(self):
-        syms = self.get_all_symbols()
-        return [x for x in syms if x[1].Tag == SymTags.SymTagFunction]
-
-    def get_all_modules(self):
-        params = DEBUG_MODULE_PARAMETERS()
-        idx = 0
-        res = 0
-        all_modules = []
-        while res != E_EINVAL:
-            res = self.vt.GetModuleParameters(self.symbols, 1, None, idx, byref(params))
-            aborter(res, "GetModuleParameters", ignore=[E_EINVAL])
-            all_modules.append(make_debug_module_params(params))
-            idx += 1
-        return all_modules
-
-    def get_exefile_module(self):
-        all_modules = self.get_all_modules()
-        reduce_func = (
-            lambda x, y: y if y.Flags & DebugModuleFlags.DEBUG_MODULE_EXE_MODULE else x
-        )
-        main_module = reduce(reduce_func, all_modules, None)
-        if main_module is None:
-            raise Exception("Couldn't find the exefile module")
-        return main_module
-
-    def get_module_name(self, base):
-        return self.GetModuleNameString(DebugModuleNames.DEBUG_MODNAME_MODULE, base)
-
-    def get_exefile_module_name(self):
-        return self.get_module_name(self.get_exefile_module().Base)
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/symgroup.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/symgroup.py
deleted file mode 100644
index abe71434d9f718..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/symgroup.py
+++ /dev/null
@@ -1,104 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from collections import namedtuple
-from ctypes import *
-from functools import partial
-
-from .utils import *
-
-Symbol = namedtuple("Symbol", ["num", "name", "type", "value"])
-
-
-class IDebugSymbolGroup2(Structure):
-    pass
-
-
-class IDebugSymbolGroup2Vtbl(Structure):
-    wrp = partial(WINFUNCTYPE, c_long, POINTER(IDebugSymbolGroup2))
-    ids_getnumbersymbols = wrp(c_ulong_p)
-    ids_getsymbolname = wrp(c_ulong, c_char_p, c_ulong, c_ulong_p)
-    ids_getsymboltypename = wrp(c_ulong, c_char_p, c_ulong, c_ulong_p)
-    ids_getsymbolvaluetext = wrp(c_ulong, c_char_p, c_ulong, c_ulong_p)
-    _fields_ = [
-        ("QueryInterface", c_void_p),
-        ("AddRef", c_void_p),
-        ("Release", c_void_p),
-        ("GetNumberSymbols", ids_getnumbersymbols),
-        ("AddSymbol", c_void_p),
-        ("RemoveSymbolByName", c_void_p),
-        ("RemoveSymbolByIndex", c_void_p),
-        ("GetSymbolName", ids_getsymbolname),
-        ("GetSymbolParameters", c_void_p),
-        ("ExpandSymbol", c_void_p),
-        ("OutputSymbols", c_void_p),
-        ("WriteSymbol", c_void_p),
-        ("OutputAsType", c_void_p),
-        ("AddSymbolWide", c_void_p),
-        ("RemoveSymbolByNameWide", c_void_p),
-        ("GetSymbolNameWide", c_void_p),
-        ("WritesymbolWide", c_void_p),
-        ("OutputAsTypeWide", c_void_p),
-        ("GetSymbolTypeName", ids_getsymboltypename),
-        ("GetSymbolTypeNameWide", c_void_p),
-        ("GetSymbolSize", c_void_p),
-        ("GetSymbolOffset", c_void_p),
-        ("GetSymbolRegister", c_void_p),
-        ("GetSymbolValueText", ids_getsymbolvaluetext),
-        ("GetSymbolValueTextWide", c_void_p),
-        ("GetSymbolEntryInformation", c_void_p),
-    ]
-
-
-IDebugSymbolGroup2._fields_ = [("lpVtbl", POINTER(IDebugSymbolGroup2Vtbl))]
-
-
-class SymbolGroup(object):
-    def __init__(self, symgroup):
-        self.symgroup = symgroup.contents
-        self.vt = self.symgroup.lpVtbl.contents
-        self.ulong = c_ulong()
-
-    def GetNumberSymbols(self):
-        res = self.vt.GetNumberSymbols(self.symgroup, byref(self.ulong))
-        aborter(res, "GetNumberSymbols")
-        return self.ulong.value
-
-    def GetSymbolName(self, idx):
-        buf = create_string_buffer(256)
-        res = self.vt.GetSymbolName(self.symgroup, idx, buf, 255, byref(self.ulong))
-        aborter(res, "GetSymbolName")
-        thelen = self.ulong.value
-        return string_at(buf).decode("ascii")
-
-    def GetSymbolTypeName(self, idx):
-        buf = create_string_buffer(256)
-        res = self.vt.GetSymbolTypeName(self.symgroup, idx, buf, 255, byref(self.ulong))
-        aborter(res, "GetSymbolTypeName")
-        thelen = self.ulong.value
-        return string_at(buf).decode("ascii")
-
-    def GetSymbolValueText(self, idx, handleserror=False):
-        buf = create_string_buffer(256)
-        res = self.vt.GetSymbolValueText(
-            self.symgroup, idx, buf, 255, byref(self.ulong)
-        )
-        if res != 0 and handleserror:
-            return None
-        aborter(res, "GetSymbolTypeName")
-        thelen = self.ulong.value
-        return string_at(buf).decode("ascii")
-
-    def get_symbol(self, idx):
-        name = self.GetSymbolName(idx)
-        thetype = self.GetSymbolTypeName(idx)
-        value = self.GetSymbolValueText(idx)
-        return Symbol(idx, name, thetype, value)
-
-    def get_all_symbols(self):
-        num_syms = self.GetNumberSymbols()
-        return list(map(self.get_symbol, list(range(num_syms))))
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/sysobjs.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/sysobjs.py
deleted file mode 100644
index 5e1fe927e04d0b..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/sysobjs.py
+++ /dev/null
@@ -1,220 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from ctypes import *
-from functools import partial
-
-from .utils import *
-
-# UUID For SystemObjects4 interface.
-DebugSystemObjects4IID = IID(
-    0x489468E6,
-    0x7D0F,
-    0x4AF5,
-    IID_Data4_Type(0x87, 0xAB, 0x25, 0x20, 0x74, 0x54, 0xD5, 0x53),
-)
-
-
-class IDebugSystemObjects4(Structure):
-    pass
-
-
-class IDebugSystemObjects4Vtbl(Structure):
-    wrp = partial(WINFUNCTYPE, c_long, POINTER(IDebugSystemObjects4))
-    ids_getnumberprocesses = wrp(POINTER(c_ulong))
-    ids_getprocessidsbyindex = wrp(c_ulong, c_ulong, c_ulong_p, c_ulong_p)
-    ids_setcurrentprocessid = wrp(c_ulong)
-    ids_getnumberthreads = wrp(c_ulong_p)
-    ids_getthreadidsbyindex = wrp(c_ulong, c_ulong, c_ulong_p, c_ulong_p)
-    ids_setcurrentthreadid = wrp(c_ulong)
-    _fields_ = [
-        ("QueryInterface", c_void_p),
-        ("AddRef", c_void_p),
-        ("Release", c_void_p),
-        ("GetEventThread", c_void_p),
-        ("GetEventProcess", c_void_p),
-        ("GetCurrentThreadId", c_void_p),
-        ("SetCurrentThreadId", ids_setcurrentthreadid),
-        ("GetCurrentProcessId", c_void_p),
-        ("SetCurrentProcessId", ids_setcurrentprocessid),
-        ("GetNumberThreads", ids_getnumberthreads),
-        ("GetTotalNumberThreads", c_void_p),
-        ("GetThreadIdsByIndex", ids_getthreadidsbyindex),
-        ("GetThreadIdByProcessor", c_void_p),
-        ("GetCurrentThreadDataOffset", c_void_p),
-        ("GetThreadIdByDataOffset", c_void_p),
-        ("GetCurrentThreadTeb", c_void_p),
-        ("GetThreadIdByTeb", c_void_p),
-        ("GetCurrentThreadSystemId", c_void_p),
-        ("GetThreadIdBySystemId", c_void_p),
-        ("GetCurrentThreadHandle", c_void_p),
-        ("GetThreadIdByHandle", c_void_p),
-        ("GetNumberProcesses", ids_getnumberprocesses),
-        ("GetProcessIdsByIndex", ids_getprocessidsbyindex),
-        ("GetCurrentProcessDataOffset", c_void_p),
-        ("GetProcessIdByDataOffset", c_void_p),
-        ("GetCurrentProcessPeb", c_void_p),
-        ("GetProcessIdByPeb", c_void_p),
-        ("GetCurrentProcessSystemId", c_void_p),
-        ("GetProcessIdBySystemId", c_void_p),
-        ("GetCurrentProcessHandle", c_void_p),
-        ("GetProcessIdByHandle", c_void_p),
-        ("GetCurrentProcessExecutableName", c_void_p),
-        ("GetCurrentProcessUpTime", c_void_p),
-        ("GetImplicitThreadDataOffset", c_void_p),
-        ("SetImplicitThreadDataOffset", c_void_p),
-        ("GetImplicitProcessDataOffset", c_void_p),
-        ("SetImplicitProcessDataOffset", c_void_p),
-        ("GetEventSystem", c_void_p),
-        ("GetCurrentSystemId", c_void_p),
-        ("SetCurrentSystemId", c_void_p),
-        ("GetNumberSystems", c_void_p),
-        ("GetSystemIdsByIndex", c_void_p),
-        ("GetTotalNumberThreadsAndProcesses", c_void_p),
-        ("GetCurrentSystemServer", c_void_p),
-        ("GetSystemByServer", c_void_p),
-        ("GetCurrentSystemServerName", c_void_p),
-        ("GetCurrentProcessExecutableNameWide", c_void_p),
-        ("GetCurrentSystemServerNameWide", c_void_p),
-    ]
-
-
-IDebugSystemObjects4._fields_ = [("lpVtbl", POINTER(IDebugSystemObjects4Vtbl))]
-
-
-class SysObjects(object):
-    def __init__(self, sysobjects):
-        self.ptr = sysobjects
-        self.sysobjects = sysobjects.contents
-        self.vt = self.sysobjects.lpVtbl.contents
-        # Keep a handy ulong for passing into C methods.
-        self.ulong = c_ulong()
-
-    def GetNumberSystems(self):
-        res = self.vt.GetNumberSystems(self.sysobjects, byref(self.ulong))
-        aborter(res, "GetNumberSystems")
-        return self.ulong.value
-
-    def GetNumberProcesses(self):
-        res = self.vt.GetNumberProcesses(self.sysobjects, byref(self.ulong))
-        aborter(res, "GetNumberProcesses")
-        return self.ulong.value
-
-    def GetNumberThreads(self):
-        res = self.vt.GetNumberThreads(self.sysobjects, byref(self.ulong))
-        aborter(res, "GetNumberThreads")
-        return self.ulong.value
-
-    def GetTotalNumberThreadsAndProcesses(self):
-        tthreads = c_ulong()
-        tprocs = c_ulong()
-        pulong3 = c_ulong()
-        res = self.vt.GetTotalNumberThreadsAndProcesses(
-            self.sysobjects,
-            byref(tthreads),
-            byref(tprocs),
-            byref(pulong3),
-            byref(pulong3),
-            byref(pulong3),
-        )
-        aborter(res, "GettotalNumberThreadsAndProcesses")
-        return tthreads.value, tprocs.value
-
-    def GetCurrentProcessId(self):
-        res = self.vt.GetCurrentProcessId(self.sysobjects, byref(self.ulong))
-        aborter(res, "GetCurrentProcessId")
-        return self.ulong.value
-
-    def SetCurrentProcessId(self, sysid):
-        res = self.vt.SetCurrentProcessId(self.sysobjects, sysid)
-        aborter(res, "SetCurrentProcessId")
-        return
-
-    def GetCurrentThreadId(self):
-        res = self.vt.GetCurrentThreadId(self.sysobjects, byref(self.ulong))
-        aborter(res, "GetCurrentThreadId")
-        return self.ulong.value
-
-    def SetCurrentThreadId(self, sysid):
-        res = self.vt.SetCurrentThreadId(self.sysobjects, sysid)
-        aborter(res, "SetCurrentThreadId")
-        return
-
-    def GetProcessIdsByIndex(self):
-        num_processes = self.GetNumberProcesses()
-        if num_processes == 0:
-            return []
-        engineids = (c_ulong * num_processes)()
-        pids = (c_ulong * num_processes)()
-        for x in range(num_processes):
-            engineids[x] = DEBUG_ANY_ID
-            pids[x] = DEBUG_ANY_ID
-        res = self.vt.GetProcessIdsByIndex(
-            self.sysobjects, 0, num_processes, engineids, pids
-        )
-        aborter(res, "GetProcessIdsByIndex")
-        return list(zip(engineids, pids))
-
-    def GetThreadIdsByIndex(self):
-        num_threads = self.GetNumberThreads()
-        if num_threads == 0:
-            return []
-        engineids = (c_ulong * num_threads)()
-        tids = (c_ulong * num_threads)()
-        for x in range(num_threads):
-            engineids[x] = DEBUG_ANY_ID
-            tids[x] = DEBUG_ANY_ID
-        # Zero -> start index
-        res = self.vt.GetThreadIdsByIndex(
-            self.sysobjects, 0, num_threads, engineids, tids
-        )
-        aborter(res, "GetThreadIdsByIndex")
-        return list(zip(engineids, tids))
-
-    def GetCurThreadHandle(self):
-        pulong64 = c_ulonglong()
-        res = self.vt.GetCurrentThreadHandle(self.sysobjects, byref(pulong64))
-        aborter(res, "GetCurrentThreadHandle")
-        return pulong64.value
-
-    def set_current_thread(self, pid, tid):
-        proc_sys_id = -1
-        for x in self.GetProcessIdsByIndex():
-            sysid, procid = x
-            if procid == pid:
-                proc_sys_id = sysid
-
-        if proc_sys_id == -1:
-            raise Exception("Couldn't find designated PID {}".format(pid))
-
-        self.SetCurrentProcessId(proc_sys_id)
-
-        thread_sys_id = -1
-        for x in self.GetThreadIdsByIndex():
-            sysid, threadid = x
-            if threadid == tid:
-                thread_sys_id = sysid
-
-        if thread_sys_id == -1:
-            raise Exception("Couldn't find designated TID {}".format(tid))
-
-        self.SetCurrentThreadId(thread_sys_id)
-        return
-
-    def print_current_procs_threads(self):
-        procs = []
-        for x in self.GetProcessIdsByIndex():
-            sysid, procid = x
-            procs.append(procid)
-
-        threads = []
-        for x in self.GetThreadIdsByIndex():
-            sysid, threadid = x
-            threads.append(threadid)
-
-        print("Current processes: {}".format(procs))
-        print("Current threads: {}".format(threads))
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/utils.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/utils.py
deleted file mode 100644
index 8bea3daaf7d9d9..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/dbgeng/utils.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from ctypes import *
-
-# Error codes are negative when received by python, but are typically
-# represented by unsigned hex elsewhere. Subtract 2^32 from the unsigned
-# hex to produce negative error codes.
-E_NOINTERFACE = 0x80004002 - 0x100000000
-E_FAIL = 0x80004005 - 0x100000000
-E_EINVAL = 0x80070057 - 0x100000000
-E_INTERNALEXCEPTION = 0x80040205 - 0x100000000
-S_FALSE = 1
-
-# This doesn't fit into any convenient category
-DEBUG_ANY_ID = 0xFFFFFFFF
-
-
-class WinError(Exception):
-    def __init__(self, msg, hstatus):
-        self.hstatus = hstatus
-        super(WinError, self).__init__(msg)
-
-
-def aborter(res, msg, ignore=[]):
-    if res != 0 and res not in ignore:
-        # Convert a negative error code to a positive unsigned one, which is
-        # now NTSTATUSes appear in documentation.
-        if res < 0:
-            res += 0x100000000
-        msg = "{:08X} : {}".format(res, msg)
-        raise WinError(msg, res)
-
-
-IID_Data4_Type = c_ubyte * 8
-
-
-class IID(Structure):
-    _fields_ = [
-        ("Data1", c_uint),
-        ("Data2", c_ushort),
-        ("Data3", c_ushort),
-        ("Data4", IID_Data4_Type),
-    ]
-
-
-c_ulong_p = POINTER(c_ulong)
-c_ulong64_p = POINTER(c_ulonglong)
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/LLDB.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/LLDB.py
deleted file mode 100644
index 2307550aca047b..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/LLDB.py
+++ /dev/null
@@ -1,385 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Interface for communicating with the LLDB debugger via its python interface.
-"""
-
-import imp
-import os
-import shlex
-from subprocess import CalledProcessError, check_output, STDOUT
-import sys
-
-from dex.debugger.DebuggerBase import DebuggerBase, watch_is_active
-from dex.dextIR import FrameIR, LocIR, StepIR, StopReason, ValueIR
-from dex.dextIR import StackFrame, SourceLocation, ProgramState
-from dex.utils.Exceptions import DebuggerException, LoadDebuggerException
-from dex.utils.ReturnCode import ReturnCode
-
-
-class LLDB(DebuggerBase):
-    def __init__(self, context, *args):
-        self.lldb_executable = context.options.lldb_executable
-        self._debugger = None
-        self._target = None
-        self._process = None
-        self._thread = None
-        # Map {id (int): condition (str)} for breakpoints which have a
-        # condition. See get_triggered_breakpoint_ids usage for more info.
-        self._breakpoint_conditions = {}
-        super(LLDB, self).__init__(context, *args)
-
-    def _custom_init(self):
-        self._debugger = self._interface.SBDebugger.Create()
-        self._debugger.SetAsync(False)
-        self._target = self._debugger.CreateTargetWithFileAndArch(
-            self.context.options.executable, self.context.options.arch
-        )
-        if not self._target:
-            raise LoadDebuggerException(
-                'could not create target for executable "{}" with arch:{}'.format(
-                    self.context.options.executable, self.context.options.arch
-                )
-            )
-
-    def _custom_exit(self):
-        if getattr(self, "_process", None):
-            self._process.Kill()
-        if getattr(self, "_debugger", None) and getattr(self, "_target", None):
-            self._debugger.DeleteTarget(self._target)
-
-    def _translate_stop_reason(self, reason):
-        if reason == self._interface.eStopReasonNone:
-            return None
-        if reason == self._interface.eStopReasonBreakpoint:
-            return StopReason.BREAKPOINT
-        if reason == self._interface.eStopReasonPlanComplete:
-            return StopReason.STEP
-        if reason == self._interface.eStopReasonThreadExiting:
-            return StopReason.PROGRAM_EXIT
-        if reason == self._interface.eStopReasonException:
-            return StopReason.ERROR
-        return StopReason.OTHER
-
-    def _load_interface(self):
-        try:
-            args = [self.lldb_executable, "-P"]
-            pythonpath = check_output(args, stderr=STDOUT).rstrip().decode("utf-8")
-        except CalledProcessError as e:
-            raise LoadDebuggerException(str(e), sys.exc_info())
-        except OSError as e:
-            raise LoadDebuggerException(
-                '{} ["{}"]'.format(e.strerror, self.lldb_executable), sys.exc_info()
-            )
-
-        if not os.path.isdir(pythonpath):
-            raise LoadDebuggerException(
-                'path "{}" does not exist [result of {}]'.format(pythonpath, args),
-                sys.exc_info(),
-            )
-
-        try:
-            module_info = imp.find_module("lldb", [pythonpath])
-            return imp.load_module("lldb", *module_info)
-        except ImportError as e:
-            msg = str(e)
-            if msg.endswith("not a valid Win32 application."):
-                msg = "{} [Are you mixing 32-bit and 64-bit binaries?]".format(msg)
-            raise LoadDebuggerException(msg, sys.exc_info())
-
-    @classmethod
-    def get_name(cls):
-        return "lldb"
-
-    @classmethod
-    def get_option_name(cls):
-        return "lldb"
-
-    @property
-    def version(self):
-        try:
-            return self._interface.SBDebugger_GetVersionString()
-        except AttributeError:
-            return None
-
-    def clear_breakpoints(self):
-        self._target.DeleteAllBreakpoints()
-
-    def _add_breakpoint(self, file_, line):
-        return self._add_conditional_breakpoint(file_, line, None)
-
-    def _add_conditional_breakpoint(self, file_, line, condition):
-        bp = self._target.BreakpointCreateByLocation(file_, line)
-        if not bp:
-            raise DebuggerException(
-                "could not add breakpoint [{}:{}]".format(file_, line)
-            )
-        id = bp.GetID()
-        if condition:
-            bp.SetCondition(condition)
-            assert id not in self._breakpoint_conditions
-            self._breakpoint_conditions[id] = condition
-        return id
-
-    def _evaulate_breakpoint_condition(self, id):
-        """Evaluate the breakpoint condition and return the result.
-
-        Returns True if a conditional breakpoint with the specified id cannot
-        be found (i.e. assume it is an unconditional breakpoint).
-        """
-        try:
-            condition = self._breakpoint_conditions[id]
-        except KeyError:
-            # This must be an unconditional breakpoint.
-            return True
-        valueIR = self.evaluate_expression(condition)
-        return valueIR.type_name == "bool" and valueIR.value == "true"
-
-    def get_triggered_breakpoint_ids(self):
-        # Breakpoints can only have been triggered if we've hit one.
-        stop_reason = self._translate_stop_reason(self._thread.GetStopReason())
-        if stop_reason != StopReason.BREAKPOINT:
-            return []
-        breakpoint_ids = set()
-        # When the stop reason is eStopReasonBreakpoint, GetStopReasonDataCount
-        # counts all breakpoints associated with the location that lldb has
-        # stopped at, regardless of their condition. I.e. Even if we have two
-        # breakpoints at the same source location that have mutually exclusive
-        # conditions, both will be counted by GetStopReasonDataCount when
-        # either condition is true. Check each breakpoint condition manually to
-        # filter the list down to breakpoints that have caused this stop.
-        #
-        # Breakpoints have two data parts: Breakpoint ID, Location ID. We're
-        # only interested in the Breakpoint ID so we skip every other item.
-        for i in range(0, self._thread.GetStopReasonDataCount(), 2):
-            id = self._thread.GetStopReasonDataAtIndex(i)
-            if self._evaulate_breakpoint_condition(id):
-                breakpoint_ids.add(id)
-        return breakpoint_ids
-
-    def delete_breakpoints(self, ids):
-        for id in ids:
-            bp = self._target.FindBreakpointByID(id)
-            if not bp:
-                # The ID is not valid.
-                raise KeyError
-            try:
-                del self._breakpoint_conditions[id]
-            except KeyError:
-                # This must be an unconditional breakpoint.
-                pass
-            self._target.BreakpointDelete(id)
-
-    def launch(self, cmdline):
-        num_resolved_breakpoints = 0
-        for b in self._target.breakpoint_iter():
-            num_resolved_breakpoints += b.GetNumLocations() > 0
-        assert num_resolved_breakpoints > 0
-
-        if self.context.options.target_run_args:
-            cmdline += shlex.split(self.context.options.target_run_args)
-        launch_info = self._target.GetLaunchInfo()
-        launch_info.SetWorkingDirectory(os.getcwd())
-        launch_info.SetArguments(cmdline, True)
-        error = self._interface.SBError()
-        self._process = self._target.Launch(launch_info, error)
-        
-        if error.Fail():
-            raise DebuggerException(error.GetCString())
-        if not os.path.exists(self._target.executable.fullpath):
-            raise DebuggerException("exe does not exist")
-        if not self._process or self._process.GetNumThreads() == 0:
-            raise DebuggerException("could not launch process")
-        if self._process.GetNumThreads() != 1:
-            raise DebuggerException("multiple threads not supported")
-        self._thread = self._process.GetThreadAtIndex(0)
-        
-        num_stopped_threads = 0
-        for thread in self._process:
-            if thread.GetStopReason() == self._interface.eStopReasonBreakpoint:
-                num_stopped_threads += 1
-        assert num_stopped_threads > 0
-        assert self._thread, (self._process, self._thread)
-
-    def step(self):
-        self._thread.StepInto()
-        stop_reason = self._thread.GetStopReason()
-        # If we (1) completed a step and (2) are sitting at a breakpoint,
-        # but (3) the breakpoint is not reported as the stop reason, then
-        # we'll need to step once more to hit the breakpoint.
-        #
-        # dexter sets breakpoints on every source line, then steps
-        # each source line. Older lldb's would overwrite the stop
-        # reason with "breakpoint hit" when we stopped at a breakpoint,
-        # even if the breakpoint hadn't been exectued yet.  One
-        # step per source line, hitting a breakpoint each time.
-        #
-        # But a more accurate behavior is that the step completes
-        # with step-completed stop reason, then when we step again,
-        # we execute the breakpoint and stop (with the pc the same) and
-        # a breakpoint-hit stop reason.  So we need to step twice per line.
-        if stop_reason == self._interface.eStopReasonPlanComplete:
-            stepped_to_breakpoint = False
-            pc = self._thread.GetFrameAtIndex(0).GetPC()
-            for bp in self._target.breakpoints:
-                for bploc in bp.locations:
-                    if (
-                        bploc.IsEnabled()
-                        and bploc.GetAddress().GetLoadAddress(self._target) == pc
-                    ):
-                        stepped_to_breakpoint = True
-            if stepped_to_breakpoint:
-                self._thread.StepInto()
-
-    def go(self) -> ReturnCode:
-        self._process.Continue()
-        return ReturnCode.OK
-
-    def _get_step_info(self, watches, step_index):
-        frames = []
-        state_frames = []
-
-        for i in range(0, self._thread.GetNumFrames()):
-            sb_frame = self._thread.GetFrameAtIndex(i)
-            sb_line = sb_frame.GetLineEntry()
-            sb_filespec = sb_line.GetFileSpec()
-
-            try:
-                path = os.path.join(
-                    sb_filespec.GetDirectory(), sb_filespec.GetFilename()
-                )
-            except (AttributeError, TypeError):
-                path = None
-
-            function = self._sanitize_function_name(sb_frame.GetFunctionName())
-
-            loc_dict = {
-                "path": path,
-                "lineno": sb_line.GetLine(),
-                "column": sb_line.GetColumn(),
-            }
-            loc = LocIR(**loc_dict)
-            valid_loc_for_watch = loc.path and os.path.exists(loc.path)
-
-            frame = FrameIR(function=function, is_inlined=sb_frame.IsInlined(), loc=loc)
-
-            if any(
-                name in (frame.function or "")  # pylint: disable=no-member
-                for name in self.frames_below_main
-            ):
-                break
-
-            frames.append(frame)
-
-            state_frame = StackFrame(
-                function=frame.function,
-                is_inlined=frame.is_inlined,
-                location=SourceLocation(**loc_dict),
-                watches={},
-            )
-            if valid_loc_for_watch:
-                for expr in map(
-                    # Filter out watches that are not active in the current frame,
-                    # and then evaluate all the active watches.
-                    lambda watch_info, idx=i: self.evaluate_expression(
-                        watch_info.expression, idx
-                    ),
-                    filter(
-                        lambda watch_info, idx=i, line_no=loc.lineno, loc_path=loc.path: watch_is_active(
-                            watch_info, loc_path, idx, line_no
-                        ),
-                        watches,
-                    ),
-                ):
-                    state_frame.watches[expr.expression] = expr
-            state_frames.append(state_frame)
-
-        if len(frames) == 1 and frames[0].function is None:
-            frames = []
-            state_frames = []
-
-        reason = self._translate_stop_reason(self._thread.GetStopReason())
-
-        return StepIR(
-            step_index=step_index,
-            frames=frames,
-            stop_reason=reason,
-            program_state=ProgramState(state_frames),
-        )
-
-    @property
-    def is_running(self):
-        # We're not running in async mode so this is always False.
-        return False
-
-    @property
-    def is_finished(self):
-        return not self._thread.GetFrameAtIndex(0)
-
-    @property
-    def frames_below_main(self):
-        return ["__scrt_common_main_seh", "__libc_start_main", "__libc_start_call_main"]
-
-    def evaluate_expression(self, expression, frame_idx=0) -> ValueIR:
-        result = self._thread.GetFrameAtIndex(frame_idx).EvaluateExpression(expression)
-        error_string = str(result.error)
-
-        value = result.value
-        could_evaluate = not any(
-            s in error_string
-            for s in [
-                "Can't run the expression locally",
-                "use of undeclared identifier",
-                "no member named",
-                "Couldn't lookup symbols",
-                "Couldn't look up symbols",
-                "reference to local variable",
-                "invalid use of 'this' outside of a non-static member function",
-            ]
-        )
-
-        is_optimized_away = any(
-            s in error_string
-            for s in [
-                "value may have been optimized out",
-            ]
-        )
-
-        is_irretrievable = any(
-            s in error_string
-            for s in [
-                "couldn't get the value of variable",
-                "couldn't read its memory",
-                "couldn't read from memory",
-                "Cannot access memory at address",
-                "invalid address (fault address:",
-            ]
-        )
-
-        if could_evaluate and not is_irretrievable and not is_optimized_away:
-            assert error_string == "success", (error_string, expression, value)
-            # assert result.value is not None, (result.value, expression)
-
-        if error_string == "success":
-            error_string = None
-
-        # attempt to find expression as a variable, if found, take the variable
-        # obj's type information as it's 'usually' more accurate.
-        var_result = self._thread.GetFrameAtIndex(frame_idx).FindVariable(expression)
-        if str(var_result.error) == "success":
-            type_name = var_result.type.GetDisplayTypeName()
-        else:
-            type_name = result.type.GetDisplayTypeName()
-
-        return ValueIR(
-            expression=expression,
-            value=value,
-            type_name=type_name,
-            error_string=error_string,
-            could_evaluate=could_evaluate,
-            is_optimized_away=is_optimized_away,
-            is_irretrievable=is_irretrievable,
-        )
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/__init__.py
deleted file mode 100644
index 1282f2ddc90879..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/lldb/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from dex.debugger.lldb.LLDB import LLDB
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio.py
deleted file mode 100644
index 17587b3f3e18d6..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio.py
+++ /dev/null
@@ -1,448 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Interface for communicating with the Visual Studio debugger via DTE."""
-
-import abc
-import imp
-import os
-import sys
-from enum import IntEnum
-from pathlib import PurePath, Path
-from collections import defaultdict, namedtuple
-
-from dex.command.CommandBase import StepExpectInfo
-from dex.debugger.DebuggerBase import DebuggerBase, watch_is_active
-from dex.dextIR import FrameIR, LocIR, StepIR, StopReason, ValueIR
-from dex.dextIR import StackFrame, SourceLocation, ProgramState
-from dex.utils.Exceptions import Error, LoadDebuggerException
-from dex.utils.ReturnCode import ReturnCode
-
-
-def _load_com_module():
-    try:
-        module_info = imp.find_module(
-            "ComInterface", [os.path.join(os.path.dirname(__file__), "windows")]
-        )
-        return imp.load_module("ComInterface", *module_info)
-    except ImportError as e:
-        raise LoadDebuggerException(e, sys.exc_info())
-
-
-# VSBreakpoint(path: PurePath, line: int, col: int, cond: str).  This is enough
-# info to identify breakpoint equivalence in visual studio based on the
-# properties we set through dexter currently.
-VSBreakpoint = namedtuple("VSBreakpoint", "path, line, col, cond")
-
-
-# Visual Studio events.
-# https://learn.microsoft.com/en-us/dotnet/api/envdte.dbgeventreason?view=visualstudiosdk-2022
-class DbgEvent(IntEnum):
-    dbgEventReasonNone = 1
-    dbgEventReasonGo = 2
-    dbgEventReasonAttachProgram = 3
-    dbgEventReasonDetachProgram = 4
-    dbgEventReasonLaunchProgram = 5
-    dbgEventReasonEndProgram = 6
-    dbgEventReasonStopDebugging = 7
-    dbgEventReasonStep = 8
-    dbgEventReasonBreakpoint = 9
-    dbgEventReasonExceptionThrown = 10
-    dbgEventReasonExceptionNotHandled = 11
-    dbgEventReasonUserBreak = 12
-    dbgEventReasonContextSwitch = 13
-
-    first = dbgEventReasonNone
-    last = dbgEventReasonContextSwitch
-
-class VisualStudio(
-    DebuggerBase, metaclass=abc.ABCMeta
-):  # pylint: disable=abstract-method
-    # Constants for results of Debugger.CurrentMode
-    # (https://msdn.microsoft.com/en-us/library/envdte.debugger.currentmode.aspx)
-    dbgDesignMode = 1
-    dbgBreakMode = 2
-    dbgRunMode = 3
-
-    def __init__(self, *args):
-        self.com_module = None
-        self._debugger = None
-        self._solution = None
-        self._fn_step = None
-        self._fn_go = None
-        # The next available unique breakpoint id. Use self._get_next_id().
-        self._next_bp_id = 0
-        # VisualStudio appears to common identical breakpoints. That is, if you
-        # ask for a breakpoint that already exists the Breakpoints list will
-        # not grow. DebuggerBase requires all breakpoints have a unique id,
-        # even for duplicates, so we'll need to do some bookkeeping.  Map
-        # {VSBreakpoint: list(id)} where id is the unique dexter-side id for
-        # the requested breakpoint.
-        self._vs_to_dex_ids = defaultdict(list)
-        # Map {id: VSBreakpoint} where id is unique and VSBreakpoint identifies
-        # a breakpoint in Visual Studio. There may be many ids mapped to a
-        # single VSBreakpoint. Use self._vs_to_dex_ids to find (dexter)
-        # breakpoints mapped to the same visual studio breakpoint.
-        self._dex_id_to_vs = {}
-
-        super(VisualStudio, self).__init__(*args)
-
-    def _create_solution(self):
-        self._solution.Create(self.context.working_directory.path, "DexterSolution")
-        try:
-            self._solution.AddFromFile(self._project_file)
-        except OSError:
-            raise LoadDebuggerException(
-                "could not debug the specified executable", sys.exc_info()
-            )
-
-    def _load_solution(self):
-        try:
-            self._solution.Open(self.context.options.vs_solution)
-        except:
-            raise LoadDebuggerException(
-                "could not load specified vs solution at {}".format(
-                    self.context.options.vs_solution
-                ),
-                sys.exc_info(),
-            )
-
-    def _custom_init(self):
-        try:
-            self._debugger = self._interface.Debugger
-            self._debugger.HexDisplayMode = False
-
-            self._interface.MainWindow.Visible = self.context.options.show_debugger
-
-            self._solution = self._interface.Solution
-            if self.context.options.vs_solution is None:
-                self._create_solution()
-            else:
-                self._load_solution()
-
-            self._fn_step = self._debugger.StepInto
-            self._fn_go = self._debugger.Go
-
-        except AttributeError as e:
-            raise LoadDebuggerException(str(e), sys.exc_info())
-
-    def _custom_exit(self):
-        if self._interface:
-            self._interface.Quit()
-
-    @property
-    def _project_file(self):
-        return self.context.options.executable
-
-    @abc.abstractproperty
-    def _dte_version(self):
-        pass
-
-    @property
-    def _location(self):
-        # TODO: Find a better way of determining path, line and column info
-        # that doesn't require reading break points. This method requires
-        # all lines to have a break point on them.
-        bp = self._debugger.BreakpointLastHit
-        return {
-            "path": getattr(bp, "File", None),
-            "lineno": getattr(bp, "FileLine", None),
-            "column": getattr(bp, "FileColumn", None),
-        }
-
-    @property
-    def _mode(self):
-        return self._debugger.CurrentMode
-
-    def _load_interface(self):
-        self.com_module = _load_com_module()
-        return self.com_module.DTE(self._dte_version)
-
-    @property
-    def version(self):
-        try:
-            return self._interface.Version
-        except AttributeError:
-            return None
-
-    def clear_breakpoints(self):
-        for bp in self._debugger.Breakpoints:
-            bp.Delete()
-        self._vs_to_dex_ids.clear()
-        self._dex_id_to_vs.clear()
-
-    def _add_breakpoint(self, file_, line):
-        return self._add_conditional_breakpoint(file_, line, "")
-
-    def _get_next_id(self):
-        # "Generate" a new unique id for the breakpoint.
-        id = self._next_bp_id
-        self._next_bp_id += 1
-        return id
-
-    def _add_conditional_breakpoint(self, file_, line, condition):
-        col = 1
-        vsbp = VSBreakpoint(PurePath(file_), line, col, condition)
-        new_id = self._get_next_id()
-
-        # Do we have an exact matching breakpoint already?
-        if vsbp in self._vs_to_dex_ids:
-            self._vs_to_dex_ids[vsbp].append(new_id)
-            self._dex_id_to_vs[new_id] = vsbp
-            return new_id
-
-        # Breakpoint doesn't exist already. Add it now.
-        count_before = self._debugger.Breakpoints.Count
-        self._debugger.Breakpoints.Add("", file_, line, col, condition)
-        # Our internal representation of VS says that the breakpoint doesn't
-        # already exist so we do not expect this operation to fail here.
-        assert count_before < self._debugger.Breakpoints.Count
-        # We've added a new breakpoint, record its id.
-        self._vs_to_dex_ids[vsbp].append(new_id)
-        self._dex_id_to_vs[new_id] = vsbp
-        return new_id
-
-    def get_triggered_breakpoint_ids(self):
-        """Returns a set of opaque ids for just-triggered breakpoints."""
-        bps_hit = self._debugger.AllBreakpointsLastHit
-        bp_id_list = []
-        # Intuitively, AllBreakpointsLastHit breakpoints are the last hit
-        # _bound_ breakpoints. A bound breakpoint's parent holds the info of
-        # the breakpoint the user requested. Our internal state tracks the user
-        # requested breakpoints so we look at the Parent of these triggered
-        # breakpoints to determine which have been hit.
-        for bp in bps_hit:
-            # All bound breakpoints should have the user-defined breakpoint as
-            # a parent.
-            assert bp.Parent
-            vsbp = VSBreakpoint(
-                PurePath(bp.Parent.File),
-                bp.Parent.FileLine,
-                bp.Parent.FileColumn,
-                bp.Parent.Condition,
-            )
-            try:
-                ids = self._vs_to_dex_ids[vsbp]
-            except KeyError:
-                pass
-            else:
-                bp_id_list += ids
-        return set(bp_id_list)
-
-    def delete_breakpoints(self, ids):
-        """Delete breakpoints by their ids.
-
-        Raises a KeyError if no breakpoint with this id exists.
-        """
-        vsbp_set = set()
-        for id in ids:
-            vsbp = self._dex_id_to_vs[id]
-
-            # Remove our id from the associated list of dex ids.
-            self._vs_to_dex_ids[vsbp].remove(id)
-            del self._dex_id_to_vs[id]
-
-            # Bail if there are other uses of this vsbp.
-            if len(self._vs_to_dex_ids[vsbp]) > 0:
-                continue
-            # Otherwise find and delete it.
-            vsbp_set.add(vsbp)
-
-        vsbp_to_del_count = len(vsbp_set)
-
-        for bp in self._debugger.Breakpoints:
-            # We're looking at the user-set breakpoints so there should be no
-            # Parent.
-            assert bp.Parent == None
-            this_vsbp = VSBreakpoint(
-                PurePath(bp.File), bp.FileLine, bp.FileColumn, bp.Condition
-            )
-            if this_vsbp in vsbp_set:
-                bp.Delete()
-                vsbp_to_del_count -= 1
-                if vsbp_to_del_count == 0:
-                    break
-        if vsbp_to_del_count:
-            raise KeyError("did not find breakpoint to be deleted")
-
-    def _fetch_property(self, props, name):
-        num_props = props.Count
-        result = None
-        for x in range(1, num_props + 1):
-            item = props.Item(x)
-            if item.Name == name:
-                return item
-        assert False, "Couldn't find property {}".format(name)
-
-    def launch(self, cmdline):
-        exe_path = Path(self.context.options.executable)
-        self.context.logger.note(f"VS: Using executable: '{exe_path}'")
-        cmdline_str = " ".join(cmdline)
-        if self.context.options.target_run_args:
-            cmdline_str += f" {self.context.options.target_run_args}"
-        if cmdline_str:
-            self.context.logger.note(f"VS: Using executable args: '{cmdline_str}'")
-
-        # In a slightly baroque manner, lookup the VS project that runs when
-        # you click "run", and set its command line options to the desired
-        # command line options.
-        startup_proj_name = str(
-            self._fetch_property(self._interface.Solution.Properties, "StartupProject")
-        )
-        project = self._fetch_property(self._interface.Solution, startup_proj_name)
-        ActiveConfiguration = self._fetch_property(
-            project.Properties, "ActiveConfiguration"
-        ).Object
-        ActiveConfiguration.DebugSettings.CommandArguments = cmdline_str
-        ConfigurationName = ActiveConfiguration.ConfigurationName
-        SolConfig = self._fetch_property(
-            self._interface.Solution.SolutionBuild.SolutionConfigurations,
-            ConfigurationName,
-        )
-        for Context in SolConfig.SolutionContexts:
-            Context.ShouldBuild = False
-
-        self.context.logger.note("Launching VS debugger...")
-        self._fn_go(False)
-
-    def step(self):
-        self._fn_step(False)
-
-    def go(self) -> ReturnCode:
-        self._fn_go(False)
-        return ReturnCode.OK
-
-    def set_current_stack_frame(self, idx: int = 0):
-        thread = self._debugger.CurrentThread
-        stack_frames = thread.StackFrames
-        try:
-            stack_frame = stack_frames[idx]
-            self._debugger.CurrentStackFrame = stack_frame.raw
-        except IndexError:
-            raise Error(
-                "attempted to access stack frame {} out of {}".format(
-                    idx, len(stack_frames)
-                )
-            )
-
-    def _translate_stop_reason(self, reason):
-        if reason == DbgEvent.dbgEventReasonNone:
-            return None
-        if reason == DbgEvent.dbgEventReasonBreakpoint:
-            return StopReason.BREAKPOINT
-        if reason == DbgEvent.dbgEventReasonStep:
-            return StopReason.STEP
-        if reason == DbgEvent.dbgEventReasonEndProgram:
-            return StopReason.PROGRAM_EXIT
-        if reason == DbgEvent.dbgEventReasonExceptionNotHandled:
-            return StopReason.ERROR
-        assert reason <= DbgEvent.last and reason >= DbgEvent.first
-        return StopReason.OTHER
-
-    def _get_step_info(self, watches, step_index):
-        thread = self._debugger.CurrentThread
-        stackframes = thread.StackFrames
-
-        frames = []
-        state_frames = []
-
-        loc = LocIR(**self._location)
-        valid_loc_for_watch = loc.path and os.path.exists(loc.path)
-
-        for idx, sf in enumerate(stackframes):
-            frame = FrameIR(
-                function=self._sanitize_function_name(sf.FunctionName),
-                is_inlined=sf.FunctionName.startswith("[Inline Frame]"),
-                loc=LocIR(path=None, lineno=None, column=None),
-            )
-
-            fname = frame.function or ""  # pylint: disable=no-member
-            if any(name in fname for name in self.frames_below_main):
-                break
-
-            state_frame = StackFrame(
-                function=frame.function, is_inlined=frame.is_inlined, watches={}
-            )
-
-            if valid_loc_for_watch and idx == 0:
-                for watch_info in watches:
-                    if watch_is_active(watch_info, loc.path, idx, loc.lineno):
-                        watch_expr = watch_info.expression
-                        state_frame.watches[watch_expr] = self.evaluate_expression(
-                            watch_expr, idx
-                        )
-
-            state_frames.append(state_frame)
-            frames.append(frame)
-
-        if frames:
-            frames[0].loc = loc
-            state_frames[0].location = SourceLocation(**self._location)
-
-        stop_reason = self._translate_stop_reason(self._debugger.LastBreakReason)
-        program_state = ProgramState(frames=state_frames)
-
-        return StepIR(
-            step_index=step_index,
-            frames=frames,
-            stop_reason=stop_reason,
-            program_state=program_state,
-        )
-
-    @property
-    def is_running(self):
-        return self._mode == VisualStudio.dbgRunMode
-
-    @property
-    def is_finished(self):
-        return self._mode == VisualStudio.dbgDesignMode
-
-    @property
-    def frames_below_main(self):
-        return [
-            "[Inline Frame] invoke_main",
-            "__scrt_common_main_seh",
-            "__tmainCRTStartup",
-            "mainCRTStartup",
-        ]
-
-    def evaluate_expression(self, expression, frame_idx=0) -> ValueIR:
-        if frame_idx != 0:
-            self.set_current_stack_frame(frame_idx)
-        result = self._debugger.GetExpression(expression)
-        if frame_idx != 0:
-            self.set_current_stack_frame(0)
-        value = result.Value
-
-        is_optimized_away = any(
-            s in value
-            for s in [
-                "Variable is optimized away and not available",
-                "Value is not available, possibly due to optimization",
-            ]
-        )
-
-        is_irretrievable = any(
-            s in value
-            for s in [
-                "???",
-                "<Unable to read memory>",
-            ]
-        )
-
-        # an optimized away value is still counted as being able to be
-        # evaluated.
-        could_evaluate = result.IsValidValue or is_optimized_away or is_irretrievable
-
-        return ValueIR(
-            expression=expression,
-            value=value,
-            type_name=result.Type,
-            error_string=None,
-            is_optimized_away=is_optimized_away,
-            could_evaluate=could_evaluate,
-            is_irretrievable=is_irretrievable,
-        )
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2015.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2015.py
deleted file mode 100644
index 3c5c5ea0124beb..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2015.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Specializations for the Visual Studio 2015 interface."""
-
-from dex.debugger.visualstudio.VisualStudio import VisualStudio
-
-
-class VisualStudio2015(VisualStudio):
-    @classmethod
-    def get_name(cls):
-        return "Visual Studio 2015"
-
-    @classmethod
-    def get_option_name(cls):
-        return "vs2015"
-
-    @property
-    def _dte_version(self):
-        return "VisualStudio.DTE.14.0"
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2017.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2017.py
deleted file mode 100644
index fa28df75bd7612..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2017.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Specializations for the Visual Studio 2017 interface."""
-
-from dex.debugger.visualstudio.VisualStudio import VisualStudio
-
-
-class VisualStudio2017(VisualStudio):
-    @classmethod
-    def get_name(cls):
-        return "Visual Studio 2017"
-
-    @classmethod
-    def get_option_name(cls):
-        return "vs2017"
-
-    @property
-    def _dte_version(self):
-        return "VisualStudio.DTE.15.0"
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2019.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2019.py
deleted file mode 100644
index 7a9ba1849167a4..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2019.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Specializations for the Visual Studio 2019 interface."""
-
-from dex.debugger.visualstudio.VisualStudio import VisualStudio
-
-
-class VisualStudio2019(VisualStudio):
-    @classmethod
-    def get_name(cls):
-        return "Visual Studio 2019"
-
-    @classmethod
-    def get_option_name(cls):
-        return "vs2019"
-
-    @property
-    def _dte_version(self):
-        return "VisualStudio.DTE.16.0"
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2022.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2022.py
deleted file mode 100644
index 6fcf8af4acabc1..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/VisualStudio2022.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Specializations for the Visual Studio 2022 interface."""
-
-from dex.debugger.visualstudio.VisualStudio import VisualStudio
-
-
-class VisualStudio2022(VisualStudio):
-    @classmethod
-    def get_name(cls):
-        return "Visual Studio 2022"
-
-    @classmethod
-    def get_option_name(cls):
-        return "vs2022"
-
-    @property
-    def _dte_version(self):
-        return "VisualStudio.DTE.17.0"
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/__init__.py
deleted file mode 100644
index 35fefacf22f95e..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/__init__.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from dex.debugger.visualstudio.VisualStudio2015 import VisualStudio2015
-from dex.debugger.visualstudio.VisualStudio2017 import VisualStudio2017
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/windows/ComInterface.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/windows/ComInterface.py
deleted file mode 100644
index 84f43360c4480b..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/windows/ComInterface.py
+++ /dev/null
@@ -1,123 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Communication via the Windows COM interface."""
-
-import inspect
-import time
-import sys
-
-# pylint: disable=import-error
-import win32com.client as com
-import win32api
-
-# pylint: enable=import-error
-
-from dex.utils.Exceptions import LoadDebuggerException
-
-_com_error = com.pywintypes.com_error  # pylint: disable=no-member
-
-
-def get_file_version(file_):
-    try:
-        info = win32api.GetFileVersionInfo(file_, "\\")
-        ms = info["FileVersionMS"]
-        ls = info["FileVersionLS"]
-        return ".".join(
-            str(s)
-            for s in [
-                win32api.HIWORD(ms),
-                win32api.LOWORD(ms),
-                win32api.HIWORD(ls),
-                win32api.LOWORD(ls),
-            ]
-        )
-    except com.pywintypes.error:  # pylint: disable=no-member
-        return "no versioninfo present"
-
-
-def _handle_com_error(e):
-    exc = sys.exc_info()
-    msg = win32api.FormatMessage(e.hresult)
-    try:
-        msg = msg.decode("CP1251")
-    except AttributeError:
-        pass
-    msg = msg.strip()
-    return msg, exc
-
-
-class ComObject(object):
-    """Wrap a raw Windows COM object in a class that implements auto-retry of
-    failed calls.
-    """
-
-    def __init__(self, raw):
-        assert not isinstance(raw, ComObject), raw
-        self.__dict__["raw"] = raw
-
-    def __str__(self):
-        return self._call(self.raw.__str__)
-
-    def __getattr__(self, key):
-        if key in self.__dict__:
-            return self.__dict__[key]
-        return self._call(self.raw.__getattr__, key)
-
-    def __setattr__(self, key, val):
-        if key in self.__dict__:
-            self.__dict__[key] = val
-        self._call(self.raw.__setattr__, key, val)
-
-    def __getitem__(self, key):
-        return self._call(self.raw.__getitem__, key)
-
-    def __setitem__(self, key, val):
-        self._call(self.raw.__setitem__, key, val)
-
-    def __call__(self, *args):
-        return self._call(self.raw, *args)
-
-    @classmethod
-    def _call(cls, fn, *args):
-        """COM calls tend to randomly fail due to thread sync issues.
-        The Microsoft recommended solution is to set up a message filter object
-        to automatically retry failed calls, but this seems prohibitively hard
-        from python, so this is a custom solution to do the same thing.
-        All COM accesses should go through this function.
-        """
-        ex = AssertionError("this should never be raised!")
-
-        assert (
-            inspect.isfunction(fn) or inspect.ismethod(fn) or inspect.isbuiltin(fn)
-        ), (fn, type(fn))
-        retries = ([0] * 50) + ([1] * 5)
-        for r in retries:
-            try:
-                try:
-                    result = fn(*args)
-                    if inspect.ismethod(result) or "win32com" in str(result.__class__):
-                        result = ComObject(result)
-                    return result
-                except _com_error as e:
-                    msg, _ = _handle_com_error(e)
-                    e = WindowsError(msg)  # pylint: disable=undefined-variable
-                    raise e
-            except (AttributeError, TypeError, OSError) as e:
-                ex = e
-                time.sleep(r)
-        raise ex
-
-
-class DTE(ComObject):
-    def __init__(self, class_string):
-        try:
-            super(DTE, self).__init__(com.DispatchEx(class_string))
-        except _com_error as e:
-            msg, exc = _handle_com_error(e)
-            raise LoadDebuggerException(
-                "{} [{}]".format(msg, class_string), orig_exception=exc
-            )
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/windows/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/windows/__init__.py
deleted file mode 100644
index 1194affd89132c..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/debugger/visualstudio/windows/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/BuilderIR.py b/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/BuilderIR.py
deleted file mode 100644
index 953b1da56ef05c..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/BuilderIR.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-
-class BuilderIR:
-    """Data class which represents the compiler related options passed to Dexter"""
-
-    def __init__(self, name: str, cflags: str, ldflags: str):
-        self.name = name
-        self.cflags = cflags
-        self.ldflags = ldflags
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/DebuggerIR.py b/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/DebuggerIR.py
deleted file mode 100644
index 5956db602b447f..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/DebuggerIR.py
+++ /dev/null
@@ -1,14 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-
-class DebuggerIR:
-    """Data class which represents a debugger."""
-
-    def __init__(self, name: str, version: str):
-        self.name = name
-        self.version = version
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/DextIR.py b/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/DextIR.py
deleted file mode 100644
index 42500c4b9681d2..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/DextIR.py
+++ /dev/null
@@ -1,148 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-from collections import OrderedDict
-import os
-from typing import List
-
-from dex.dextIR.DebuggerIR import DebuggerIR
-from dex.dextIR.StepIR import StepIR, StepKind
-
-
-def _step_kind_func(context, step):
-    if step.current_location.path is None or not os.path.exists(
-        step.current_location.path
-    ):
-        return StepKind.FUNC_UNKNOWN
-
-    if any(
-        os.path.samefile(step.current_location.path, f)
-        for f in context.options.source_files
-    ):
-        return StepKind.FUNC
-
-    return StepKind.FUNC_EXTERNAL
-
-
-class DextIR:
-    """A full Dexter test report.
-
-    This is composed of all the other *IR classes. They are used together to
-    record Dexter inputs and the resultant debugger steps, providing a single
-    high level access container.
-
-    The Heuristic class works with dexter commands and the generated DextIR to
-    determine the debugging score for a given test.
-
-    Args:
-        commands: { name (str), commands (list[CommandIR])
-    """
-
-    def __init__(
-        self,
-        dexter_version: str,
-        executable_path: str,
-        source_paths: List[str],
-        debugger: DebuggerIR = None,
-        commands: OrderedDict = None,
-    ):
-        self.dexter_version = dexter_version
-        self.executable_path = executable_path
-        self.source_paths = source_paths
-        self.debugger = debugger
-        self.commands = commands
-        self.steps: List[StepIR] = []
-
-    def __str__(self):
-        colors = "rgby"
-        st = "## BEGIN ##\n"
-        color_idx = 0
-        for step in self.steps:
-            if step.step_kind in (
-                StepKind.FUNC,
-                StepKind.FUNC_EXTERNAL,
-                StepKind.FUNC_UNKNOWN,
-            ):
-                color_idx += 1
-
-            color = colors[color_idx % len(colors)]
-            st += "<{}>{}</>\n".format(color, step)
-        st += "## END ({} step{}) ##\n".format(
-            self.num_steps, "" if self.num_steps == 1 else "s"
-        )
-        return st
-
-    @property
-    def num_steps(self):
-        return len(self.steps)
-
-    def _get_prev_step_in_this_frame(self, step):
-        """Find the most recent step in the same frame as `step`.
-
-        Returns:
-            StepIR or None if there is no previous step in this frame.
-        """
-        return next(
-            (
-                s
-                for s in reversed(self.steps)
-                if s.current_function == step.current_function
-                and s.num_frames == step.num_frames
-            ),
-            None,
-        )
-
-    def _get_new_step_kind(self, context, step):
-        if step.current_function is None:
-            return StepKind.UNKNOWN
-
-        if len(self.steps) == 0:
-            return _step_kind_func(context, step)
-
-        prev_step = self.steps[-1]
-
-        if prev_step.current_function is None:
-            return StepKind.UNKNOWN
-
-        if prev_step.num_frames < step.num_frames:
-            return _step_kind_func(context, step)
-
-        if prev_step.num_frames > step.num_frames:
-            frame_step = self._get_prev_step_in_this_frame(step)
-            prev_step = frame_step if frame_step is not None else prev_step
-
-        # If we're missing line numbers to compare then the step kind has to be UNKNOWN.
-        if (
-            prev_step.current_location.lineno is None
-            or step.current_location.lineno is None
-        ):
-            return StepKind.UNKNOWN
-
-        # We're in the same func as prev step, check lineo.
-        if prev_step.current_location.lineno > step.current_location.lineno:
-            return StepKind.VERTICAL_BACKWARD
-
-        if prev_step.current_location.lineno < step.current_location.lineno:
-            return StepKind.VERTICAL_FORWARD
-
-        # We're on the same line as prev step, check column.
-        if prev_step.current_location.column > step.current_location.column:
-            return StepKind.HORIZONTAL_BACKWARD
-
-        if prev_step.current_location.column < step.current_location.column:
-            return StepKind.HORIZONTAL_FORWARD
-
-        # This step is in exactly the same location as the prev step.
-        return StepKind.SAME
-
-    def new_step(self, context, step):
-        assert isinstance(step, StepIR), type(step)
-        step.step_kind = self._get_new_step_kind(context, step)
-        self.steps.append(step)
-        return step
-
-    def clear_steps(self):
-        self.steps.clear()
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/FrameIR.py b/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/FrameIR.py
deleted file mode 100644
index a2c0523b47b79d..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/FrameIR.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-from dex.dextIR.LocIR import LocIR
-
-
-class FrameIR:
-    """Data class which represents a frame in the call stack"""
-
-    def __init__(self, function: str, is_inlined: bool, loc: LocIR):
-        self.function = function
-        self.is_inlined = is_inlined
-        self.loc = loc
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/LocIR.py b/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/LocIR.py
deleted file mode 100644
index 9f98a67b5aada0..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/LocIR.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-import os
-
-
-class LocIR:
-    """Data class which represents a source location."""
-
-    def __init__(self, path: str, lineno: int, column: int):
-        if path:
-            path = os.path.normcase(path)
-        self.path = path
-        self.lineno = lineno
-        self.column = column
-
-    def __str__(self):
-        return "{}({}:{})".format(self.path, self.lineno, self.column)
-
-    def __eq__(self, rhs):
-        return (
-            os.path.exists(self.path)
-            and os.path.exists(rhs.path)
-            and os.path.samefile(self.path, rhs.path)
-            and self.lineno == rhs.lineno
-            and self.column == rhs.column
-        )
-
-    def __lt__(self, rhs):
-        if self.path != rhs.path:
-            return False
-
-        if self.lineno == rhs.lineno:
-            return self.column < rhs.column
-
-        return self.lineno < rhs.lineno
-
-    def __gt__(self, rhs):
-        if self.path != rhs.path:
-            return False
-
-        if self.lineno == rhs.lineno:
-            return self.column > rhs.column
-
-        return self.lineno > rhs.lineno
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/ProgramState.py b/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/ProgramState.py
deleted file mode 100644
index a3b6b3aba488ce..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/ProgramState.py
+++ /dev/null
@@ -1,130 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Set of data classes for representing the complete debug program state at a
-fixed point in execution.
-"""
-
-import os
-
-from collections import OrderedDict
-from pathlib import PurePath
-from typing import List
-
-
-class SourceLocation:
-    def __init__(self, path: str = None, lineno: int = None, column: int = None):
-        if path:
-            path = os.path.normcase(path)
-        self.path = path
-        self.lineno = lineno
-        self.column = column
-
-    def __str__(self):
-        return "{}({}:{})".format(self.path, self.lineno, self.column)
-
-    def match(self, other) -> bool:
-        """Returns true iff all the properties that appear in `self` have the
-        same value in `other`, but not necessarily vice versa.
-        """
-        if not other or not isinstance(other, SourceLocation):
-            return False
-
-        if self.path and (
-            other.path is None or (PurePath(self.path) != PurePath(other.path))
-        ):
-            return False
-
-        if self.lineno and (self.lineno != other.lineno):
-            return False
-
-        if self.column and (self.column != other.column):
-            return False
-
-        return True
-
-
-class StackFrame:
-    def __init__(
-        self,
-        function: str = None,
-        is_inlined: bool = None,
-        location: SourceLocation = None,
-        watches: OrderedDict = None,
-    ):
-        if watches is None:
-            watches = {}
-
-        self.function = function
-        self.is_inlined = is_inlined
-        self.location = location
-        self.watches = watches
-
-    def __str__(self):
-        return "{}{}: {} | {}".format(
-            self.function,
-            " (inlined)" if self.is_inlined else "",
-            self.location,
-            {k: str(self.watches[k]) for k in self.watches},
-        )
-
-    def match(self, other) -> bool:
-        """Returns true iff all the properties that appear in `self` have the
-        same value in `other`, but not necessarily vice versa.
-        """
-        if not other or not isinstance(other, StackFrame):
-            return False
-
-        if self.location and not self.location.match(other.location):
-            return False
-
-        if self.watches:
-            for name in iter(self.watches):
-                try:
-                    if isinstance(self.watches[name], dict):
-                        for attr in iter(self.watches[name]):
-                            if (
-                                getattr(other.watches[name], attr, None)
-                                != self.watches[name][attr]
-                            ):
-                                return False
-                    else:
-                        if other.watches[name].value != self.watches[name]:
-                            return False
-                except KeyError:
-                    return False
-
-        return True
-
-
-class ProgramState:
-    def __init__(self, frames: List[StackFrame] = None):
-        self.frames = frames
-
-    def __str__(self):
-        return "\n".join(
-            map(
-                lambda enum: "Frame {}: {}".format(enum[0], enum[1]),
-                enumerate(self.frames),
-            )
-        )
-
-    def match(self, other) -> bool:
-        """Returns true iff all the properties that appear in `self` have the
-        same value in `other`, but not necessarily vice versa.
-        """
-        if not other or not isinstance(other, ProgramState):
-            return False
-
-        if self.frames:
-            for idx, frame in enumerate(self.frames):
-                try:
-                    if not frame.match(other.frames[idx]):
-                        return False
-                except (IndexError, KeyError):
-                    return False
-
-        return True
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/StepIR.py b/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/StepIR.py
deleted file mode 100644
index b6c965e5e7d2bd..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/StepIR.py
+++ /dev/null
@@ -1,110 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Classes which are used to represent debugger steps."""
-
-import json
-
-from collections import OrderedDict
-from typing import List
-from enum import Enum
-from dex.dextIR.FrameIR import FrameIR
-from dex.dextIR.LocIR import LocIR
-from dex.dextIR.ProgramState import ProgramState
-
-
-class StopReason(Enum):
-    BREAKPOINT = 0
-    STEP = 1
-    PROGRAM_EXIT = 2
-    ERROR = 3
-    OTHER = 4
-
-
-class StepKind(Enum):
-    FUNC = 0
-    FUNC_EXTERNAL = 1
-    FUNC_UNKNOWN = 2
-    VERTICAL_FORWARD = 3
-    SAME = 4
-    VERTICAL_BACKWARD = 5
-    UNKNOWN = 6
-    HORIZONTAL_FORWARD = 7
-    HORIZONTAL_BACKWARD = 8
-
-
-class StepIR:
-    """A debugger step.
-
-    Args:
-        watches (OrderedDict): { expression (str), result (ValueIR) }
-    """
-
-    def __init__(
-        self,
-        step_index: int,
-        stop_reason: StopReason,
-        frames: List[FrameIR],
-        step_kind: StepKind = None,
-        watches: OrderedDict = None,
-        program_state: ProgramState = None,
-    ):
-        self.step_index = step_index
-        self.step_kind = step_kind
-        self.stop_reason = stop_reason
-        self.program_state = program_state
-
-        if frames is None:
-            frames = []
-        self.frames = frames
-
-        if watches is None:
-            watches = {}
-        self.watches = watches
-
-    def __str__(self):
-        try:
-            frame = self.current_frame
-            frame_info = (
-                frame.function,
-                frame.loc.path,
-                frame.loc.lineno,
-                frame.loc.column,
-            )
-        except AttributeError:
-            frame_info = (None, None, None, None)
-
-        step_info = (
-            (self.step_index,)
-            + frame_info
-            + (str(self.stop_reason), str(self.step_kind), [w for w in self.watches])
-        )
-
-        return "{}{}".format(".   " * (self.num_frames - 1), json.dumps(step_info))
-
-    @property
-    def num_frames(self):
-        return len(self.frames)
-
-    @property
-    def current_frame(self):
-        if not len(self.frames):
-            return None
-        return self.frames[0]
-
-    @property
-    def current_function(self):
-        try:
-            return self.current_frame.function
-        except AttributeError:
-            return None
-
-    @property
-    def current_location(self):
-        try:
-            return self.current_frame.loc
-        except AttributeError:
-            return LocIR(path=None, lineno=None, column=None)
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/ValueIR.py b/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/ValueIR.py
deleted file mode 100644
index 770f646258f739..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/ValueIR.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-
-class ValueIR:
-    """Data class to store the result of an expression evaluation."""
-
-    def __init__(
-        self,
-        expression: str,
-        value: str,
-        type_name: str,
-        could_evaluate: bool,
-        error_string: str = None,
-        is_optimized_away: bool = False,
-        is_irretrievable: bool = False,
-    ):
-        self.expression = expression
-        self.value = value
-        self.type_name = type_name
-        self.could_evaluate = could_evaluate
-        self.error_string = error_string
-        self.is_optimized_away = is_optimized_away
-        self.is_irretrievable = is_irretrievable
-
-    def __str__(self):
-        prefix = '"{}": '.format(self.expression)
-        if self.error_string is not None:
-            return prefix + self.error_string
-        if self.value is not None:
-            return prefix + "({}) {}".format(self.type_name, self.value)
-        return (
-            prefix
-            + "could_evaluate: {}; irretrievable: {}; optimized_away: {};".format(
-                self.could_evaluate, self.is_irretrievable, self.is_optimized_away
-            )
-        )
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/__init__.py
deleted file mode 100644
index 1c4098651992a2..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/dextIR/__init__.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""dextIR: DExTer Intermediate Representation of DExTer's debugger trace output.
-"""
-
-from dex.dextIR.DextIR import DextIR
-from dex.dextIR.DebuggerIR import DebuggerIR
-from dex.dextIR.FrameIR import FrameIR
-from dex.dextIR.LocIR import LocIR
-from dex.dextIR.StepIR import StepIR, StepKind, StopReason
-from dex.dextIR.ValueIR import ValueIR
-from dex.dextIR.ProgramState import ProgramState, SourceLocation, StackFrame
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/heuristic/Heuristic.py b/cross-project-tests/debuginfo-tests/dexter/dex/heuristic/Heuristic.py
deleted file mode 100644
index 5d1c5a777aba75..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/heuristic/Heuristic.py
+++ /dev/null
@@ -1,585 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Calculate a 'score' based on some dextIR.
-Assign penalties based on different commands to decrease the score.
-1.000 would be a perfect score.
-0.000 is the worst theoretical score possible.
-"""
-
-from collections import defaultdict, namedtuple, Counter
-import difflib
-import os
-from itertools import groupby
-from dex.command.StepValueInfo import StepValueInfo
-from dex.command.commands.DexExpectWatchBase import format_address
-
-
-PenaltyCommand = namedtuple("PenaltyCommand", ["pen_dict", "max_penalty"])
-# 'meta' field used in different ways by different things
-PenaltyInstance = namedtuple("PenaltyInstance", ["meta", "the_penalty"])
-
-
-def add_heuristic_tool_arguments(parser):
-    parser.add_argument(
-        "--penalty-variable-optimized",
-        type=int,
-        default=3,
-        help="set the penalty multiplier for each"
-        " occurrence of a variable that was optimized"
-        " away",
-        metavar="<int>",
-    )
-    parser.add_argument(
-        "--penalty-misordered-values",
-        type=int,
-        default=3,
-        help="set the penalty multiplier for each" " occurrence of a misordered value.",
-        metavar="<int>",
-    )
-    parser.add_argument(
-        "--penalty-irretrievable",
-        type=int,
-        default=4,
-        help="set the penalty multiplier for each"
-        " occurrence of a variable that couldn't"
-        " be retrieved",
-        metavar="<int>",
-    )
-    parser.add_argument(
-        "--penalty-not-evaluatable",
-        type=int,
-        default=5,
-        help="set the penalty multiplier for each"
-        " occurrence of a variable that couldn't"
-        " be evaluated",
-        metavar="<int>",
-    )
-    parser.add_argument(
-        "--penalty-missing-values",
-        type=int,
-        default=6,
-        help="set the penalty multiplier for each missing" " value",
-        metavar="<int>",
-    )
-    parser.add_argument(
-        "--penalty-incorrect-values",
-        type=int,
-        default=7,
-        help="set the penalty multiplier for each"
-        " occurrence of an unexpected value.",
-        metavar="<int>",
-    )
-    parser.add_argument(
-        "--penalty-unreachable",
-        type=int,
-        default=4,  # XXX XXX XXX selected by random
-        help="set the penalty for each line stepped onto that should"
-        " have been unreachable.",
-        metavar="<int>",
-    )
-    parser.add_argument(
-        "--penalty-misordered-steps",
-        type=int,
-        default=2,  # XXX XXX XXX selected by random
-        help="set the penalty for differences in the order of steps"
-        " the program was expected to observe.",
-        metavar="<int>",
-    )
-    parser.add_argument(
-        "--penalty-missing-step",
-        type=int,
-        default=4,  # XXX XXX XXX selected by random
-        help="set the penalty for the program skipping over a step.",
-        metavar="<int>",
-    )
-    parser.add_argument(
-        "--penalty-incorrect-program-state",
-        type=int,
-        default=4,  # XXX XXX XXX selected by random
-        help="set the penalty for the program never entering an expected state"
-        " or entering an unexpected state.",
-        metavar="<int>",
-    )
-
-
-class PenaltyLineRanges:
-    def __init__(self, first_step, penalty):
-        self.ranges = [(first_step, first_step)]
-        self.penalty = penalty
-
-    def add_step(self, next_step, penalty):
-        last_range = self.ranges[-1]
-        last_step = last_range[1]
-        if next_step == last_step + 1:
-            self.ranges[-1] = (last_range[0], next_step)
-        else:
-            self.ranges.append((next_step, next_step))
-        self.penalty += penalty
-
-    def __str__(self):
-        range_to_str = lambda r: str(r[0]) if r[0] == r[1] else f"{r[0]}-{r[1]}"
-        if self.ranges[0][0] == self.ranges[-1][1]:
-            text = f"step {self.ranges[0][0]}"
-        else:
-            step_list = ", ".join([range_to_str(r) for r in self.ranges])
-            text = f"steps [{step_list}]"
-        if self.penalty:
-            text += " <r>[-{}]</>".format(self.penalty)
-        return text
-
-
-class Heuristic(object):
-    def __init__(self, context, steps):
-        self.context = context
-        self.penalties = {}
-        self.address_resolutions = {}
-
-        worst_penalty = max(
-            [
-                self.penalty_variable_optimized,
-                self.penalty_irretrievable,
-                self.penalty_not_evaluatable,
-                self.penalty_incorrect_values,
-                self.penalty_missing_values,
-                self.penalty_unreachable,
-                self.penalty_missing_step,
-                self.penalty_misordered_steps,
-            ]
-        )
-
-        # Before evaluating scoring commands, evaluate address values.
-        try:
-            for command in steps.commands["DexDeclareAddress"]:
-                command.address_resolutions = self.address_resolutions
-                command.eval(steps)
-        except KeyError:
-            pass
-
-        # Get DexExpectWatchType results.
-        try:
-            for command in steps.commands["DexExpectWatchType"]:
-                command.eval(steps)
-                maximum_possible_penalty = min(3, len(command.values)) * worst_penalty
-                name, p = self._calculate_expect_watch_penalties(
-                    command, maximum_possible_penalty
-                )
-                name = name + " ExpectType"
-                self.penalties[name] = PenaltyCommand(p, maximum_possible_penalty)
-        except KeyError:
-            pass
-
-        # Get DexExpectWatchValue results.
-        try:
-            for command in steps.commands["DexExpectWatchValue"]:
-                command.address_resolutions = self.address_resolutions
-                command.eval(steps)
-                maximum_possible_penalty = min(3, len(command.values)) * worst_penalty
-                name, p = self._calculate_expect_watch_penalties(
-                    command, maximum_possible_penalty
-                )
-                name = name + " ExpectValue"
-                self.penalties[name] = PenaltyCommand(p, maximum_possible_penalty)
-        except KeyError:
-            pass
-
-        try:
-            penalties = defaultdict(list)
-            maximum_possible_penalty_all = 0
-            for expect_state in steps.commands["DexExpectProgramState"]:
-                success = expect_state.eval(steps)
-                p = 0 if success else self.penalty_incorrect_program_state
-
-                meta = "expected {}: {}".format(
-                    "{} times".format(expect_state.times)
-                    if expect_state.times >= 0
-                    else "at least once",
-                    expect_state.program_state_text,
-                )
-
-                if success:
-                    meta = "<g>{}</>".format(meta)
-
-                maximum_possible_penalty = self.penalty_incorrect_program_state
-                maximum_possible_penalty_all += maximum_possible_penalty
-                name = expect_state.program_state_text
-                penalties[meta] = [
-                    PenaltyInstance("{} times".format(len(expect_state.encounters)), p)
-                ]
-            self.penalties["expected program states"] = PenaltyCommand(
-                penalties, maximum_possible_penalty_all
-            )
-        except KeyError:
-            pass
-
-        # Get the total number of each step kind.
-        step_kind_counts = defaultdict(int)
-        for step in getattr(steps, "steps"):
-            step_kind_counts[step.step_kind] += 1
-
-        # Get DexExpectStepKind results.
-        penalties = defaultdict(list)
-        maximum_possible_penalty_all = 0
-        try:
-            for command in steps.commands["DexExpectStepKind"]:
-                command.eval()
-                # Cap the penalty at 2 * expected count or else 1
-                maximum_possible_penalty = max(command.count * 2, 1)
-                p = abs(command.count - step_kind_counts[command.name])
-                actual_penalty = min(p, maximum_possible_penalty)
-                key = (
-                    "{}".format(command.name)
-                    if actual_penalty
-                    else "<g>{}</>".format(command.name)
-                )
-                penalties[key] = [PenaltyInstance(p, actual_penalty)]
-                maximum_possible_penalty_all += maximum_possible_penalty
-            self.penalties["step kind differences"] = PenaltyCommand(
-                penalties, maximum_possible_penalty_all
-            )
-        except KeyError:
-            pass
-
-        if "DexUnreachable" in steps.commands:
-            cmds = steps.commands["DexUnreachable"]
-            unreach_count = 0
-
-            # Find steps with unreachable in them
-            ureachs = [s for s in steps.steps if "DexUnreachable" in s.watches.keys()]
-
-            # There's no need to match up cmds with the actual watches
-            upen = self.penalty_unreachable
-
-            count = upen * len(ureachs)
-            if count != 0:
-                d = dict()
-                for x in ureachs:
-                    msg = "line {} reached".format(x.current_location.lineno)
-                    d[msg] = [PenaltyInstance(upen, upen)]
-            else:
-                d = {"<g>No unreachable lines seen</>": [PenaltyInstance(0, 0)]}
-            total = PenaltyCommand(d, len(cmds) * upen)
-
-            self.penalties["unreachable lines"] = total
-
-        if "DexExpectStepOrder" in steps.commands:
-            cmds = steps.commands["DexExpectStepOrder"]
-
-            # Form a list of which line/cmd we _should_ have seen
-            cmd_num_lst = [(x, c.get_line()) for c in cmds for x in c.sequence]
-            # Order them by the sequence number
-            cmd_num_lst.sort(key=lambda t: t[0])
-            # Strip out sequence key
-            cmd_num_lst = [y for x, y in cmd_num_lst]
-
-            # Now do the same, but for the actually observed lines/cmds
-            ss = steps.steps
-            deso = [s for s in ss if "DexExpectStepOrder" in s.watches.keys()]
-            deso = [s.watches["DexExpectStepOrder"] for s in deso]
-            # We rely on the steps remaining in order here
-            order_list = [int(x.expression) for x in deso]
-
-            # First off, check to see whether or not there are missing items
-            expected = Counter(cmd_num_lst)
-            seen = Counter(order_list)
-
-            unseen_line_dict = dict()
-            skipped_line_dict = dict()
-
-            mispen = self.penalty_missing_step
-            num_missing = 0
-            num_repeats = 0
-            for k, v in expected.items():
-                if k not in seen:
-                    msg = "Line {} not seen".format(k)
-                    unseen_line_dict[msg] = [PenaltyInstance(mispen, mispen)]
-                    num_missing += v
-                elif v > seen[k]:
-                    msg = "Line {} skipped at least once".format(k)
-                    skipped_line_dict[msg] = [PenaltyInstance(mispen, mispen)]
-                    num_missing += v - seen[k]
-                elif v < seen[k]:
-                    # Don't penalise unexpected extra sightings of a line
-                    # for now
-                    num_repeats = seen[k] - v
-                    pass
-
-            if len(unseen_line_dict) == 0:
-                pi = PenaltyInstance(0, 0)
-                unseen_line_dict["<g>All lines were seen</>"] = [pi]
-
-            if len(skipped_line_dict) == 0:
-                pi = PenaltyInstance(0, 0)
-                skipped_line_dict["<g>No lines were skipped</>"] = [pi]
-
-            total = PenaltyCommand(unseen_line_dict, len(expected) * mispen)
-            self.penalties["Unseen lines"] = total
-            total = PenaltyCommand(skipped_line_dict, len(expected) * mispen)
-            self.penalties["Skipped lines"] = total
-
-            ordpen = self.penalty_misordered_steps
-            cmd_num_lst = [str(x) for x in cmd_num_lst]
-            order_list = [str(x) for x in order_list]
-            lst = list(difflib.Differ().compare(cmd_num_lst, order_list))
-            diff_detail = Counter(l[0] for l in lst)
-
-            assert "?" not in diff_detail
-
-            # Diffs are hard to interpret; there are many algorithms for
-            # condensing them. Ignore all that, and just print out the changed
-            # sequences, it's up to the user to interpret what's going on.
-
-            def filt_lines(s, seg, e, key):
-                lst = [s]
-                for x in seg:
-                    if x[0] == key:
-                        lst.append(int(x[2:]))
-                lst.append(e)
-                return lst
-
-            diff_msgs = dict()
-
-            def reportdiff(start_idx, segment, end_idx):
-                msg = "Order mismatch, expected linenos {}, saw {}"
-                expected_linenos = filt_lines(start_idx, segment, end_idx, "-")
-                seen_linenos = filt_lines(start_idx, segment, end_idx, "+")
-                msg = msg.format(expected_linenos, seen_linenos)
-                diff_msgs[msg] = [PenaltyInstance(ordpen, ordpen)]
-
-            # Group by changed segments.
-            start_expt_step = 0
-            end_expt_step = 0
-            to_print_lst = []
-            for k, subit in groupby(lst, lambda x: x[0] == " "):
-                if k:  # Whitespace group
-                    nochanged = [x for x in subit]
-                    end_expt_step = int(nochanged[0][2:])
-                    if len(to_print_lst) > 0:
-                        reportdiff(start_expt_step, to_print_lst, end_expt_step)
-                    start_expt_step = int(nochanged[-1][2:])
-                    to_print_lst = []
-                else:  # Diff group, save for printing
-                    to_print_lst = [x for x in subit]
-
-            # If there was a dangling different step, print that too.
-            if len(to_print_lst) > 0:
-                reportdiff(start_expt_step, to_print_lst, "[End]")
-
-            if len(diff_msgs) == 0:
-                diff_msgs["<g>No lines misordered</>"] = [PenaltyInstance(0, 0)]
-            total = PenaltyCommand(diff_msgs, len(cmd_num_lst) * ordpen)
-            self.penalties["Misordered lines"] = total
-
-        return
-
-    def _calculate_expect_watch_penalties(self, c, maximum_possible_penalty):
-        penalties = defaultdict(list)
-
-        if c.line_range[0] == c.line_range[-1]:
-            line_range = str(c.line_range[0])
-        else:
-            line_range = "{}-{}".format(c.line_range[0], c.line_range[-1])
-
-        name = "{}:{} [{}]".format(os.path.basename(c.path), line_range, c.expression)
-
-        num_actual_watches = len(c.expected_watches) + len(c.unexpected_watches)
-
-        penalty_available = maximum_possible_penalty
-
-        # Only penalize for missing values if we have actually seen a watch
-        # that's returned us an actual value at some point, or if we've not
-        # encountered the value at all.
-        if num_actual_watches or c.times_encountered == 0:
-            for v in c.missing_values:
-                current_penalty = min(penalty_available, self.penalty_missing_values)
-                penalty_available -= current_penalty
-                penalties["missing values"].append(PenaltyInstance(v, current_penalty))
-
-        for v in c.encountered_values:
-            penalties["<g>expected encountered watches</>"].append(
-                PenaltyInstance(v, 0)
-            )
-
-        penalty_descriptions = [
-            (self.penalty_not_evaluatable, c.invalid_watches, "could not evaluate"),
-            (
-                self.penalty_variable_optimized,
-                c.optimized_out_watches,
-                "result optimized away",
-            ),
-            (self.penalty_misordered_values, c.misordered_watches, "misordered result"),
-            (
-                self.penalty_irretrievable,
-                c.irretrievable_watches,
-                "result could not be retrieved",
-            ),
-            (self.penalty_incorrect_values, c.unexpected_watches, "unexpected result"),
-        ]
-
-        for penalty_score, watches, description in penalty_descriptions:
-            # We only penalize the encountered issue for each missing value per
-            # command but we still want to record each one, so set the penalty
-            # to 0 after the threshold is passed.
-            times_to_penalize = len(c.missing_values)
-
-            for w in watches:
-                times_to_penalize -= 1
-                penalty_score = min(penalty_available, penalty_score)
-                penalty_available -= penalty_score
-                penalties[description].append(PenaltyInstance(w, penalty_score))
-                if not times_to_penalize:
-                    penalty_score = 0
-
-        return name, penalties
-
-    @property
-    def penalty(self):
-        result = 0
-
-        maximum_allowed_penalty = 0
-        for name, pen_cmd in self.penalties.items():
-            maximum_allowed_penalty += pen_cmd.max_penalty
-            value = pen_cmd.pen_dict
-            for category, inst_list in value.items():
-                result += sum(x.the_penalty for x in inst_list)
-        return min(result, maximum_allowed_penalty)
-
-    @property
-    def max_penalty(self):
-        return sum(p_cat.max_penalty for p_cat in self.penalties.values())
-
-    @property
-    def score(self):
-        try:
-            return 1.0 - (self.penalty / float(self.max_penalty))
-        except ZeroDivisionError:
-            return float("nan")
-
-    @property
-    def summary_string(self):
-        score = self.score
-        isnan = score != score  # pylint: disable=comparison-with-itself
-        color = "g"
-        if score < 0.25 or isnan:
-            color = "r"
-        elif score < 0.75:
-            color = "y"
-
-        return "<{}>({:.4f})</>".format(color, score)
-
-    @property
-    def verbose_output(self):  # noqa
-        string = ""
-
-        # Add address resolutions if present.
-        if self.address_resolutions:
-            if self.resolved_addresses:
-                string += "\nResolved Addresses:\n"
-                for addr, res in self.resolved_addresses.items():
-                    string += f"  '{addr}': {res}\n"
-            if self.unresolved_addresses:
-                string += "\n"
-                string += f"Unresolved Addresses:\n  {self.unresolved_addresses}\n"
-
-        string += "\n"
-        for command in sorted(self.penalties):
-            pen_cmd = self.penalties[command]
-            maximum_possible_penalty = pen_cmd.max_penalty
-            total_penalty = 0
-            lines = []
-            for category in sorted(pen_cmd.pen_dict):
-                lines.append("    <r>{}</>:\n".format(category))
-
-                step_value_results = {}
-                for result, penalty in pen_cmd.pen_dict[category]:
-                    if not isinstance(result, StepValueInfo):
-                        continue
-                    if result.expected_value not in step_value_results:
-                        step_value_results[result.expected_value] = PenaltyLineRanges(
-                            result.step_index, penalty
-                        )
-                    else:
-                        step_value_results[result.expected_value].add_step(
-                            result.step_index, penalty
-                        )
-
-                for value, penalty_line_range in step_value_results.items():
-                    text = f"({value}): {penalty_line_range}"
-                    total_penalty += penalty_line_range.penalty
-                    lines.append("      {}\n".format(text))
-
-                for result, penalty in pen_cmd.pen_dict[category]:
-                    if isinstance(result, StepValueInfo):
-                        continue
-                    else:
-                        text = str(result)
-                    if penalty:
-                        assert penalty > 0, penalty
-                        total_penalty += penalty
-                        text += " <r>[-{}]</>".format(penalty)
-                    lines.append("      {}\n".format(text))
-
-                lines.append("\n")
-
-            string += "  <b>{}</> <y>[{}/{}]</>\n".format(
-                command, total_penalty, maximum_possible_penalty
-            )
-            for line in lines:
-                string += line
-        string += "\n"
-        return string
-
-    @property
-    def resolved_addresses(self):
-        return {
-            addr: format_address(res)
-            for addr, res in self.address_resolutions.items()
-            if res is not None
-        }
-
-    @property
-    def unresolved_addresses(self):
-        return [addr for addr, res in self.address_resolutions.items() if res is None]
-
-    @property
-    def penalty_variable_optimized(self):
-        return self.context.options.penalty_variable_optimized
-
-    @property
-    def penalty_irretrievable(self):
-        return self.context.options.penalty_irretrievable
-
-    @property
-    def penalty_not_evaluatable(self):
-        return self.context.options.penalty_not_evaluatable
-
-    @property
-    def penalty_incorrect_values(self):
-        return self.context.options.penalty_incorrect_values
-
-    @property
-    def penalty_missing_values(self):
-        return self.context.options.penalty_missing_values
-
-    @property
-    def penalty_misordered_values(self):
-        return self.context.options.penalty_misordered_values
-
-    @property
-    def penalty_unreachable(self):
-        return self.context.options.penalty_unreachable
-
-    @property
-    def penalty_missing_step(self):
-        return self.context.options.penalty_missing_step
-
-    @property
-    def penalty_misordered_steps(self):
-        return self.context.options.penalty_misordered_steps
-
-    @property
-    def penalty_incorrect_program_state(self):
-        return self.context.options.penalty_incorrect_program_state
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/heuristic/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/heuristic/__init__.py
deleted file mode 100644
index 2a143f6c72b764..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/heuristic/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from dex.heuristic.Heuristic import Heuristic, StepValueInfo
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/Main.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/Main.py
deleted file mode 100644
index b6c146ad784062..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/Main.py
+++ /dev/null
@@ -1,219 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""This is the main entry point.
-It implements some functionality common to all subtools such as command line
-parsing and running the unit-testing harnesses, before calling the reequested
-subtool.
-"""
-
-import imp
-import os
-import sys
-
-from dex.utils import PrettyOutput, Timer
-from dex.utils import ExtArgParse as argparse
-from dex.utils import get_root_directory
-from dex.utils.Exceptions import Error, ToolArgumentError
-from dex.utils.Logging import Logger
-from dex.utils.UnitTests import unit_tests_ok
-from dex.utils.Version import version
-from dex.utils import WorkingDirectory
-from dex.utils.ReturnCode import ReturnCode
-
-
-def _output_bug_report_message(context):
-    """In the event of a catastrophic failure, print bug report request to the
-    user.
-    """
-    context.o.red(
-        "\n\n"
-        "<g>****************************************</>\n"
-        "<b>****************************************</>\n"
-        "****************************************\n"
-        "**                                    **\n"
-        "** <y>This is a bug in <a>DExTer</>.</>           **\n"
-        "**                                    **\n"
-        "**                  <y>Please report it.</> **\n"
-        "**                                    **\n"
-        "****************************************\n"
-        "<b>****************************************</>\n"
-        "<g>****************************************</>\n"
-        "\n"
-        "<b>system:</>\n"
-        "<d>{}</>\n\n"
-        "<b>version:</>\n"
-        "<d>{}</>\n\n"
-        "<b>args:</>\n"
-        "<d>{}</>\n"
-        "\n".format(sys.platform, version("DExTer"), [sys.executable] + sys.argv),
-        stream=PrettyOutput.stderr,
-    )
-
-
-def get_tools_directory():
-    """Returns directory path where DExTer tool imports can be
-    found.
-    """
-    tools_directory = os.path.join(get_root_directory(), "tools")
-    assert os.path.isdir(tools_directory), tools_directory
-    return tools_directory
-
-
-def get_tool_names():
-    """Returns a list of expected DExTer Tools"""
-    return [
-        "help",
-        "list-debuggers",
-        "no-tool-",
-        "run-debugger-internal-",
-        "test",
-        "view",
-    ]
-
-
-def _set_auto_highlights(context):
-    """Flag some strings for auto-highlighting."""
-    context.o.auto_reds.extend(
-        [
-            r"[Ee]rror\:",
-            r"[Ee]xception\:",
-            r"un(expected|recognized) argument",
-        ]
-    )
-    context.o.auto_yellows.extend(
-        [
-            r"[Ww]arning\:",
-            r"\(did you mean ",
-            r"During handling of the above exception, another exception",
-        ]
-    )
-
-
-def _get_options_and_args(context):
-    """get the options and arguments from the commandline"""
-    parser = argparse.ExtArgumentParser(context, add_help=False)
-    parser.add_argument("tool", default=None, nargs="?")
-    options, args = parser.parse_known_args(sys.argv[1:])
-
-    return options, args
-
-
-def _get_tool_name(options):
-    """get the name of the dexter tool (if passed) specified on the command
-    line, otherwise return 'no_tool_'.
-    """
-    tool_name = options.tool
-    if tool_name is None:
-        tool_name = "no_tool_"
-    else:
-        _is_valid_tool_name(tool_name)
-    return tool_name
-
-
-def _is_valid_tool_name(tool_name):
-    """check tool name matches a tool directory within the dexter tools
-    directory.
-    """
-    valid_tools = get_tool_names()
-    if tool_name not in valid_tools:
-        raise Error(
-            'invalid tool "{}" (choose from {})'.format(
-                tool_name, ", ".join([t for t in valid_tools if not t.endswith("-")])
-            )
-        )
-
-
-def _import_tool_module(tool_name):
-    """Imports the python module at the tool directory specificed by
-    tool_name.
-    """
-    # format tool argument to reflect tool directory form.
-    tool_name = tool_name.replace("-", "_")
-
-    tools_directory = get_tools_directory()
-    module_info = imp.find_module(tool_name, [tools_directory])
-
-    return imp.load_module(tool_name, *module_info)
-
-
-def tool_main(context, tool, args):
-    with Timer(tool.name):
-        options, defaults = tool.parse_command_line(args)
-        Timer.display = options.time_report
-        Timer.indent = options.indent_timer_level
-        Timer.fn = context.o.blue
-        context.options = options
-        context.version = version(tool.name)
-
-        if options.version:
-            context.o.green("{}\n".format(context.version))
-            return ReturnCode.OK
-
-        if options.verbose:
-            context.logger.verbosity = 2
-        elif options.no_warnings:
-            context.logger.verbosity = 0
-
-        if options.unittest != "off" and not unit_tests_ok(context):
-            raise Error("<d>unit test failures</>")
-
-        if options.colortest:
-            context.o.colortest()
-            return ReturnCode.OK
-
-        try:
-            tool.handle_base_options(defaults)
-        except ToolArgumentError as e:
-            raise Error(e)
-
-        dir_ = context.options.working_directory
-        with WorkingDirectory(context, dir=dir_) as context.working_directory:
-            return_code = tool.go()
-
-        return return_code
-
-
-class Context(object):
-    """Context encapsulates globally useful objects and data; passed to many
-    Dexter functions.
-    """
-
-    def __init__(self):
-        self.o: PrettyOutput = None
-        self.logger: Logger = None
-        self.working_directory: str = None
-        self.options: dict = None
-        self.version: str = None
-        self.root_directory: str = None
-
-
-def main() -> ReturnCode:
-    context = Context()
-    with PrettyOutput() as context.o:
-        context.logger = Logger(context.o)
-        try:
-            context.root_directory = get_root_directory()
-            # Flag some strings for auto-highlighting.
-            _set_auto_highlights(context)
-            options, args = _get_options_and_args(context)
-            # raises 'Error' if command line tool is invalid.
-            tool_name = _get_tool_name(options)
-            module = _import_tool_module(tool_name)
-            return tool_main(context, module.Tool(context), args)
-        except Error as e:
-            context.logger.error(str(e))
-            try:
-                if context.options.error_debug:
-                    raise
-            except AttributeError:
-                pass
-            return ReturnCode._ERROR
-        except (KeyboardInterrupt, SystemExit):
-            raise
-        except:  # noqa
-            _output_bug_report_message(context)
-            raise
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/TestToolBase.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/TestToolBase.py
deleted file mode 100644
index acbff53b8ed34a..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/TestToolBase.py
+++ /dev/null
@@ -1,146 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Base class for subtools that run tests."""
-
-import abc
-from datetime import datetime
-import os
-import sys
-
-from dex.debugger.Debuggers import add_debugger_tool_arguments
-from dex.debugger.Debuggers import handle_debugger_tool_options
-from dex.heuristic.Heuristic import add_heuristic_tool_arguments
-from dex.tools.ToolBase import ToolBase
-from dex.utils import get_root_directory
-from dex.utils.Exceptions import Error, ToolArgumentError
-from dex.utils.ReturnCode import ReturnCode
-
-
-def add_executable_arguments(parser):
-    executable_group = parser.add_mutually_exclusive_group(required=True)
-    executable_group.add_argument(
-        "--binary", metavar="<file>", help="provide binary file to debug"
-    )
-    executable_group.add_argument(
-        "--vs-solution",
-        metavar="<file>",
-        help="provide a path to an already existing visual studio solution.",
-    )
-
-
-class TestToolBase(ToolBase):
-    def __init__(self, *args, **kwargs):
-        super(TestToolBase, self).__init__(*args, **kwargs)
-
-    def add_tool_arguments(self, parser, defaults):
-        parser.description = self.__doc__
-        add_debugger_tool_arguments(parser, self.context, defaults)
-        add_executable_arguments(parser)
-        add_heuristic_tool_arguments(parser)
-
-        parser.add_argument(
-            "test_path",
-            type=str,
-            metavar="<test-path>",
-            nargs="?",
-            default=os.path.abspath(os.path.join(get_root_directory(), "..", "tests")),
-            help="directory containing test(s)",
-        )
-
-        parser.add_argument(
-            "--results-directory",
-            type=str,
-            metavar="<directory>",
-            default=None,
-            help="directory to save results (default: none)",
-        )
-
-    def handle_options(self, defaults):
-        options = self.context.options
-
-        if options.vs_solution:
-            options.vs_solution = os.path.abspath(options.vs_solution)
-            if not os.path.isfile(options.vs_solution):
-                raise Error(
-                    '<d>could not find VS solution file</> <r>"{}"</>'.format(
-                        options.vs_solution
-                    )
-                )
-        elif options.binary:
-            options.binary = os.path.abspath(options.binary)
-            if not os.path.isfile(options.binary):
-                raise Error(
-                    '<d>could not find binary file</> <r>"{}"</>'.format(options.binary)
-                )
-
-        try:
-            handle_debugger_tool_options(self.context, defaults)
-        except ToolArgumentError as e:
-            raise Error(e)
-
-        options.test_path = os.path.abspath(options.test_path)
-        options.test_path = os.path.normcase(options.test_path)
-        if not os.path.isfile(options.test_path) and not os.path.isdir(
-            options.test_path
-        ):
-            raise Error(
-                '<d>could not find test path</> <r>"{}"</>'.format(options.test_path)
-            )
-
-        if options.results_directory:
-            options.results_directory = os.path.abspath(options.results_directory)
-            if not os.path.isdir(options.results_directory):
-                try:
-                    os.makedirs(options.results_directory, exist_ok=True)
-                except OSError as e:
-                    raise Error(
-                        '<d>could not create directory</> <r>"{}"</> <y>({})</>'.format(
-                            options.results_directory, e.strerror
-                        )
-                    )
-
-    def go(self) -> ReturnCode:  # noqa
-        options = self.context.options
-
-        options.executable = os.path.join(
-            self.context.working_directory.path, "tmp.exe"
-        )
-
-        # Test files contain dexter commands.
-        options.test_files = [options.test_path]
-        # Source files are the files that the program was built from, and are
-        # used to determine whether a breakpoint is external to the program
-        # (e.g. into a system header) or not.
-        options.source_files = []
-        if not options.test_path.endswith(".dex"):
-            options.source_files = [options.test_path]
-        self._run_test(self._get_test_name(options.test_path))
-
-        return self._handle_results()
-
-    @staticmethod
-    def _is_current_directory(test_directory):
-        return test_directory == "."
-
-    def _get_test_name(self, test_path):
-        """Get the test name from either the test file, or the sub directory
-        path it's stored in.
-        """
-        # test names are distinguished by their relative path from the
-        # specified test path.
-        test_name = os.path.relpath(test_path, self.context.options.test_path)
-        if self._is_current_directory(test_name):
-            test_name = os.path.basename(test_path)
-        return test_name
-
-    @abc.abstractmethod
-    def _run_test(self, test_dir):
-        pass
-
-    @abc.abstractmethod
-    def _handle_results(self) -> ReturnCode:
-        pass
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/ToolBase.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/ToolBase.py
deleted file mode 100644
index 4b09c134a1b6e0..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/ToolBase.py
+++ /dev/null
@@ -1,147 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Base class for all subtools."""
-
-import abc
-import os
-import tempfile
-
-from dex import __version__
-from dex.utils import ExtArgParse
-from dex.utils import PrettyOutput
-from dex.utils.ReturnCode import ReturnCode
-
-
-class ToolBase(object, metaclass=abc.ABCMeta):
-    def __init__(self, context):
-        self.context = context
-        self.parser = None
-
-    @abc.abstractproperty
-    def name(self):
-        pass
-
-    @abc.abstractmethod
-    def add_tool_arguments(self, parser, defaults):
-        pass
-
-    def parse_command_line(self, args):
-        """Define two parsers: pparser and self.parser.
-        pparser deals with args that need to be parsed prior to any of those of
-        self.parser.  For example, any args which may affect the state of
-        argparse error output.
-        """
-
-        class defaults(object):
-            pass
-
-        pparser = ExtArgParse.ExtArgumentParser(
-            self.context, add_help=False, prog=self.name
-        )
-
-        pparser.add_argument(
-            "--no-color-output",
-            action="store_true",
-            default=False,
-            help="do not use colored output on stdout/stderr",
-        )
-        pparser.add_argument(
-            "--time-report",
-            action="store_true",
-            default=False,
-            help="display timing statistics",
-        )
-
-        self.parser = ExtArgParse.ExtArgumentParser(
-            self.context, parents=[pparser], prog=self.name
-        )
-        self.parser.add_argument(
-            "-v",
-            "--verbose",
-            action="store_true",
-            default=False,
-            help="enable verbose output (overrides --no-warnings)",
-        )
-        self.parser.add_argument(
-            "-V",
-            "--version",
-            action="store_true",
-            default=False,
-            help="display the DExTer version and exit",
-        )
-        self.parser.add_argument(
-            "-w",
-            "--no-warnings",
-            action="store_true",
-            default=False,
-            help="suppress warning output",
-        )
-        self.parser.add_argument(
-            "--unittest",
-            type=str,
-            choices=["off", "show-failures", "show-all"],
-            default="off",
-            help="run the DExTer codebase unit tests",
-        )
-
-        suppress = ExtArgParse.SUPPRESS  # pylint: disable=no-member
-        self.parser.add_argument(
-            "--colortest", action="store_true", default=False, help=suppress
-        )
-        self.parser.add_argument(
-            "--error-debug", action="store_true", default=False, help=suppress
-        )
-        defaults.working_directory = os.path.join(tempfile.gettempdir(), "dexter")
-        self.parser.add_argument(
-            "--indent-timer-level", type=int, default=1, help=suppress
-        )
-        self.parser.add_argument(
-            "--working-directory",
-            type=str,
-            metavar="<file>",
-            default=None,
-            display_default=defaults.working_directory,
-            help="location of working directory",
-        )
-        self.parser.add_argument(
-            "--save-temps",
-            action="store_true",
-            default=False,
-            help="save temporary files",
-        )
-
-        self.add_tool_arguments(self.parser, defaults)
-
-        # If an error is encountered during pparser, show the full usage text
-        # including self.parser options. Strip the preceding 'usage: ' to avoid
-        # having it appear twice.
-        pparser.usage = self.parser.format_usage().lstrip("usage: ")
-
-        options, args = pparser.parse_known_args(args)
-
-        if options.no_color_output:
-            PrettyOutput.stdout.color_enabled = False
-            PrettyOutput.stderr.color_enabled = False
-
-        options = self.parser.parse_args(args, namespace=options)
-        return options, defaults
-
-    def handle_base_options(self, defaults):
-        self.handle_options(defaults)
-
-        options = self.context.options
-
-        if options.working_directory is None:
-            options.working_directory = defaults.working_directory
-
-    @abc.abstractmethod
-    def handle_options(self, defaults):
-        pass
-
-    @abc.abstractmethod
-    def go(self) -> ReturnCode:
-        pass
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/__init__.py
deleted file mode 100644
index 76d12614b078b5..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/__init__.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from dex.tools.Main import Context, get_tool_names, get_tools_directory, main, tool_main
-from dex.tools.TestToolBase import TestToolBase
-from dex.tools.ToolBase import ToolBase
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/clang_opt_bisect/Tool.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/clang_opt_bisect/Tool.py
deleted file mode 100644
index e6fdecb47eaae6..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/clang_opt_bisect/Tool.py
+++ /dev/null
@@ -1,343 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Clang opt-bisect tool."""
-
-from collections import defaultdict
-import os
-import csv
-import re
-import pickle
-
-from dex.command.ParseCommand import get_command_infos
-from dex.debugger.Debuggers import run_debugger_subprocess
-from dex.debugger.DebuggerControllers.DefaultController import DefaultController
-from dex.dextIR.DextIR import DextIR
-from dex.heuristic import Heuristic
-from dex.tools import TestToolBase
-from dex.utils.Exceptions import DebuggerException, Error
-from dex.utils.Exceptions import BuildScriptException, HeuristicException
-from dex.utils.PrettyOutputBase import Stream
-from dex.utils.ReturnCode import ReturnCode
-
-
-class BisectPass(object):
-    def __init__(self, no, description, description_no_loc):
-        self.no = no
-        self.description = description
-        self.description_no_loc = description_no_loc
-
-        self.penalty = 0
-        self.differences = []
-
-
-class Tool(TestToolBase):
-    """Use the LLVM "-opt-bisect-limit=<n>" flag to get information on the
-    contribution of each LLVM pass to the overall DExTer score when using
-    clang.
-
-    Clang is run multiple times, with an increasing value of n, measuring the
-    debugging experience at each value.
-    """
-
-    _re_running_pass = re.compile(r"^BISECT\: running pass \((\d+)\) (.+?)( \(.+\))?$")
-
-    def __init__(self, *args, **kwargs):
-        super(Tool, self).__init__(*args, **kwargs)
-        self._all_bisect_pass_summary = defaultdict(list)
-
-    @property
-    def name(self):
-        return "DExTer clang opt bisect"
-
-    def _get_bisect_limits(self):
-        options = self.context.options
-
-        max_limit = 999999
-        limits = [max_limit for _ in options.source_files]
-        all_passes = [
-            l
-            for l in self._clang_opt_bisect_build(limits)[1].splitlines()
-            if l.startswith("BISECT: running pass (")
-        ]
-
-        results = []
-        for i, pass_ in enumerate(all_passes[1:]):
-            if pass_.startswith("BISECT: running pass (1)"):
-                results.append(all_passes[i])
-        results.append(all_passes[-1])
-
-        assert len(results) == len(options.source_files), (
-            results,
-            options.source_files,
-        )
-
-        limits = [int(Tool._re_running_pass.match(r).group(1)) for r in results]
-
-        return limits
-
-    def handle_options(self, defaults):
-        options = self.context.options
-        if "clang" not in options.builder.lower():
-            raise Error(
-                "--builder %s is not supported by the clang-opt-bisect tool - only 'clang' is "
-                "supported " % options.builder
-            )
-        super(Tool, self).handle_options(defaults)
-
-    def _init_debugger_controller(self):
-        step_collection = DextIR(
-            executable_path=self.context.options.executable,
-            source_paths=self.context.options.source_files,
-            dexter_version=self.context.version,
-        )
-
-        step_collection.commands, new_source_files = get_command_infos(
-            self.context.options.source_files, self.context.options.source_root_dir
-        )
-        self.context.options.source_files.extend(list(new_source_files))
-
-        debugger_controller = DefaultController(self.context, step_collection)
-        return debugger_controller
-
-    def _run_test(self, test_name):  # noqa
-        options = self.context.options
-
-        per_pass_score = []
-        current_bisect_pass_summary = defaultdict(list)
-
-        max_limits = self._get_bisect_limits()
-        overall_limit = sum(max_limits)
-        prev_score = 1.0
-        prev_steps_str = None
-
-        for current_limit in range(overall_limit + 1):
-            # Take the overall limit number and split it across buckets for
-            # each source file.
-            limit_remaining = current_limit
-            file_limits = [0] * len(max_limits)
-            for i, max_limit in enumerate(max_limits):
-                if limit_remaining < max_limit:
-                    file_limits[i] += limit_remaining
-                    break
-                else:
-                    file_limits[i] = max_limit
-                    limit_remaining -= file_limits[i]
-
-            f = [l for l in file_limits if l]
-            current_file_index = len(f) - 1 if f else 0
-
-            _, err, builderIR = self._clang_opt_bisect_build(file_limits)
-            err_lines = err.splitlines()
-            # Find the last line that specified a running pass.
-            for l in err_lines[::-1]:
-                match = Tool._re_running_pass.match(l)
-                if match:
-                    pass_info = match.groups()
-                    break
-            else:
-                pass_info = (0, None, None)
-
-            try:
-                debugger_controller = self._init_debugger_controller()
-                debugger_controller = run_debugger_subprocess(
-                    debugger_controller, self.context.working_directory.path
-                )
-                steps = debugger_controller.step_collection
-            except DebuggerException:
-                steps = DextIR(
-                    executable_path=self.context.options.executable,
-                    source_paths=self.context.options.source_files,
-                    dexter_version=self.context.version,
-                )
-
-            steps.builder = builderIR
-
-            try:
-                heuristic = Heuristic(self.context, steps)
-            except HeuristicException as e:
-                raise Error(e)
-
-            score_difference = heuristic.score - prev_score
-            prev_score = heuristic.score
-
-            isnan = heuristic.score != heuristic.score
-            if isnan or score_difference < 0:
-                color1 = "r"
-                color2 = "r"
-            elif score_difference > 0:
-                color1 = "g"
-                color2 = "g"
-            else:
-                color1 = "y"
-                color2 = "d"
-
-            summary = '<{}>running pass {}/{} on "{}"'.format(
-                color2, pass_info[0], max_limits[current_file_index], test_name
-            )
-            if len(options.source_files) > 1:
-                summary += " [{}/{}]".format(current_limit, overall_limit)
-
-            pass_text = "".join(p for p in pass_info[1:] if p)
-            summary += ": {} <{}>{:+.4f}</> <{}>{}</></>\n".format(
-                heuristic.summary_string, color1, score_difference, color2, pass_text
-            )
-
-            self.context.o.auto(summary)
-
-            heuristic_verbose_output = heuristic.verbose_output
-
-            if options.verbose:
-                self.context.o.auto(heuristic_verbose_output)
-
-            steps_str = str(steps)
-            steps_changed = steps_str != prev_steps_str
-            prev_steps_str = steps_str
-
-            # If a results directory has been specified and this is the first
-            # pass or something has changed, write a text file containing
-            # verbose information on the current status.
-            if options.results_directory and (
-                current_limit == 0 or score_difference or steps_changed
-            ):
-                file_name = "-".join(
-                    str(s)
-                    for s in [
-                        "status",
-                        test_name,
-                        "{{:0>{}}}".format(len(str(overall_limit))).format(
-                            current_limit
-                        ),
-                        "{:.4f}".format(heuristic.score).replace(".", "_"),
-                        pass_info[1],
-                    ]
-                    if s is not None
-                )
-
-                file_name = (
-                    "".join(c for c in file_name if c.isalnum() or c in "()-_./ ")
-                    .strip()
-                    .replace(" ", "_")
-                    .replace("/", "_")
-                )
-
-                output_text_path = os.path.join(
-                    options.results_directory, "{}.txt".format(file_name)
-                )
-                with open(output_text_path, "w") as fp:
-                    self.context.o.auto(summary + "\n", stream=Stream(fp))
-                    self.context.o.auto(str(steps) + "\n", stream=Stream(fp))
-                    self.context.o.auto(
-                        heuristic_verbose_output + "\n", stream=Stream(fp)
-                    )
-
-                output_dextIR_path = os.path.join(
-                    options.results_directory, "{}.dextIR".format(file_name)
-                )
-                with open(output_dextIR_path, "wb") as fp:
-                    pickle.dump(steps, fp, protocol=pickle.HIGHEST_PROTOCOL)
-
-            per_pass_score.append((test_name, pass_text, heuristic.score))
-
-            if pass_info[1]:
-                self._all_bisect_pass_summary[pass_info[1]].append(score_difference)
-
-                current_bisect_pass_summary[pass_info[1]].append(score_difference)
-
-        if options.results_directory:
-            per_pass_score_path = os.path.join(
-                options.results_directory, "{}-per_pass_score.csv".format(test_name)
-            )
-
-            with open(per_pass_score_path, mode="w", newline="") as fp:
-                writer = csv.writer(fp, delimiter=",")
-                writer.writerow(["Source File", "Pass", "Score"])
-
-                for path, pass_, score in per_pass_score:
-                    writer.writerow([path, pass_, score])
-            self.context.o.blue('wrote "{}"\n'.format(per_pass_score_path))
-
-            pass_summary_path = os.path.join(
-                options.results_directory, "{}-pass-summary.csv".format(test_name)
-            )
-
-            self._write_pass_summary(pass_summary_path, current_bisect_pass_summary)
-
-    def _handle_results(self) -> ReturnCode:
-        options = self.context.options
-        if options.results_directory:
-            pass_summary_path = os.path.join(
-                options.results_directory, "overall-pass-summary.csv"
-            )
-
-            self._write_pass_summary(pass_summary_path, self._all_bisect_pass_summary)
-        return ReturnCode.OK
-
-    def _clang_opt_bisect_build(self, opt_bisect_limits):
-        options = self.context.options
-        compiler_options = [
-            "{} -mllvm -opt-bisect-limit={}".format(options.cflags, opt_bisect_limit)
-            for opt_bisect_limit in opt_bisect_limits
-        ]
-        linker_options = options.ldflags
-
-        try:
-            return run_external_build_script(
-                self.context,
-                source_files=options.source_files,
-                compiler_options=compiler_options,
-                linker_options=linker_options,
-                script_path=self.build_script,
-                executable_file=options.executable,
-            )
-        except BuildScriptException as e:
-            raise Error(e)
-
-    def _write_pass_summary(self, path, pass_summary):
-        # Get a list of tuples.
-        pass_summary_list = list(pass_summary.items())
-
-        for i, item in enumerate(pass_summary_list):
-            # Add elems for the sum, min, and max of the values, as well as
-            # 'interestingness' which is whether any of these values are
-            # non-zero.
-            pass_summary_list[i] += (
-                sum(item[1]),
-                min(item[1]),
-                max(item[1]),
-                any(item[1]),
-            )
-
-            # Split the pass name into the basic name and kind.
-            pass_summary_list[i] += tuple(item[0].rsplit(" on ", 1))
-
-        # Sort the list by the following columns in order of precedence:
-        #   - Is interesting (True first)
-        #   - Sum (smallest first)
-        #   - Number of times pass ran (largest first)
-        #   - Kind (alphabetically)
-        #   - Name (alphabetically)
-        pass_summary_list.sort(
-            key=lambda tup: (not tup[5], tup[2], -len(tup[1]), tup[7], tup[6])
-        )
-
-        with open(path, mode="w", newline="") as fp:
-            writer = csv.writer(fp, delimiter=",")
-            writer.writerow(["Pass", "Kind", "Sum", "Min", "Max", "Interesting"])
-
-            for (
-                _,
-                vals,
-                sum_,
-                min_,
-                max_,
-                interesting,
-                name,
-                kind,
-            ) in pass_summary_list:
-                writer.writerow([name, kind, sum_, min_, max_, interesting] + vals)
-
-        self.context.o.blue('wrote "{}"\n'.format(path))
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/help/Tool.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/help/Tool.py
deleted file mode 100644
index 520bf9f59917af..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/help/Tool.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Help tool."""
-
-import imp
-import textwrap
-
-from dex.tools import ToolBase, get_tool_names, get_tools_directory, tool_main
-from dex.utils.ReturnCode import ReturnCode
-
-
-class Tool(ToolBase):
-    """Provides help info on subtools."""
-
-    @property
-    def name(self):
-        return "DExTer help"
-
-    @property
-    def _visible_tool_names(self):
-        return [t for t in get_tool_names() if not t.endswith("-")]
-
-    def add_tool_arguments(self, parser, defaults):
-        parser.description = Tool.__doc__
-        parser.add_argument(
-            "tool", choices=self._visible_tool_names, nargs="?", help="name of subtool"
-        )
-
-    def handle_options(self, defaults):
-        pass
-
-    @property
-    def _default_text(self):
-        s = "\n<b>The following subtools are available:</>\n\n"
-        tools_directory = get_tools_directory()
-        for tool_name in sorted(self._visible_tool_names):
-            internal_name = tool_name.replace("-", "_")
-            module_info = imp.find_module(internal_name, [tools_directory])
-            tool_doc = imp.load_module(internal_name, *module_info).Tool.__doc__
-            tool_doc = tool_doc.strip() if tool_doc else ""
-            tool_doc = textwrap.fill(" ".join(tool_doc.split()), 80)
-            s += "<g>{}</>\n{}\n\n".format(tool_name, tool_doc)
-        return s
-
-    def go(self) -> ReturnCode:
-        if self.context.options.tool is None:
-            self.context.o.auto(self._default_text)
-            return ReturnCode.OK
-
-        tool_name = self.context.options.tool.replace("-", "_")
-        tools_directory = get_tools_directory()
-        module_info = imp.find_module(tool_name, [tools_directory])
-        module = imp.load_module(tool_name, *module_info)
-        return tool_main(self.context, module.Tool(self.context), ["--help"])
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/help/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/help/__init__.py
deleted file mode 100644
index 351e8fe48a0623..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/help/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from dex.tools.help.Tool import Tool
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/list_debuggers/Tool.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/list_debuggers/Tool.py
deleted file mode 100644
index 75e6dcb891af7d..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/list_debuggers/Tool.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""List debuggers tool."""
-
-from dex.debugger.Debuggers import add_debugger_tool_base_arguments
-from dex.debugger.Debuggers import handle_debugger_tool_base_options
-from dex.debugger.Debuggers import Debuggers
-from dex.tools import ToolBase
-from dex.utils import Timer
-from dex.utils.Exceptions import DebuggerException, Error
-from dex.utils.ReturnCode import ReturnCode
-
-
-class Tool(ToolBase):
-    """List all of the potential debuggers that DExTer knows about and whether
-    there is currently a valid interface available for them.
-    """
-
-    @property
-    def name(self):
-        return "DExTer list debuggers"
-
-    def add_tool_arguments(self, parser, defaults):
-        parser.description = Tool.__doc__
-        add_debugger_tool_base_arguments(parser, defaults)
-
-    def handle_options(self, defaults):
-        handle_debugger_tool_base_options(self.context, defaults)
-
-    def go(self) -> ReturnCode:
-        with Timer("list debuggers"):
-            try:
-                Debuggers(self.context).list()
-            except DebuggerException as e:
-                raise Error(e)
-        return ReturnCode.OK
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/list_debuggers/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/list_debuggers/__init__.py
deleted file mode 100644
index 95741028be542d..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/list_debuggers/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from dex.tools.list_debuggers.Tool import Tool
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/no_tool_/Tool.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/no_tool_/Tool.py
deleted file mode 100644
index 4e25fdb9b18808..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/no_tool_/Tool.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""This is a special subtool that is run when no subtool is specified.
-It just provides a welcome message and simple usage instructions.
-"""
-
-from dex.tools import ToolBase, get_tool_names
-from dex.utils.Exceptions import Error
-from dex.utils.ReturnCode import ReturnCode
-
-
-# This is a special "tool" that is run when no subtool has been specified on
-# the command line. Its only job is to provide useful usage info.
-class Tool(ToolBase):
-    """Welcome to DExTer (Debugging Experience Tester).
-    Please choose a subtool from the list below.  Use 'dexter.py help' for more
-    information.
-    """
-
-    @property
-    def name(self):
-        return "DExTer"
-
-    def add_tool_arguments(self, parser, defaults):
-        parser.description = Tool.__doc__
-        parser.add_argument(
-            "subtool",
-            choices=[t for t in get_tool_names() if not t.endswith("-")],
-            nargs="?",
-            help="name of subtool",
-        )
-        parser.add_argument(
-            "subtool_options",
-            metavar="subtool-options",
-            nargs="*",
-            help="subtool specific options",
-        )
-
-    def handle_options(self, defaults):
-        if not self.context.options.subtool:
-            raise Error(
-                "<d>no subtool specified</>\n\n{}\n".format(self.parser.format_help())
-            )
-
-    def go(self) -> ReturnCode:
-        # This fn is never called because not specifying a subtool raises an
-        # exception.
-        return ReturnCode._ERROR
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/no_tool_/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/no_tool_/__init__.py
deleted file mode 100644
index 0e355f818aac46..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/no_tool_/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from dex.tools.no_tool_.Tool import Tool
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/run_debugger_internal_/Tool.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/run_debugger_internal_/Tool.py
deleted file mode 100644
index 844a3ef196d0e1..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/run_debugger_internal_/Tool.py
+++ /dev/null
@@ -1,68 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""This is an internal subtool used to sandbox the communication with a
-debugger into a separate process so that any crashes inside the debugger will
-not bring down the entire DExTer tool.
-"""
-
-import pickle
-
-from dex.debugger import Debuggers
-from dex.tools import ToolBase
-from dex.utils import Timer
-from dex.utils.Exceptions import DebuggerException, Error
-from dex.utils.ReturnCode import ReturnCode
-
-
-class Tool(ToolBase):
-    def __init__(self, *args, **kwargs):
-        self.controller_path = None
-        self.debugger_controller = None
-        self.options = None
-        super(Tool, self).__init__(*args, **kwargs)
-
-    @property
-    def name(self):
-        return "DExTer run debugger internal"
-
-    def add_tool_arguments(self, parser, defaults):
-        parser.add_argument(
-            "controller_path", type=str, help="pickled debugger controller file"
-        )
-
-    def handle_options(self, defaults):
-        with open(self.context.options.controller_path, "rb") as fp:
-            self.debugger_controller = pickle.load(fp)
-        self.controller_path = self.context.options.controller_path
-        self.context = self.debugger_controller.context
-        self.options = self.context.options
-        Timer.display = self.options.time_report
-
-    def raise_debugger_error(self, action, debugger):
-        msg = "<d>could not {} {}</> ({})\n".format(
-            action, debugger.name, debugger.loading_error
-        )
-        if self.options.verbose:
-            msg = "{}\n    {}".format(msg, "    ".join(debugger.loading_error_trace))
-        raise Error(msg)
-
-    def go(self) -> ReturnCode:
-        with Timer("loading debugger"):
-            debugger = Debuggers(self.context).load(self.options.debugger)
-
-        with Timer("running debugger"):
-            if not debugger.is_available:
-                self.raise_debugger_error("load", debugger)
-
-            self.debugger_controller.run_debugger(debugger)
-
-            if debugger.loading_error:
-                self.raise_debugger_error("run", debugger)
-
-        with open(self.controller_path, "wb") as fp:
-            pickle.dump(self.debugger_controller, fp)
-        return ReturnCode.OK
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/run_debugger_internal_/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/run_debugger_internal_/__init__.py
deleted file mode 100644
index db3f98bd75b18f..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/run_debugger_internal_/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from dex.tools.run_debugger_internal_.Tool import Tool
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/test/Tool.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/test/Tool.py
deleted file mode 100644
index f07641041254ba..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/test/Tool.py
+++ /dev/null
@@ -1,278 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Test tool."""
-
-import math
-import os
-import csv
-import pickle
-import shutil
-import platform
-
-from dex.command.ParseCommand import get_command_infos
-from dex.debugger.Debuggers import run_debugger_subprocess
-from dex.debugger.DebuggerControllers.DefaultController import DefaultController
-from dex.debugger.DebuggerControllers.ConditionalController import ConditionalController
-from dex.dextIR.DextIR import DextIR
-from dex.heuristic import Heuristic
-from dex.tools import TestToolBase
-from dex.utils.Exceptions import DebuggerException
-from dex.utils.Exceptions import BuildScriptException, HeuristicException
-from dex.utils.PrettyOutputBase import Stream
-from dex.utils.ReturnCode import ReturnCode
-
-
-class TestCase(object):
-    def __init__(self, context, name, heuristic, error):
-        self.context = context
-        self.name = name
-        self.heuristic = heuristic
-        self.error = error
-
-    @property
-    def penalty(self):
-        try:
-            return self.heuristic.penalty
-        except AttributeError:
-            return float("nan")
-
-    @property
-    def max_penalty(self):
-        try:
-            return self.heuristic.max_penalty
-        except AttributeError:
-            return float("nan")
-
-    @property
-    def score(self):
-        try:
-            return self.heuristic.score
-        except AttributeError:
-            return float("nan")
-
-    def __str__(self):
-        if self.error and self.context.options.verbose:
-            verbose_error = str(self.error)
-        else:
-            verbose_error = ""
-
-        if self.error:
-            script_error = (
-                " : {}".format(self.error.script_error.splitlines()[0])
-                if getattr(self.error, "script_error", None)
-                else ""
-            )
-
-            error = " [{}{}]".format(str(self.error).splitlines()[0], script_error)
-        else:
-            error = ""
-
-        try:
-            summary = self.heuristic.summary_string
-        except AttributeError:
-            summary = "<r>nan/nan (nan)</>"
-        return "{}: {}{}\n{}".format(self.name, summary, error, verbose_error)
-
-
-class Tool(TestToolBase):
-    """Run the specified DExTer test(s) with the specified compiler and linker
-    options and produce a dextIR file as well as printing out the debugging
-    experience score calculated by the DExTer heuristic.
-    """
-
-    def __init__(self, *args, **kwargs):
-        super(Tool, self).__init__(*args, **kwargs)
-        self._test_cases = []
-
-    @property
-    def name(self):
-        return "DExTer test"
-
-    def add_tool_arguments(self, parser, defaults):
-        parser.add_argument(
-            "--fail-lt",
-            type=float,
-            default=0.0,  # By default TEST always succeeds.
-            help="exit with status FAIL(2) if the test result"
-            " is less than this value.",
-            metavar="<float>",
-        )
-        parser.add_argument(
-            "--calculate-average",
-            action="store_true",
-            help="calculate the average score of every test run",
-        )
-        super(Tool, self).add_tool_arguments(parser, defaults)
-
-    def _init_debugger_controller(self):
-        step_collection = DextIR(
-            executable_path=self.context.options.executable,
-            source_paths=self.context.options.source_files,
-            dexter_version=self.context.version,
-        )
-
-        step_collection.commands, new_source_files = get_command_infos(
-            self.context.options.test_files, self.context.options.source_root_dir
-        )
-
-        self.context.options.source_files.extend(list(new_source_files))
-
-        if "DexLimitSteps" in step_collection.commands:
-            debugger_controller = ConditionalController(self.context, step_collection)
-        else:
-            debugger_controller = DefaultController(self.context, step_collection)
-
-        return debugger_controller
-
-    def _get_steps(self):
-        """Generate a list of debugger steps from a test case."""
-        debugger_controller = self._init_debugger_controller()
-        debugger_controller = run_debugger_subprocess(
-            debugger_controller, self.context.working_directory.path
-        )
-        steps = debugger_controller.step_collection
-        return steps
-
-    def _get_results_basename(self, test_name):
-        def splitall(x):
-            while len(x) > 0:
-                x, y = os.path.split(x)
-                yield y
-
-        all_components = reversed([x for x in splitall(test_name)])
-        return "_".join(all_components)
-
-    def _get_results_path(self, test_name):
-        """Returns the path to the test results directory for the test denoted
-        by test_name.
-        """
-        assert self.context.options.results_directory != None
-        return os.path.join(
-            self.context.options.results_directory,
-            self._get_results_basename(test_name),
-        )
-
-    def _get_results_text_path(self, test_name):
-        """Returns path results .txt file for test denoted by test_name."""
-        test_results_path = self._get_results_path(test_name)
-        return "{}.txt".format(test_results_path)
-
-    def _get_results_pickle_path(self, test_name):
-        """Returns path results .dextIR file for test denoted by test_name."""
-        test_results_path = self._get_results_path(test_name)
-        return "{}.dextIR".format(test_results_path)
-
-    def _record_steps(self, test_name, steps):
-        """Write out the set of steps out to the test's .txt and .json
-        results file if a results directory has been specified.
-        """
-        if self.context.options.results_directory:
-            output_text_path = self._get_results_text_path(test_name)
-            with open(output_text_path, "w") as fp:
-                self.context.o.auto(str(steps), stream=Stream(fp))
-
-            output_dextIR_path = self._get_results_pickle_path(test_name)
-            with open(output_dextIR_path, "wb") as fp:
-                pickle.dump(steps, fp, protocol=pickle.HIGHEST_PROTOCOL)
-
-    def _record_score(self, test_name, heuristic):
-        """Write out the test's heuristic score to the results .txt file
-        if a results directory has been specified.
-        """
-        if self.context.options.results_directory:
-            output_text_path = self._get_results_text_path(test_name)
-            with open(output_text_path, "a") as fp:
-                self.context.o.auto(heuristic.verbose_output, stream=Stream(fp))
-
-    def _record_test_and_display(self, test_case):
-        """Output test case to o stream and record test case internally for
-        handling later.
-        """
-        self.context.o.auto(test_case)
-        self._test_cases.append(test_case)
-
-    def _record_failed_test(self, test_name, exception):
-        """Instantiate a failed test case with failure exception and
-        store internally.
-        """
-        test_case = TestCase(self.context, test_name, None, exception)
-        self._record_test_and_display(test_case)
-
-    def _record_successful_test(self, test_name, steps, heuristic):
-        """Instantiate a successful test run, store test for handling later.
-        Display verbose output for test case if required.
-        """
-        test_case = TestCase(self.context, test_name, heuristic, None)
-        self._record_test_and_display(test_case)
-        if self.context.options.verbose:
-            self.context.o.auto("\n{}\n".format(steps))
-            self.context.o.auto(heuristic.verbose_output)
-
-    def _run_test(self, test_name):
-        """Attempt to run test files specified in options.source_files. Store
-        result internally in self._test_cases.
-        """
-        try:
-            if self.context.options.binary:
-                if platform.system() == 'Darwin' and os.path.exists(self.context.options.binary + '.dSYM'):
-                    # On Darwin, the debug info is in the .dSYM which might not be found by lldb, copy it into the tmp working directory
-                    shutil.copytree(self.context.options.binary + '.dSYM', self.context.options.executable + '.dSYM')
-                # Copy user's binary into the tmp working directory.
-                shutil.copy(
-                    self.context.options.binary, self.context.options.executable
-                )
-            steps = self._get_steps()
-            self._record_steps(test_name, steps)
-            heuristic_score = Heuristic(self.context, steps)
-            self._record_score(test_name, heuristic_score)
-        except (BuildScriptException, DebuggerException, HeuristicException) as e:
-            self._record_failed_test(test_name, e)
-            return
-
-        self._record_successful_test(test_name, steps, heuristic_score)
-        return
-
-    def _handle_results(self) -> ReturnCode:
-        return_code = ReturnCode.OK
-        options = self.context.options
-
-        if not options.verbose:
-            self.context.o.auto("\n")
-
-        if options.calculate_average:
-            # Calculate and print the average score
-            score_sum = 0.0
-            num_tests = 0
-            for test_case in self._test_cases:
-                score = test_case.score
-                if not test_case.error and not math.isnan(score):
-                    score_sum += test_case.score
-                    num_tests += 1
-
-            if num_tests != 0:
-                print("@avg: ({:.4f})".format(score_sum / num_tests))
-
-        has_failed = lambda test: test.score < options.fail_lt or test.error
-        if any(map(has_failed, self._test_cases)):
-            return_code = ReturnCode.FAIL
-
-        if options.results_directory:
-            summary_path = os.path.join(options.results_directory, "summary.csv")
-            with open(summary_path, mode="w", newline="") as fp:
-                writer = csv.writer(fp, delimiter=",")
-                writer.writerow(["Test Case", "Score", "Error"])
-
-                for test_case in self._test_cases:
-                    writer.writerow(
-                        [
-                            test_case.name,
-                            "{:.4f}".format(test_case.score),
-                            test_case.error,
-                        ]
-                    )
-
-        return return_code
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/test/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/test/__init__.py
deleted file mode 100644
index 01ead3affe1218..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/test/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from dex.tools.test.Tool import Tool
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/view/Tool.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/view/Tool.py
deleted file mode 100644
index 9ddb6a2b264697..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/view/Tool.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""View tool."""
-
-import os
-
-import pickle
-from dex.heuristic import Heuristic
-from dex.heuristic.Heuristic import add_heuristic_tool_arguments
-from dex.tools import ToolBase
-from dex.utils.Exceptions import Error, HeuristicException
-from dex.utils.ReturnCode import ReturnCode
-
-
-class Tool(ToolBase):
-    """Given a dextIR file, display the information in a human-readable form."""
-
-    @property
-    def name(self):
-        return "DExTer view"
-
-    def add_tool_arguments(self, parser, defaults):
-        add_heuristic_tool_arguments(parser)
-        parser.add_argument(
-            "input_path",
-            metavar="dextIR-file",
-            type=str,
-            default=None,
-            help="dexter dextIR file to view",
-        )
-        parser.description = Tool.__doc__
-
-    def handle_options(self, defaults):
-        options = self.context.options
-
-        options.input_path = os.path.abspath(options.input_path)
-        if not os.path.isfile(options.input_path):
-            raise Error(
-                '<d>could not find dextIR file</> <r>"{}"</>'.format(options.input_path)
-            )
-
-    def go(self) -> ReturnCode:
-        options = self.context.options
-
-        with open(options.input_path, "rb") as fp:
-            steps = pickle.load(fp)
-
-        try:
-            heuristic = Heuristic(self.context, steps)
-        except HeuristicException as e:
-            raise Error("could not apply heuristic: {}".format(e))
-
-        self.context.o.auto(
-            "{}\n\n{}\n\n{}\n\n".format(
-                heuristic.summary_string, steps, heuristic.verbose_output
-            )
-        )
-
-        return ReturnCode.OK
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/tools/view/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/tools/view/__init__.py
deleted file mode 100644
index 1868fca28c20cb..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/tools/view/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from dex.tools.view.Tool import Tool
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/Environment.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/Environment.py
deleted file mode 100644
index f6fd601cb8fdf7..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/Environment.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Utility functions for querying the current environment."""
-
-import os
-
-
-def is_native_windows():
-    return os.name == "nt"
-
-
-def has_pywin32():
-    try:
-        import win32com.client  # pylint:disable=unused-variable
-        import win32api  # pylint:disable=unused-variable
-
-        return True
-    except ImportError:
-        return False
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/Exceptions.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/Exceptions.py
deleted file mode 100644
index 3c00752b5ee476..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/Exceptions.py
+++ /dev/null
@@ -1,87 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Provides Dexter-specific exception types."""
-
-
-class Dexception(Exception):
-    """All dexter-specific exceptions derive from this."""
-
-    pass
-
-
-class Error(Dexception):
-    """Error.  Prints 'error: <message>' without a traceback."""
-
-    pass
-
-
-class DebuggerException(Dexception):
-    """Any error from using the debugger."""
-
-    def __init__(self, msg, orig_exception=None):
-        super(DebuggerException, self).__init__(msg)
-        self.msg = msg
-        self.orig_exception = orig_exception
-
-    def __str__(self):
-        return str(self.msg)
-
-
-class LoadDebuggerException(DebuggerException):
-    """If specified debugger cannot be loaded."""
-
-    pass
-
-
-class NotYetLoadedDebuggerException(LoadDebuggerException):
-    """If specified debugger has not yet been attempted to load."""
-
-    def __init__(self):
-        super(NotYetLoadedDebuggerException, self).__init__(
-            "not loaded", orig_exception=None
-        )
-
-
-class CommandParseError(Dexception):
-    """If a command instruction cannot be successfully parsed."""
-
-    def __init__(self, *args, **kwargs):
-        super(CommandParseError, self).__init__(*args, **kwargs)
-        self.filename = None
-        self.lineno = None
-        self.info = None
-        self.src = None
-        self.caret = None
-
-
-class NonFloatValueInCommand(CommandParseError):
-    """If a command has the float_range arg but at least one of its expected
-    values cannot be converted to a float."""
-
-    def __init__(self, *args, **kwargs):
-        super(NonFloatValueInCommand, self).__init__(*args, **kwargs)
-        self.value = None
-
-
-class ToolArgumentError(Dexception):
-    """If a tool argument is invalid."""
-
-    pass
-
-
-class BuildScriptException(Dexception):
-    """If there is an error in a build script file."""
-
-    def __init__(self, *args, **kwargs):
-        self.script_error = kwargs.pop("script_error", None)
-        super(BuildScriptException, self).__init__(*args, **kwargs)
-
-
-class HeuristicException(Dexception):
-    """If there was a problem with the heuristic."""
-
-    pass
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/ExtArgParse.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/ExtArgParse.py
deleted file mode 100644
index 8d968a73208075..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/ExtArgParse.py
+++ /dev/null
@@ -1,154 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Extended Argument Parser. Extends the argparse module with some extra
-functionality, to hopefully aid user-friendliness.
-"""
-
-import argparse
-import difflib
-import unittest
-
-from dex.utils import PrettyOutput
-from dex.utils.Exceptions import Error
-
-# re-export all of argparse
-for argitem in argparse.__all__:
-    vars()[argitem] = getattr(argparse, argitem)
-
-
-def _did_you_mean(val, possibles):
-    close_matches = difflib.get_close_matches(val, possibles)
-    did_you_mean = ""
-    if close_matches:
-        did_you_mean = "did you mean {}?".format(
-            " or ".join("<y>'{}'</>".format(c) for c in close_matches[:2])
-        )
-    return did_you_mean
-
-
-def _colorize(message):
-    lines = message.splitlines()
-    for i, line in enumerate(lines):
-        lines[i] = lines[i].replace("usage:", "<g>usage:</>")
-        if line.endswith(":"):
-            lines[i] = "<g>{}</>".format(line)
-    return "\n".join(lines)
-
-
-class ExtArgumentParser(argparse.ArgumentParser):
-    def error(self, message):
-        """Use the Dexception Error mechanism (including auto-colored output)."""
-        raise Error("{}\n\n{}".format(message, self.format_usage()))
-
-    # pylint: disable=redefined-builtin
-    def _print_message(self, message, file=None):
-        if message:
-            if file and file.name == "<stdout>":
-                file = PrettyOutput.stdout
-            else:
-                file = PrettyOutput.stderr
-
-            self.context.o.auto(message, file)
-
-    # pylint: enable=redefined-builtin
-
-    def format_usage(self):
-        return _colorize(super(ExtArgumentParser, self).format_usage())
-
-    def format_help(self):
-        return _colorize(super(ExtArgumentParser, self).format_help() + "\n\n")
-
-    @property
-    def _valid_visible_options(self):
-        """A list of all non-suppressed command line flags."""
-        return [
-            item
-            for sublist in vars(self)["_actions"]
-            for item in sublist.option_strings
-            if sublist.help != argparse.SUPPRESS
-        ]
-
-    def parse_args(self, args=None, namespace=None):
-        """Add 'did you mean' output to errors."""
-        args, argv = self.parse_known_args(args, namespace)
-        if argv:
-            errors = []
-            for arg in argv:
-                if arg in self._valid_visible_options:
-                    error = "unexpected argument: <y>'{}'</>".format(arg)
-                else:
-                    error = "unrecognized argument: <y>'{}'</>".format(arg)
-                    dym = _did_you_mean(arg, self._valid_visible_options)
-                    if dym:
-                        error += "  ({})".format(dym)
-                errors.append(error)
-            self.error("\n       ".join(errors))
-
-        return args
-
-    def add_argument(self, *args, **kwargs):
-        """Automatically add the default value to help text."""
-        if "default" in kwargs:
-            default = kwargs["default"]
-            if default is None:
-                default = kwargs.pop("display_default", None)
-
-            if (
-                default
-                and isinstance(default, (str, int, float))
-                and default != argparse.SUPPRESS
-            ):
-                assert (
-                    "choices" not in kwargs or default in kwargs["choices"]
-                ), "default value '{}' is not one of allowed choices: {}".format(
-                    default, kwargs["choices"]
-                )
-                if "help" in kwargs and kwargs["help"] != argparse.SUPPRESS:
-                    assert isinstance(kwargs["help"], str), type(kwargs["help"])
-                    kwargs["help"] = "{} (default:{})".format(kwargs["help"], default)
-
-        super(ExtArgumentParser, self).add_argument(*args, **kwargs)
-
-    def __init__(self, context, *args, **kwargs):
-        self.context = context
-        super(ExtArgumentParser, self).__init__(*args, **kwargs)
-
-
-class TestExtArgumentParser(unittest.TestCase):
-    def test_did_you_mean(self):
-        parser = ExtArgumentParser(None)
-        parser.add_argument("--foo")
-        parser.add_argument("--qoo", help=argparse.SUPPRESS)
-        parser.add_argument("jam", nargs="?")
-
-        parser.parse_args(["--foo", "0"])
-
-        expected = (
-            r"^unrecognized argument\: <y>'\-\-doo'</>\s+"
-            r"\(did you mean <y>'\-\-foo'</>\?\)\n"
-            r"\s*<g>usage:</>"
-        )
-        with self.assertRaisesRegex(Error, expected):
-            parser.parse_args(["--doo"])
-
-        parser.add_argument("--noo")
-
-        expected = (
-            r"^unrecognized argument\: <y>'\-\-doo'</>\s+"
-            r"\(did you mean <y>'\-\-noo'</> or <y>'\-\-foo'</>\?\)\n"
-            r"\s*<g>usage:</>"
-        )
-        with self.assertRaisesRegex(Error, expected):
-            parser.parse_args(["--doo"])
-
-        expected = r"^unrecognized argument\: <y>'\-\-bar'</>\n" r"\s*<g>usage:</>"
-        with self.assertRaisesRegex(Error, expected):
-            parser.parse_args(["--bar"])
-
-        expected = r"^unexpected argument\: <y>'\-\-foo'</>\n" r"\s*<g>usage:</>"
-        with self.assertRaisesRegex(Error, expected):
-            parser.parse_args(["--", "x", "--foo"])
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/Logging.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/Logging.py
deleted file mode 100644
index 89fe50f3626fa2..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/Logging.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Utility functions for producing command line warnings."""
-
-from dex.utils import PrettyOutput
-
-
-class Logger(object):
-    def __init__(self, pretty_output: PrettyOutput):
-        self.o = pretty_output
-        self.error_color = self.o.red
-        self.warning_color = self.o.yellow
-        self.note_color = self.o.default
-        self.verbosity = 1
-
-    def error(self, msg, enable_prefix=True, flag=None):
-        if self.verbosity < 0:
-            return
-        if enable_prefix:
-            msg = f"error: {msg}"
-        if flag:
-            msg = f"{msg} <y>[{flag}]</>"
-        self.error_color("{}\n".format(msg), stream=PrettyOutput.stderr)
-
-    def warning(self, msg, enable_prefix=True, flag=None):
-        if self.verbosity < 1:
-            return
-        if enable_prefix:
-            msg = f"warning: {msg}"
-        if flag:
-            msg = f"{msg} <y>[{flag}]</>"
-        self.warning_color("{}\n".format(msg), stream=PrettyOutput.stderr)
-
-    def note(self, msg, enable_prefix=True, flag=None):
-        if self.verbosity < 2:
-            return
-        if enable_prefix:
-            msg = f"note: {msg}"
-        if flag:
-            msg = f"{msg} <y>[{flag}]</>"
-        self.note_color("{}\n".format(msg), stream=PrettyOutput.stderr)
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/PrettyOutputBase.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/PrettyOutputBase.py
deleted file mode 100644
index 0b4a47dda741d0..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/PrettyOutputBase.py
+++ /dev/null
@@ -1,399 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Provides formatted/colored console output on both Windows and Linux.
-
-Do not use this module directly, but instead use via the appropriate platform-
-specific module.
-"""
-
-import abc
-import re
-import sys
-import threading
-import unittest
-
-from io import StringIO
-
-from dex.utils.Exceptions import Error
-
-
-class _NullLock(object):
-    def __enter__(self):
-        return None
-
-    def __exit__(self, *params):
-        pass
-
-
-_lock = threading.Lock()
-_null_lock = _NullLock()
-
-
-class PreserveAutoColors(object):
-    def __init__(self, pretty_output):
-        self.pretty_output = pretty_output
-        self.orig_values = {}
-        self.properties = ["auto_reds", "auto_yellows", "auto_greens", "auto_blues"]
-
-    def __enter__(self):
-        for p in self.properties:
-            self.orig_values[p] = getattr(self.pretty_output, p)[:]
-        return self
-
-    def __exit__(self, *args):
-        for p in self.properties:
-            setattr(self.pretty_output, p, self.orig_values[p])
-
-
-class Stream(object):
-    def __init__(self, py_, os_=None):
-        self.py = py_
-        self.os = os_
-        self.orig_color = None
-        self.color_enabled = self.py.isatty()
-
-
-class PrettyOutputBase(object, metaclass=abc.ABCMeta):
-    stdout = Stream(sys.stdout)
-    stderr = Stream(sys.stderr)
-
-    def __init__(self):
-        self.auto_reds = []
-        self.auto_yellows = []
-        self.auto_greens = []
-        self.auto_blues = []
-        self._stack = []
-
-    def __enter__(self):
-        return self
-
-    def __exit__(self, *args):
-        pass
-
-    def _set_valid_stream(self, stream):
-        if stream is None:
-            return self.__class__.stdout
-        return stream
-
-    def _write(self, text, stream):
-        text = str(text)
-
-        # Users can embed color control tags in their output
-        # (e.g. <r>hello</> <y>world</> would write the word 'hello' in red and
-        # 'world' in yellow).
-        # This function parses these tags using a very simple recursive
-        # descent.
-        colors = {
-            "r": self.red,
-            "y": self.yellow,
-            "g": self.green,
-            "b": self.blue,
-            "d": self.default,
-            "a": self.auto,
-        }
-
-        # Find all tags (whether open or close)
-        tags = [t for t in re.finditer("<([{}/])>".format("".join(colors)), text)]
-
-        if not tags:
-            # No tags.  Just write the text to the current stream and return.
-            # 'unmangling' any tags that have been mangled so that they won't
-            # render as colors (for example in error output from this
-            # function).
-            stream = self._set_valid_stream(stream)
-            stream.py.write(text.replace(r"\>", ">"))
-            return
-
-        open_tags = [i for i in tags if i.group(1) != "/"]
-        close_tags = [i for i in tags if i.group(1) == "/"]
-
-        if len(open_tags) != len(close_tags) or any(
-            o.start() >= c.start() for (o, c) in zip(open_tags, close_tags)
-        ):
-            raise Error(
-                'open/close tag mismatch in "{}"'.format(text.rstrip()).replace(
-                    ">", r"\>"
-                )
-            )
-
-        open_tag = open_tags.pop(0)
-
-        # We know that the tags balance correctly, so figure out where the
-        # corresponding close tag is to the current open tag.
-        tag_nesting = 1
-        close_tag = None
-        for tag in tags[1:]:
-            if tag.group(1) == "/":
-                tag_nesting -= 1
-            else:
-                tag_nesting += 1
-            if tag_nesting == 0:
-                close_tag = tag
-                break
-        else:
-            assert False, text
-
-        # Use the method on the top of the stack for text prior to the open
-        # tag.
-        before = text[: open_tag.start()]
-        if before:
-            self._stack[-1](before, lock=_null_lock, stream=stream)
-
-        # Use the specified color for the tag itself.
-        color = open_tag.group(1)
-        within = text[open_tag.end() : close_tag.start()]
-        if within:
-            colors[color](within, lock=_null_lock, stream=stream)
-
-        # Use the method on the top of the stack for text after the close tag.
-        after = text[close_tag.end() :]
-        if after:
-            self._stack[-1](after, lock=_null_lock, stream=stream)
-
-    def flush(self, stream):
-        stream = self._set_valid_stream(stream)
-        stream.py.flush()
-
-    def auto(self, text, stream=None, lock=_lock):
-        text = str(text)
-        stream = self._set_valid_stream(stream)
-        lines = text.splitlines(True)
-
-        with lock:
-            for line in lines:
-                # This is just being cute for the sake of cuteness, but why
-                # not?
-                line = line.replace("DExTer", "<r>D<y>E<g>x<b>T</></>e</>r</>")
-
-                # Apply the appropriate color method if the expression matches
-                # any of
-                # the patterns we have set up.
-                for fn, regexs in (
-                    (self.red, self.auto_reds),
-                    (self.yellow, self.auto_yellows),
-                    (self.green, self.auto_greens),
-                    (self.blue, self.auto_blues),
-                ):
-                    if any(re.search(regex, line) for regex in regexs):
-                        fn(line, stream=stream, lock=_null_lock)
-                        break
-                else:
-                    self.default(line, stream=stream, lock=_null_lock)
-
-    def _call_color_impl(self, fn, impl, text, *args, **kwargs):
-        try:
-            self._stack.append(fn)
-            return impl(text, *args, **kwargs)
-        finally:
-            fn = self._stack.pop()
-
-    @abc.abstractmethod
-    def red_impl(self, text, stream=None, **kwargs):
-        pass
-
-    def red(self, *args, **kwargs):
-        return self._call_color_impl(self.red, self.red_impl, *args, **kwargs)
-
-    @abc.abstractmethod
-    def yellow_impl(self, text, stream=None, **kwargs):
-        pass
-
-    def yellow(self, *args, **kwargs):
-        return self._call_color_impl(self.yellow, self.yellow_impl, *args, **kwargs)
-
-    @abc.abstractmethod
-    def green_impl(self, text, stream=None, **kwargs):
-        pass
-
-    def green(self, *args, **kwargs):
-        return self._call_color_impl(self.green, self.green_impl, *args, **kwargs)
-
-    @abc.abstractmethod
-    def blue_impl(self, text, stream=None, **kwargs):
-        pass
-
-    def blue(self, *args, **kwargs):
-        return self._call_color_impl(self.blue, self.blue_impl, *args, **kwargs)
-
-    @abc.abstractmethod
-    def default_impl(self, text, stream=None, **kwargs):
-        pass
-
-    def default(self, *args, **kwargs):
-        return self._call_color_impl(self.default, self.default_impl, *args, **kwargs)
-
-    def colortest(self):
-        from itertools import combinations, permutations
-
-        fns = (
-            (self.red, "rrr"),
-            (self.yellow, "yyy"),
-            (self.green, "ggg"),
-            (self.blue, "bbb"),
-            (self.default, "ddd"),
-        )
-
-        for l in range(1, len(fns) + 1):
-            for comb in combinations(fns, l):
-                for perm in permutations(comb):
-                    for stream in (None, self.__class__.stderr):
-                        perm[0][0]("stdout " if stream is None else "stderr ", stream)
-                        for fn, string in perm:
-                            fn(string, stream)
-                        self.default("\n", stream)
-
-        tests = [
-            (self.auto, "default1<r>red2</>default3"),
-            (self.red, "red1<r>red2</>red3"),
-            (self.blue, "blue1<r>red2</>blue3"),
-            (self.red, "red1<y>yellow2</>red3"),
-            (self.auto, "default1<y>yellow2<r>red3</></>"),
-            (self.auto, "default1<g>green2<r>red3</></>"),
-            (self.auto, "default1<g>green2<r>red3</>green4</>default5"),
-            (self.auto, "default1<g>green2</>default3<g>green4</>default5"),
-            (self.auto, "<r>red1<g>green2</>red3<g>green4</>red5</>"),
-            (self.auto, "<r>red1<y><g>green2</>yellow3</>green4</>default5"),
-            (self.auto, "<r><y><g><b><d>default1</></><r></></></>red2</>"),
-            (self.auto, "<r>red1</>default2<r>red3</><g>green4</>default5"),
-            (self.blue, "<r>red1</>blue2<r><r>red3</><g><g>green</></></>"),
-            (self.blue, "<r>r<r>r<y>y<r><r><r><r>r</></></></></></></>b"),
-        ]
-
-        for fn, text in tests:
-            for stream in (None, self.__class__.stderr):
-                stream_name = "stdout" if stream is None else "stderr"
-                fn("{} {}\n".format(stream_name, text), stream)
-
-
-class TestPrettyOutput(unittest.TestCase):
-    class MockPrettyOutput(PrettyOutputBase):
-        def red_impl(self, text, stream=None, **kwargs):
-            self._write("[R]{}[/R]".format(text), stream)
-
-        def yellow_impl(self, text, stream=None, **kwargs):
-            self._write("[Y]{}[/Y]".format(text), stream)
-
-        def green_impl(self, text, stream=None, **kwargs):
-            self._write("[G]{}[/G]".format(text), stream)
-
-        def blue_impl(self, text, stream=None, **kwargs):
-            self._write("[B]{}[/B]".format(text), stream)
-
-        def default_impl(self, text, stream=None, **kwargs):
-            self._write("[D]{}[/D]".format(text), stream)
-
-    def test_red(self):
-        with TestPrettyOutput.MockPrettyOutput() as o:
-            stream = Stream(StringIO())
-            o.red("hello", stream)
-            self.assertEqual(stream.py.getvalue(), "[R]hello[/R]")
-
-    def test_yellow(self):
-        with TestPrettyOutput.MockPrettyOutput() as o:
-            stream = Stream(StringIO())
-            o.yellow("hello", stream)
-            self.assertEqual(stream.py.getvalue(), "[Y]hello[/Y]")
-
-    def test_green(self):
-        with TestPrettyOutput.MockPrettyOutput() as o:
-            stream = Stream(StringIO())
-            o.green("hello", stream)
-            self.assertEqual(stream.py.getvalue(), "[G]hello[/G]")
-
-    def test_blue(self):
-        with TestPrettyOutput.MockPrettyOutput() as o:
-            stream = Stream(StringIO())
-            o.blue("hello", stream)
-            self.assertEqual(stream.py.getvalue(), "[B]hello[/B]")
-
-    def test_default(self):
-        with TestPrettyOutput.MockPrettyOutput() as o:
-            stream = Stream(StringIO())
-            o.default("hello", stream)
-            self.assertEqual(stream.py.getvalue(), "[D]hello[/D]")
-
-    def test_auto(self):
-        with TestPrettyOutput.MockPrettyOutput() as o:
-            stream = Stream(StringIO())
-            o.auto_reds.append("foo")
-            o.auto("bar\n", stream)
-            o.auto("foo\n", stream)
-            o.auto("baz\n", stream)
-            self.assertEqual(
-                stream.py.getvalue(), "[D]bar\n[/D][R]foo\n[/R][D]baz\n[/D]"
-            )
-
-            stream = Stream(StringIO())
-            o.auto("bar\nfoo\nbaz\n", stream)
-            self.assertEqual(
-                stream.py.getvalue(), "[D]bar\n[/D][R]foo\n[/R][D]baz\n[/D]"
-            )
-
-            stream = Stream(StringIO())
-            o.auto("barfoobaz\nbardoobaz\n", stream)
-            self.assertEqual(
-                stream.py.getvalue(), "[R]barfoobaz\n[/R][D]bardoobaz\n[/D]"
-            )
-
-            o.auto_greens.append("doo")
-            stream = Stream(StringIO())
-            o.auto("barfoobaz\nbardoobaz\n", stream)
-            self.assertEqual(
-                stream.py.getvalue(), "[R]barfoobaz\n[/R][G]bardoobaz\n[/G]"
-            )
-
-    def test_PreserveAutoColors(self):
-        with TestPrettyOutput.MockPrettyOutput() as o:
-            o.auto_reds.append("foo")
-            with PreserveAutoColors(o):
-                o.auto_greens.append("bar")
-                stream = Stream(StringIO())
-                o.auto("foo\nbar\nbaz\n", stream)
-                self.assertEqual(
-                    stream.py.getvalue(), "[R]foo\n[/R][G]bar\n[/G][D]baz\n[/D]"
-                )
-
-            stream = Stream(StringIO())
-            o.auto("foo\nbar\nbaz\n", stream)
-            self.assertEqual(
-                stream.py.getvalue(), "[R]foo\n[/R][D]bar\n[/D][D]baz\n[/D]"
-            )
-
-            stream = Stream(StringIO())
-            o.yellow("<a>foo</>bar<a>baz</>", stream)
-            self.assertEqual(
-                stream.py.getvalue(),
-                "[Y][Y][/Y][R]foo[/R][Y][Y]bar[/Y][D]baz[/D][Y][/Y][/Y][/Y]",
-            )
-
-    def test_tags(self):
-        with TestPrettyOutput.MockPrettyOutput() as o:
-            stream = Stream(StringIO())
-            o.auto("<r>hi</>", stream)
-            self.assertEqual(stream.py.getvalue(), "[D][D][/D][R]hi[/R][D][/D][/D]")
-
-            stream = Stream(StringIO())
-            o.auto("<r><y>a</>b</>c", stream)
-            self.assertEqual(
-                stream.py.getvalue(),
-                "[D][D][/D][R][R][/R][Y]a[/Y][R]b[/R][/R][D]c[/D][/D]",
-            )
-
-            with self.assertRaisesRegex(Error, "tag mismatch"):
-                o.auto("<r>hi", stream)
-
-            with self.assertRaisesRegex(Error, "tag mismatch"):
-                o.auto("hi</>", stream)
-
-            with self.assertRaisesRegex(Error, "tag mismatch"):
-                o.auto("<r><y>hi</>", stream)
-
-            with self.assertRaisesRegex(Error, "tag mismatch"):
-                o.auto("<r><y>hi</><r></>", stream)
-
-            with self.assertRaisesRegex(Error, "tag mismatch"):
-                o.auto("</>hi<r>", stream)
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/ReturnCode.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/ReturnCode.py
deleted file mode 100644
index a3257913a90ac5..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/ReturnCode.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-from enum import Enum
-
-
-class ReturnCode(Enum):
-    """Used to indicate whole program success status."""
-
-    OK = 0
-    _ERROR = 1  # Unhandled exceptions result in exit(1) by default.
-    # Usage of _ERROR is discouraged:
-    # If the program cannot run, raise an exception.
-    # If the program runs successfully but the result is
-    # "failure" based on the inputs, return FAIL
-    FAIL = 2
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/RootDirectory.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/RootDirectory.py
deleted file mode 100644
index c41797c7a05d3b..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/RootDirectory.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Utility functions related to DExTer's directory layout."""
-
-import os
-
-
-def get_root_directory():
-    root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
-    assert os.path.basename(root) == "dex", root
-    return root
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/Timeout.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/Timeout.py
deleted file mode 100644
index c356206f0c50dc..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/Timeout.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Utility class to check for timeouts. Timer starts when the object is initialized,
-and can be checked by calling timed_out(). Passing a timeout value of 0.0 or less
-means a timeout will never be triggered, i.e. timed_out() will always return False.
-"""
-
-import time
-
-
-class Timeout(object):
-    def __init__(self, duration: float):
-        self.start = self.now
-        self.duration = duration
-
-    def timed_out(self):
-        if self.duration <= 0.0:
-            return False
-        return self.elapsed > self.duration
-
-    @property
-    def elapsed(self):
-        return self.now - self.start
-
-    @property
-    def now(self):
-        return time.time()
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/Timer.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/Timer.py
deleted file mode 100644
index 6548086677635f..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/Timer.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""RAII-style timer class to be used with a 'with' statement to get wall clock
-time for the contained code.
-"""
-
-import sys
-import time
-
-
-def _indent(indent):
-    return "| " * indent
-
-
-class Timer(object):
-    fn = sys.stdout.write
-    display = False
-    indent = 0
-
-    def __init__(self, name=None):
-        self.name = name
-        self.start = self.now
-
-    def __enter__(self):
-        Timer.indent += 1
-        if Timer.display and self.name:
-            indent = _indent(Timer.indent - 1) + " _"
-            Timer.fn("{}\n".format(_indent(Timer.indent - 1)))
-            Timer.fn("{} start {}\n".format(indent, self.name))
-        return self
-
-    def __exit__(self, *args):
-        if Timer.display and self.name:
-            indent = _indent(Timer.indent - 1) + "|_"
-            Timer.fn(
-                "{} {} time taken: {:0.1f}s\n".format(indent, self.name, self.elapsed)
-            )
-            Timer.fn("{}\n".format(_indent(Timer.indent - 1)))
-        Timer.indent -= 1
-
-    @property
-    def elapsed(self):
-        return self.now - self.start
-
-    @property
-    def now(self):
-        return time.time()
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/UnitTests.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/UnitTests.py
deleted file mode 100644
index 0c4999150abb59..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/UnitTests.py
+++ /dev/null
@@ -1,62 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Unit test harness."""
-
-from fnmatch import fnmatch
-import os
-import unittest
-
-from io import StringIO
-
-from dex.utils import is_native_windows, has_pywin32
-from dex.utils import PreserveAutoColors, PrettyOutput
-from dex.utils import Timer
-
-
-class DexTestLoader(unittest.TestLoader):
-    def _match_path(self, path, full_path, pattern):
-        """Don't try to import platform-specific modules for the wrong platform
-        during test discovery.
-        """
-        d = os.path.basename(os.path.dirname(full_path))
-        if is_native_windows():
-            if d == "posix":
-                return False
-            if d == "windows":
-                return has_pywin32()
-        else:
-            if d == "windows":
-                return False
-            elif d == "dbgeng":
-                return False
-        return fnmatch(path, pattern)
-
-
-def unit_tests_ok(context):
-    unittest.TestCase.maxDiff = None  # remove size limit from diff output.
-
-    with Timer("unit tests"):
-        suite = DexTestLoader().discover(context.root_directory, pattern="*.py")
-        stream = StringIO()
-        result = unittest.TextTestRunner(verbosity=2, stream=stream).run(suite)
-
-        ok = result.wasSuccessful()
-        if not ok or context.options.unittest == "show-all":
-            with PreserveAutoColors(context.o):
-                context.o.auto_reds.extend([r"FAIL(ED|\:)", r"\.\.\.\s(FAIL|ERROR)$"])
-                context.o.auto_greens.extend([r"^OK$", r"\.\.\.\sok$"])
-                context.o.auto_blues.extend([r"^Ran \d+ test"])
-                context.o.default("\n")
-                for line in stream.getvalue().splitlines(True):
-                    context.o.auto(line, stream=PrettyOutput.stderr)
-
-        return ok
-
-
-class TestUnitTests(unittest.TestCase):
-    def test_sanity(self):
-        self.assertEqual(1, 1)
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/Version.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/Version.py
deleted file mode 100644
index 89ab5c2dbd72a3..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/Version.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""DExTer version output."""
-
-import os
-from subprocess import CalledProcessError, check_output, STDOUT
-import sys
-from urllib.parse import urlparse, urlunparse
-
-from dex import __version__
-
-
-def sanitize_repo_url(repo):
-    parsed = urlparse(repo)
-    # No username present, repo URL is fine.
-    if parsed.username is None:
-        return repo
-    # Otherwise, strip the login details from the URL by reconstructing the netloc from just `<hostname>(:<port>)?`.
-    sanitized_netloc = parsed.hostname
-    if parsed.port:
-        sanitized_netloc = f"{sanitized_netloc}:{parsed.port}"
-    return urlunparse(parsed._replace(netloc=sanitized_netloc))
-
-
-def _git_version():
-    dir_ = os.path.dirname(__file__)
-    try:
-        branch = (
-            check_output(
-                ["git", "rev-parse", "--abbrev-ref", "HEAD"], stderr=STDOUT, cwd=dir_
-            )
-            .rstrip()
-            .decode("utf-8")
-        )
-        hash_ = (
-            check_output(["git", "rev-parse", "HEAD"], stderr=STDOUT, cwd=dir_)
-            .rstrip()
-            .decode("utf-8")
-        )
-        repo = sanitize_repo_url(
-            check_output(
-                ["git", "remote", "get-url", "origin"], stderr=STDOUT, cwd=dir_
-            )
-            .rstrip()
-            .decode("utf-8")
-        )
-        return "[{} {}] ({})".format(branch, hash_, repo)
-    except (OSError, CalledProcessError):
-        pass
-    return None
-
-
-def version(name):
-    lines = []
-    lines.append(" ".join([s for s in [name, __version__, _git_version()] if s]))
-    lines.append("  using Python {}".format(sys.version))
-    return "\n".join(lines)
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/WorkingDirectory.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/WorkingDirectory.py
deleted file mode 100644
index 28bcff798f1828..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/WorkingDirectory.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Create/set a temporary working directory for some operations."""
-
-import os
-import shutil
-import tempfile
-import time
-
-from dex.utils.Exceptions import Error
-
-
-class WorkingDirectory(object):
-    def __init__(self, context, *args, **kwargs):
-        self.context = context
-        self.orig_cwd = os.getcwd()
-
-        dir_ = kwargs.get("dir", None)
-        if dir_ and not os.path.isdir(dir_):
-            os.makedirs(dir_, exist_ok=True)
-        self.path = tempfile.mkdtemp(*args, **kwargs)
-
-    def __enter__(self):
-        os.chdir(self.path)
-        return self
-
-    def __exit__(self, *args):
-        os.chdir(self.orig_cwd)
-        if self.context.options.save_temps:
-            self.context.o.blue('"{}" left in place [--save-temps]\n'.format(self.path))
-            return
-
-        for _ in range(100):
-            try:
-                shutil.rmtree(self.path)
-                return
-            except OSError:
-                time.sleep(0.1)
-
-        self.context.logger.warning(
-            f'"{self.path}" left in place (couldn\'t delete)', enable_prefix=True
-        )
-        return
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/__init__.py
deleted file mode 100644
index ae2dea3f2c5ba1..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/__init__.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Generic non-dexter-specific utility classes and functions."""
-
-import os
-
-from dex.utils.Environment import is_native_windows, has_pywin32
-from dex.utils.PrettyOutputBase import PreserveAutoColors
-from dex.utils.RootDirectory import get_root_directory
-from dex.utils.Timer import Timer
-from dex.utils.WorkingDirectory import WorkingDirectory
-
-if is_native_windows():
-    from dex.utils.windows.PrettyOutput import PrettyOutput
-else:
-    from dex.utils.posix.PrettyOutput import PrettyOutput
-
-from dex.utils.Logging import Logger
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/posix/PrettyOutput.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/posix/PrettyOutput.py
deleted file mode 100644
index 1597e1a413c6f8..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/posix/PrettyOutput.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Provides POSIX implementation of formatted/colored console output."""
-
-from ..PrettyOutputBase import PrettyOutputBase, _lock
-
-
-class PrettyOutput(PrettyOutputBase):
-    def _color(self, text, color, stream, lock=_lock):
-        """Use ANSI escape codes to provide color on Linux."""
-        stream = self._set_valid_stream(stream)
-        with lock:
-            if stream.color_enabled:
-                text = "\033[{}m{}\033[0m".format(color, text)
-            self._write(text, stream)
-
-    def red_impl(self, text, stream=None, **kwargs):
-        self._color(text, 91, stream, **kwargs)
-
-    def yellow_impl(self, text, stream=None, **kwargs):
-        self._color(text, 93, stream, **kwargs)
-
-    def green_impl(self, text, stream=None, **kwargs):
-        self._color(text, 92, stream, **kwargs)
-
-    def blue_impl(self, text, stream=None, **kwargs):
-        self._color(text, 96, stream, **kwargs)
-
-    def default_impl(self, text, stream=None, **kwargs):
-        self._color(text, 0, stream, **kwargs)
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/posix/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/posix/__init__.py
deleted file mode 100644
index 1194affd89132c..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/posix/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/windows/PrettyOutput.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/windows/PrettyOutput.py
deleted file mode 100644
index 7f9522d5a8e792..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/windows/PrettyOutput.py
+++ /dev/null
@@ -1,83 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""Provides Windows implementation of formatted/colored console output."""
-
-import sys
-
-import ctypes
-import ctypes.wintypes
-
-from ..PrettyOutputBase import PrettyOutputBase, Stream, _lock, _null_lock
-
-
-class _CONSOLE_SCREEN_BUFFER_INFO(ctypes.Structure):
-    # pylint: disable=protected-access
-    _fields_ = [
-        ("dwSize", ctypes.wintypes._COORD),
-        ("dwCursorPosition", ctypes.wintypes._COORD),
-        ("wAttributes", ctypes.c_ushort),
-        ("srWindow", ctypes.wintypes._SMALL_RECT),
-        ("dwMaximumWindowSize", ctypes.wintypes._COORD),
-    ]
-    # pylint: enable=protected-access
-
-
-class PrettyOutput(PrettyOutputBase):
-    stdout = Stream(sys.stdout, ctypes.windll.kernel32.GetStdHandle(-11))
-    stderr = Stream(sys.stderr, ctypes.windll.kernel32.GetStdHandle(-12))
-
-    def __enter__(self):
-        info = _CONSOLE_SCREEN_BUFFER_INFO()
-
-        for s in (PrettyOutput.stdout, PrettyOutput.stderr):
-            ctypes.windll.kernel32.GetConsoleScreenBufferInfo(s.os, ctypes.byref(info))
-            s.orig_color = info.wAttributes
-
-        return self
-
-    def __exit__(self, *args):
-        self._restore_orig_color(PrettyOutput.stdout)
-        self._restore_orig_color(PrettyOutput.stderr)
-
-    def _restore_orig_color(self, stream, lock=_lock):
-        if not stream.color_enabled:
-            return
-
-        with lock:
-            stream = self._set_valid_stream(stream)
-            self.flush(stream)
-            if stream.orig_color:
-                ctypes.windll.kernel32.SetConsoleTextAttribute(
-                    stream.os, stream.orig_color
-                )
-
-    def _color(self, text, color, stream, lock=_lock):
-        stream = self._set_valid_stream(stream)
-        with lock:
-            try:
-                if stream.color_enabled:
-                    ctypes.windll.kernel32.SetConsoleTextAttribute(stream.os, color)
-                self._write(text, stream)
-            finally:
-                if stream.color_enabled:
-                    self._restore_orig_color(stream, lock=_null_lock)
-
-    def red_impl(self, text, stream=None, **kwargs):
-        self._color(text, 12, stream, **kwargs)
-
-    def yellow_impl(self, text, stream=None, **kwargs):
-        self._color(text, 14, stream, **kwargs)
-
-    def green_impl(self, text, stream=None, **kwargs):
-        self._color(text, 10, stream, **kwargs)
-
-    def blue_impl(self, text, stream=None, **kwargs):
-        self._color(text, 11, stream, **kwargs)
-
-    def default_impl(self, text, stream=None, **kwargs):
-        stream = self._set_valid_stream(stream)
-        self._color(text, stream.orig_color, stream, **kwargs)
diff --git a/cross-project-tests/debuginfo-tests/dexter/dex/utils/windows/__init__.py b/cross-project-tests/debuginfo-tests/dexter/dex/utils/windows/__init__.py
deleted file mode 100644
index 1194affd89132c..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dex/utils/windows/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
diff --git a/cross-project-tests/debuginfo-tests/dexter/dexter.py b/cross-project-tests/debuginfo-tests/dexter/dexter.py
deleted file mode 100755
index 8473cff3c7135b..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/dexter.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env python
-# DExTer : Debugging Experience Tester
-# ~~~~~~   ~         ~~         ~   ~~
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""DExTer entry point. This is the only non-module file."""
-
-import sys
-
-if sys.version_info < (3, 6, 0):
-    sys.stderr.write("You need python 3.6 or later to run DExTer\n")
-    # Equivalent to sys.exit(ReturnCode._ERROR).
-    sys.exit(1)
-
-from dex.tools import main
-
-if __name__ == "__main__":
-    return_code = main()
-    sys.exit(return_code.value)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/Readme.md b/cross-project-tests/debuginfo-tests/dexter/feature_tests/Readme.md
deleted file mode 100644
index 303aa3cfd0f0ac..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/Readme.md
+++ /dev/null
@@ -1,4 +0,0 @@
-# DExTer feature tests
-
-This directory is home to dexter feature and regression tests to be run with
-llvm-lit.
\ No newline at end of file
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/dex_declare_file.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/dex_declare_file.cpp
deleted file mode 100644
index adad78040947d9..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/dex_declare_file.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// Purpose:
-//    Check that \DexDeclareFile causes a DexExpectWatchValue's to generate a
-//    missing value penalty when the declared path is incorrect.
-//
-// UNSUPPORTED: system-darwin
-//
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: dex_declare_file.cpp
-
-int main() {
-  int result = 0;
-  return result; //DexLabel('return')
-}
-
-// DexDeclareFile('this_file_does_not_exist.cpp')
-// DexExpectWatchValue('result', 0, on_line='return')
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_program_state.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_program_state.cpp
deleted file mode 100644
index db81de2e9853ce..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_program_state.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// Purpose:
-//      Check that \DexExpectProgramState correctly applies a penalty when
-//      an expected program state is never found.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: expect_program_state.cpp:
-
-int GCD(int lhs, int rhs)
-{
-    if (rhs == 0)   // DexLabel('check')
-        return lhs;
-    return GCD(rhs, lhs % rhs);
-}
-
-int main()
-{
-    return GCD(111, 259);
-}
-
-/*
-DexExpectProgramState({
-    'frames': [
-        {
-            'location': {
-                'lineno': ref('check')
-            },
-            'watches': {
-                'lhs': '0', 'rhs': '0'
-            }
-        },
-    ]
-})
-*/
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_step_kinds.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_step_kinds.cpp
deleted file mode 100644
index bab2de642a1c33..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_step_kinds.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-// Purpose:
-//      Check that \DexExpectStepKind correctly applies a penalty when
-//      unexpected step kinds are encountered.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: expect_step_kinds.cpp:
-
-int abs(int i){
-    return i < 0? i * -1: i;
-}
-
-int main()
-{
-    volatile int x = 2;
-    for (int i = 0; i < x; ++i) {
-        abs(i);
-    }
-    return 0;
-}
-
-// DexExpectStepKind('FUNC', 5)
-// DexExpectStepKind('FUNC_EXTERNAL', 2)
-// DexExpectStepKind('VERTICAL_BACKWARD', 2)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_step_order.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_step_order.cpp
deleted file mode 100644
index 76296caf13eca6..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_step_order.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// Purpose:
-//      Check that \DexExpectStepOrder correctly applies a penalty for steps
-//      found out of expected order.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: expect_step_order.cpp:
-
-int main()
-{
-    volatile int x = 1; // DexExpectStepOrder(3)
-    volatile int y = 1; // DexExpectStepOrder(1)
-    volatile int z = 1; // DexExpectStepOrder(2)
-    return 0;
-}
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_watch_type.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_watch_type.cpp
deleted file mode 100644
index 9aef64c8134270..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_watch_type.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// Purpose:
-//      Check that \DexExpectWatchType applies penalties when expected
-//      types are not found and unexpected types are.
-//
-// UNSUPPORTED: system-darwin
-//
-//
-// NOTE: This test passes but not in the expected way on Windows.
-// TODO: Reduce this test's coverage and be more specific about
-// expected behaviour.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: expect_watch_type.cpp:
-
-template<class T>
-class Doubled {
-public:
-  Doubled(const T & to_double)
-    : m_member(to_double * 2) {}
-
-  T GetVal() {
-    T to_return = m_member; // DexLabel('gv_start')
-    return to_return;       // DexLabel('gv_end')
-  }
-
-  static T static_doubler(const T & to_double) {
-    T result = 0;           // DexLabel('sd_start')
-    result = to_double * 2;
-    return result;          // DexLabel('sd_end')
-  }
-
-private:
-  T m_member;
-};
-
-int main() {
-  auto myInt = Doubled<int>(5); // DexLabel('main_start')
-  auto myDouble = Doubled<double>(5.5);
-  auto staticallyDoubledInt = Doubled<int>::static_doubler(5);
-  auto staticallyDoubledDouble = Doubled<double>::static_doubler(5.5);
-  return int(double(myInt.GetVal())
-         + double(staticallyDoubledInt)
-         + myDouble.GetVal()
-         + staticallyDoubledDouble); // DexLabel('main_end')
-}
-
-
-// DexExpectWatchType('m_member', 'int', 'double', from_line=ref('gv_start'), to_line=ref('gv_end'))
-
-// THIS COMMAND should create a penalty for a missing type 'const double' and unexpected type 'const double &'
-// DexExpectWatchType('to_double', 'const double', 'const int &', from_line=ref('sd_start'), to_line=ref('sd_end'))
-
-// DexExpectWatchType('myInt', 'Doubled<int>', from_line=ref('main_start'), to_line=ref('main_end'))
-// DexExpectWatchType('myDouble', 'Doubled<double>', from_line=ref('main_start'), to_line=ref('main_end'))
-// DexExpectWatchType('staticallyDoubledInt', 'int', from_line=ref('main_start'), to_line=ref('main_end'))
-// DexExpectWatchType('staticallyDoubledDouble', 'double', from_line=ref('main_start'), to_line=ref('main_end'))
-
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_watch_value.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_watch_value.cpp
deleted file mode 100644
index ca8f862a5eda62..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/expect_watch_value.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// Purpose:
-//      Check that \DexExpectWatchValue correctly applies a penalty when
-//      expected values are not found.
-//
-// UNSUPPORTED: system-darwin
-//
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: expect_watch_value.cpp:
-
-int main()
-{
-    for (int i = 0; i < 3; ++i)
-        int a = i; // DexLabel('loop')
-    return 0;  // DexLabel('ret')
-}
-
-// DexExpectWatchValue('i', '0', '1', '2', on_line=ref('loop'))
-// DexExpectWatchValue('i', '3', on_line=ref('ret'))
-// ---------------------^ out of scope
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/float_range_out_range.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/float_range_out_range.cpp
deleted file mode 100644
index ee9b7b5669c85f..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/float_range_out_range.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// Purpose:
-//      Check that a \DexExpectWatchValue float_range that is not large enough
-//      detects unexpected watch values.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: float_range_out_range.cpp:
-
-int main() {
-  float a = 1.0f;
-  a = a - 0.5f;
-  return a;  //DexLabel('check')
-}
-
-// DexExpectWatchValue('a', '1.00000', from_line=ref('check1'), to_line=ref('check2'), float_range=0.4)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/float_range_zero_nonmatch.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/float_range_zero_nonmatch.cpp
deleted file mode 100644
index 89108789bdb918..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/float_range_zero_nonmatch.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// Purpose:
-//      Check that \DexExpectWatchValue float_range=0.0 matches only exact
-//      values.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: float_range_zero_nonmatch.cpp:
-
-int main() {
-  float a = 1.0f;
-  return a; //DexLabel('check')
-}
-
-// DexExpectWatchValue('a', '1.0000001', on_line=ref('check'), float_range=0.0)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/missing_dex_address.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/missing_dex_address.cpp
deleted file mode 100644
index f07a43b91cbcb9..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/missing_dex_address.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// Purpose:
-//      Test that when a \DexDeclareAddress never resolves to a value, it is
-//      counted as a missing value in any \DexExpectWatchValues.
-//
-// The dbgeng driver doesn't support \DexDeclareAddress yet.
-// UNSUPPORTED: system-windows
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: missing_dex_address.cpp
-
-int main() {
-    int *x = nullptr;
-    x = new int(5); // DexLabel('start_line')
-    if (false) {
-        (void)0; // DexLabel('unreachable')
-    }
-    delete x; // DexLabel('end_line')
-}
-
-// DexDeclareAddress('x', 'x', on_line=ref('unreachable'))
-// DexExpectWatchValue('x', 0, address('x'), from_line=ref('start_line'), to_line=ref('end_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/unreachable.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/unreachable.cpp
deleted file mode 100644
index ea98e431dced77..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/unreachable.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// Purpose:
-//      Check that \DexUnreachable correctly applies a penalty if the command
-//      line is stepped on.
-//
-// UNSUPPORTED: system-darwin
-//
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: unreachable.cpp:
-
-int
-main()
-{
-  return 1;  // DexUnreachable()
-}
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/unreachable_line_range.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/unreachable_line_range.cpp
deleted file mode 100644
index 3038277d26e32a..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/unreachable_line_range.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// Purpose:
-//      Check that \DexUnreachable correctly applies a penalty if the command
-//      line is stepped on.
-//
-// UNSUPPORTED: system-darwin
-//
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: unreachable_line_range.cpp:
-
-int
-main()
-{ // DexLabel('begin')
-  return 1;
-} // DexLabel('end')
-
-// DexUnreachable(from_line=ref('begin'), to_line=ref('end'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/unreachable_on_line.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/unreachable_on_line.cpp
deleted file mode 100644
index f91a2611cecafd..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/penalty/unreachable_on_line.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// Purpose:
-//      Check that \DexUnreachable correctly applies a penalty if the command
-//      line is stepped on.
-//
-// UNSUPPORTED: system-darwin
-//
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: unreachable_on_line.cpp:
-
-int
-main()
-{
-  return 1;  // DexLabel('this_one')
-}
-
-// DexUnreachable(on_line=ref('this_one'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/command_line.c b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/command_line.c
deleted file mode 100644
index d4fae47fdd6cfa..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/command_line.c
+++ /dev/null
@@ -1,18 +0,0 @@
-// The dbgeng driver doesn't support \DexCommandLine yet.
-// UNSUPPORTED: system-windows
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: command_line.c:
-
-int main(int argc, const char **argv) {
-  if (argc == 4)
-    return 0; // DexLabel('retline')
-
-  return 1; // DexUnreachable()
-}
-
-// DexExpectWatchValue('argc', '4', on_line=ref('retline'))
-
-// Three args will be appended to the 'default' argument.
-// DexCommandLine(['a', 'b', 'c'])
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/address_after_ref.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/address_after_ref.cpp
deleted file mode 100644
index 6b461686f3930e..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/address_after_ref.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// Purpose:
-//      Test that a \DexDeclareAddress value can have its value defined after
-//      the first reference to that value.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: address_after_ref.cpp
-
-int main() {
-    int *x = new int(5);
-    int *y = x; // DexLabel('first_line')
-    delete x; // DexLabel('last_line')
-}
-
-// DexDeclareAddress('y', 'y', on_line=ref('last_line'))
-// DexExpectWatchValue('x', address('y'), on_line=ref('first_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/address_hit_count.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/address_hit_count.cpp
deleted file mode 100644
index 1bb995c942201d..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/address_hit_count.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// Purpose:
-//      Test that a \DexDeclareAddress command can be passed 'hit_count' as an
-//      optional keyword argument that captures the value of the given
-//      expression after the target line has been stepped on a given number of
-//      times.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: address_hit_count.cpp
-
-int main() {
-    int *x = new int[3];
-    for (int *y = x; y < x + 3; ++y)
-      *y = 0; // DexLabel('test_line')
-    delete x;
-}
-
-// DexDeclareAddress('y', 'y', on_line=ref('test_line'), hit_count=2)
-// DexExpectWatchValue('y', address('y', -8), address('y', -4), address('y'), on_line=ref('test_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/expression_address.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/expression_address.cpp
deleted file mode 100644
index 52a0f8891bc2ea..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/expression_address.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// Purpose:
-//      Test that a \DexDeclareAddress value can be used to compare the
-//      addresses of two local variables that refer to the same address.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: expression_address.cpp
-
-int main() {
-    int x = 5;
-    int &y = x;
-    x = 3; // DexLabel('test_line')
-}
-
-// DexDeclareAddress('x_addr', '&x', on_line=ref('test_line'))
-// DexExpectWatchValue('&x', address('x_addr'), on_line=ref('test_line'))
-// DexExpectWatchValue('&y', address('x_addr'), on_line=ref('test_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/identical_address.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/identical_address.cpp
deleted file mode 100644
index 71d8f9944be3b8..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/identical_address.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// Purpose:
-//      Test that a \DexDeclareAddress value can be used to compare two equal
-//      pointer variables.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: identical_address.cpp
-
-int main() {
-    int *x = new int(5);
-    int *y = x;
-    delete x; // DexLabel('test_line')
-}
-
-// DexDeclareAddress('x', 'x', on_line=ref('test_line'))
-// DexExpectWatchValue('x', address('x'), on_line=ref('test_line'))
-// DexExpectWatchValue('y', address('x'), on_line=ref('test_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/lit.local.cfg b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/lit.local.cfg
deleted file mode 100644
index 95de055175d076..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/lit.local.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-# The dbgeng driver doesn't support DexDeclareAddress yet.
-if config.is_msvc:
-    config.unsupported = True
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/multiple_address.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/multiple_address.cpp
deleted file mode 100644
index 487d95399dcf2c..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/multiple_address.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// Purpose:
-//      Test that multiple \DexDeclareAddress references that point to different
-//      addresses can be used within a single \DexExpectWatchValue.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: multiple_address.cpp
-
-int main() {
-    int *x = new int(5);
-    int *y = new int(4);
-    int *z = x;
-    *z = 0; // DexLabel('start_line')
-    z = y;
-    *z = 0;
-    delete x; // DexLabel('end_line')
-    delete y;
-}
-
-// DexDeclareAddress('x', 'x', on_line=ref('start_line'))
-// DexDeclareAddress('y', 'y', on_line=ref('start_line'))
-// DexExpectWatchValue('z', address('x'), address('y'), from_line=ref('start_line'), to_line=ref('end_line'))
-// DexExpectWatchValue('*z', 5, 0, 4, 0, from_line=ref('start_line'), to_line=ref('end_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/offset_address.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/offset_address.cpp
deleted file mode 100644
index ab60c254462cbe..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/offset_address.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// Purpose:
-//      Test that a \DexDeclareAddress value can be used to compare two pointer
-//      variables that have a fixed offset between them.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: offset_address.cpp
-
-int main() {
-    int *x = new int[5];
-    int *y = x + 3;
-    delete x; // DexLabel('test_line')
-}
-
-// DexDeclareAddress('x', 'x', on_line=ref('test_line'))
-// DexExpectWatchValue('x', address('x'), on_line=ref('test_line'))
-// DexExpectWatchValue('y', address('x', 12), on_line=ref('test_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/self_comparison.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/self_comparison.cpp
deleted file mode 100644
index 5c54723446439b..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_address/self_comparison.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// Purpose:
-//      Test that a \DexDeclareAddress value can be used to check the change in
-//      value of a variable over time, relative to its initial value.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: self_comparison.cpp
-
-int main() {
-    int *x = new int[3];
-    for (int *y = x; y < x + 3; ++y)
-      *y = 0; // DexLabel('test_line')
-    delete x;
-}
-
-// DexDeclareAddress('y', 'y', on_line=ref('test_line'))
-// DexExpectWatchValue('y', address('y'), address('y', 4), address('y', 8), on_line=ref('test_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/commands.dex b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/commands.dex
deleted file mode 100644
index bbad7db943bfb7..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/commands.dex
+++ /dev/null
@@ -1,2 +0,0 @@
-DexDeclareFile('test.cpp')
-DexExpectWatchValue('result', 0, on_line=14)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/lit.local.cfg.py b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/lit.local.cfg.py
deleted file mode 100644
index 70e844d02e7fb1..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/lit.local.cfg.py
+++ /dev/null
@@ -1 +0,0 @@
-config.suffixes = [".cpp"]
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/test.cfg b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/test.cfg
deleted file mode 100644
index e69de29bb2d1d6..00000000000000
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/test.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/test.cpp
deleted file mode 100644
index 71df65215a342f..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/dex_and_source/test.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// Purpose:
-//    Check that \DexDeclareFile changes the path of all succeeding commands
-//    to the file path it declares. Also check that dexter correctly accepts
-//    files with .dex extensions.
-//
-// UNSUPPORTED: system-darwin
-//
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: dex_and_source
-
-int main() {
-  int result = 0;
-  return result;
-}
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/lit.local.cfg b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/lit.local.cfg
deleted file mode 100644
index 4fa170f9848012..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/lit.local.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-# FIXME: These tests compile code with %clang substitution which needs to run
-# natively but doesn't specify target triple (i.e. default triple is used).
-config.unsupported = True
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary/commands.dex b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary/commands.dex
deleted file mode 100644
index 99b0a50d31b3b5..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary/commands.dex
+++ /dev/null
@@ -1,18 +0,0 @@
-# Purpose:
-#    Check that \DexDeclareFile's file declaration can reference source files
-#    in a precompiled binary.
-#
-# UNSUPPORTED: system-darwin
-#
-# RUN: %dexter_regression_test_build %S/test.cpp -o %t
-# RUN: %dexter_regression_base --binary %t %s | FileCheck %s
-# CHECK: commands.dex
-#
-# test.cpp
-# 1. int main() {
-# 2.   int result = 0;
-# 3.   return result;
-# 4. }
-
-DexDeclareFile('test.cpp')
-DexExpectWatchValue('result', 0, on_line=3)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary/lit.local.cfg.py b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary/lit.local.cfg.py
deleted file mode 100644
index 3dfcaa7e8301fe..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary/lit.local.cfg.py
+++ /dev/null
@@ -1 +0,0 @@
-config.suffixes = [".dex"]
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary/test.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary/test.cpp
deleted file mode 100644
index 4d3cc5846e66fd..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary/test.cpp
+++ /dev/null
@@ -1,4 +0,0 @@
-int main() {
-  int result = 0;
-  return result;
-}
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/dex_commands/commands.dex b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/dex_commands/commands.dex
deleted file mode 100644
index fffbaafd87db0e..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/dex_commands/commands.dex
+++ /dev/null
@@ -1,19 +0,0 @@
-# Purpose:
-#    Check that \DexDeclareFile's file declaration can reference source files
-#    not included in the test directory
-#
-# UNSUPPORTED: system-darwin
-#
-# RUN: %clang %S/../source/test.cpp -O0 -g -o %t
-# RUN: %dexter_regression_base --binary %t %s | FileCheck %s
-# RUN: rm %t
-# CHECK: commands.dex
-#
-# test.cpp
-# 1. int main() {
-# 2.   int result = 0;
-# 3.   return result;
-# 4. }
-
-DexDeclareFile('../source/test.cpp')
-DexExpectWatchValue('result', 0, on_line=3)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/dex_commands/source_root_dir.dex b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/dex_commands/source_root_dir.dex
deleted file mode 100644
index e186cabfd25bb2..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/dex_commands/source_root_dir.dex
+++ /dev/null
@@ -1,22 +0,0 @@
-## Purpose:
-##    Check that \DexDeclareFile's file declaration can be made relative to the
-##    --source-root-dir path.
-
-# UNSUPPORTED: system-darwin
-
-# RUN: %clang %S/../source/test.cpp -O0 -g -o %t
-# RUN: %dexter_regression_base --binary %t \
-# RUN:   --source-root-dir="%S/../source" -- %s | FileCheck %s
-# RUN: rm %t
-
-# CHECK: source_root_dir.dex: (1.0000)
-
-## ../source/test.cpp
-## 1. int main() {
-## 2.   int result = 0;
-## 3.   return result;
-## 4. }
-
-## test.cpp is found in ../source, which we set as the source-root-dir.
-DexDeclareFile('test.cpp')
-DexExpectWatchValue('result', 0, on_line=3)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/lit.local.cfg.py b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/lit.local.cfg.py
deleted file mode 100644
index 3dfcaa7e8301fe..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/lit.local.cfg.py
+++ /dev/null
@@ -1 +0,0 @@
-config.suffixes = [".dex"]
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/source/test.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/source/test.cpp
deleted file mode 100644
index 4d3cc5846e66fd..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/precompiled_binary_different_dir/source/test.cpp
+++ /dev/null
@@ -1,4 +0,0 @@
-int main() {
-  int result = 0;
-  return result;
-}
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/lit.local.cfg.py b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/lit.local.cfg.py
deleted file mode 100644
index 3dfcaa7e8301fe..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/lit.local.cfg.py
+++ /dev/null
@@ -1 +0,0 @@
-config.suffixes = [".dex"]
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/source/test file.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/source/test file.cpp
deleted file mode 100644
index f6dcd82e93e77f..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/source/test file.cpp	
+++ /dev/null
@@ -1,4 +0,0 @@
-int main(const int argc, const char * argv[]) {
-  int result = argc;
-  return result;
-}
\ No newline at end of file
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/test.cfg b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/test.cfg
deleted file mode 100644
index e69de29bb2d1d6..00000000000000
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/test.dex b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/test.dex
deleted file mode 100644
index ec48bc365441da..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_declare_file/windows_noncanonical_path/test.dex
+++ /dev/null
@@ -1,17 +0,0 @@
-# Purpose:
-#    Check that non-canonical paths resolve correctly on Windows.
-#
-# REQUIRES: system-windows
-#
-# RUN: %dexter_regression_test_build "%S/source/test file.cpp" -o %t
-# RUN: %dexter_regression_base --binary %t %s | FileCheck %s
-# CHECK: test.dex
-#
-# ./source/test file.cpp
-# 1 int main(const int argc, const char * argv[]) {
-# 2 int result = argc;
-# 3 return result;
-# 4 }
-
-DexDeclareFile('./sOuRce\\test filE.cpp')
-DexExpectWatchValue('result', 1, on_line=3)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_conditional.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_conditional.cpp
deleted file mode 100644
index 8138b894af3aa5..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_conditional.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// FIXME: Feature appears to be broken on Windows with dbgeng.
-// XFAIL: system-windows
-// Purpose:
-//      Test that \DexFinishTest can be used with a condition, so the test exits
-//      when the line referenced by \DexFinishTest is stepped on and the given
-//      condition (x == 5) is satisfied.
-//      Tests using the default controller (no \DexLimitSteps).
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: default_conditional.cpp
-
-int main() {
-    for (int x = 0; x < 10; ++x)
-        (void)0; // DexLabel('finish_line')
-}
-
-// DexFinishTest('x', 5, on_line=ref('finish_line'))
-// DexExpectWatchValue('x', 0, 1, 2, 3, 4, 5, on_line=ref('finish_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_conditional_hit_count.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_conditional_hit_count.cpp
deleted file mode 100644
index bbf6fcfd262596..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_conditional_hit_count.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// FIXME: Feature appears to be broken on Windows with dbgeng.
-// XFAIL: system-windows
-// Purpose:
-//      Test that \DexFinishTest can be used with a combination of a hit_count
-//      and a condition, so that the test exits after the line referenced
-//      by \DexFinishTest is stepped on while the condition (x == 2) is true a
-//      given number of times.
-//      Tests using the default controller (no \DexLimitSteps).
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: default_conditional_hit_count.cpp
-
-int main() {
-    for (int y = 0; y < 4; ++y)
-        for (int x = 0; x < 4; ++x)
-            (void)0; // DexLabel('finish_line')
-}
-
-// DexFinishTest('x', 2, on_line=ref('finish_line'), hit_count=2)
-// DexExpectWatchValue('x', 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, on_line=ref('finish_line'))
-// DexExpectWatchValue('y', 0, 1, 2, on_line=ref('finish_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_hit_count.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_hit_count.cpp
deleted file mode 100644
index efcfcff8db9045..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_hit_count.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// Purpose:
-//      Test that \DexFinishTest can be used with a hit_count, so the test exits
-//      after the line referenced by \DexFinishTest has been stepped on a
-//      specific number of times.
-//      Tests using the default controller (no \DexLimitSteps).
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: default_hit_count.cpp
-
-int main() {
-    for (int x = 0; x < 10; ++x)
-        (void)0; // DexLabel('finish_line')
-}
-
-// DexFinishTest(on_line=ref('finish_line'), hit_count=5)
-// DexExpectWatchValue('x', 0, 1, 2, 3, 4, 5, on_line=ref('finish_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_simple.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_simple.cpp
deleted file mode 100644
index 3e3edbf66ff2af..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/default_simple.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// Purpose:
-//      Test that \DexFinishTest can be used without a condition or hit_count,
-//      so the test simply exits as soon as the line referenced by \DexFinishTest
-//      is stepped on.
-//      Tests using the default controller (no \DexLimitSteps).
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: default_simple.cpp
-
-int main() {
-    int x = 0;
-    x = 1; // DexLabel('start_line')
-    x = 2; // DexLabel('finish_line')
-}
-
-// DexFinishTest(on_line=ref('finish_line'))
-// DexExpectWatchValue('x', 0, 1, from_line=ref('start_line'), to_line=ref('finish_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_conditional.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_conditional.cpp
deleted file mode 100644
index 0473edee1dcd1f..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_conditional.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// Purpose:
-//      Test that \DexFinishTest can be used with a condition, so the test exits
-//      when the line referenced by \DexFinishTest is stepped on and the given
-//      condition (x == 5) is satisfied.
-//      Test using the conditional controller (using \DexLimitSteps).
-//
-// The dbgeng driver doesn't support \DexLimitSteps yet.
-// UNSUPPORTED: system-windows
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: limit_steps_conditional.cpp
-
-int main() {
-    for (int x = 0; x < 10; ++x)
-        (void)0; // DexLabel('finish_line')
-}
-
-// DexLimitSteps(on_line=ref('finish_line'))
-// DexFinishTest('x', 5, on_line=ref('finish_line'))
-// DexExpectWatchValue('x', 0, 1, 2, 3, 4, 5)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_conditional_hit_count.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_conditional_hit_count.cpp
deleted file mode 100644
index 2869b70c46c1e9..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_conditional_hit_count.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// Purpose:
-//      Test that \DexFinishTest can be used with a combination of a hit_count
-//      and a condition, so that the test exits after the line referenced
-//      by \DexFinishTest is stepped on while the condition (x == 2) is true a
-//      given number of times.
-//      Test using the conditional controller (using \DexLimitSteps).
-//
-// The dbgeng driver doesn't support \DexLimitSteps yet.
-// UNSUPPORTED: system-windows
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: limit_steps_conditional_hit_count.cpp
-
-int main() {
-    for (int y = 0; y < 4; ++y)
-        for (int x = 0; x < 4; ++x)
-            (void)0; // DexLabel('finish_line')
-}
-
-// DexLimitSteps(on_line=ref('finish_line'))
-// DexFinishTest('x', 2, on_line=ref('finish_line'), hit_count=2)
-// DexExpectWatchValue('x', 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, on_line=ref('finish_line'))
-// DexExpectWatchValue('y', 0, 1, 2, on_line=ref('finish_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_hit_count.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_hit_count.cpp
deleted file mode 100644
index 5928d43a9b258a..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_hit_count.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// Purpose:
-//      Test that \DexFinishTest can be used with a hit_count, so the test exits
-//      after the line referenced by \DexFinishTest has been stepped on a
-//      specific number of times.
-//      Test using the conditional controller (using \DexLimitSteps).
-//
-// The dbgeng driver doesn't support \DexLimitSteps yet.
-// UNSUPPORTED: system-windows
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: limit_steps_hit_count.cpp
-
-int main() {
-    for (int x = 0; x < 10; ++x)
-        (void)0; // DexLabel('finish_line')
-}
-
-// DexLimitSteps(on_line=ref('finish_line'))
-// DexFinishTest(on_line=ref('finish_line'), hit_count=5)
-// DexExpectWatchValue('x', 0, 1, 2, 3, 4, 5)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_simple.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_simple.cpp
deleted file mode 100644
index b3d61c500156e8..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/dex_finish_test/limit_steps_simple.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// Purpose:
-//      Test that \DexFinishTest can be used without a condition or hit_count,
-//      so the test simply exits as soon as the line referenced by \DexFinishTest
-//      is stepped on.
-//      Test using the conditional controller (using \DexLimitSteps).
-//
-// The dbgeng driver doesn't support \DexLimitSteps yet.
-// UNSUPPORTED: system-windows, system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: limit_steps_simple.cpp
-
-int main() {
-    int x = 0; // DexLabel('start')
-    x = 1;
-    x = 2; // DexLabel('finish_line')
-} // DexLabel('finish')
-
-// DexLimitSteps(from_line=ref('start'), to_line=ref('finish'))
-// DexFinishTest(on_line=ref('finish_line'))
-// DexExpectWatchValue('x', 0, 1)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_program_state.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_program_state.cpp
deleted file mode 100644
index 6f822f7451eb91..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_program_state.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// Purpose:
-//      Check that \DexExpectWatchValue applies no penalties when expected
-//      program states are found.
-//
-// UNSUPPORTED: system-darwin
-//
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: expect_program_state.cpp:
-
-int GCD(int lhs, int rhs)
-{
-    if (rhs == 0)
-        return lhs; // DexLabel('check')
-    return GCD(rhs, lhs % rhs);
-}
-
-int main()
-{
-    return GCD(111, 259);
-}
-
-/*
-DexExpectProgramState({
-    'frames': [
-        {
-            'location': {
-                'lineno': ref('check')
-            },
-            'watches': {
-                'lhs': '37', 'rhs': '0'
-            }
-        },
-        {
-            'watches': {
-                'lhs': {'value': '111'}, 'rhs': {'value': '37'}
-            }
-        },
-        {
-            'watches': {
-                'lhs': {'value': '259'}, 'rhs': {'value': '111'}
-            }
-        },
-        {
-            'watches': {
-                'lhs': {'value': '111'}, 'rhs': {'value': '259'}
-            }
-        }
-    ]
-})
-*/
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/direction.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/direction.cpp
deleted file mode 100644
index 5d8f45eb66ea00..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/direction.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// Purpose:
-//      Check that \DexExpectStepKind correctly counts 'VERTICAL_BACKWARD' steps
-//      for a trivial test. Expect one 'VERTICAL_BACKWARD' for every step onto
-//      a lesser source line number in the same function. Expect one
-//      'VERTICAL_FORWARD' for every step onto a greater source line number in
-//      the same function.
-//
-// UNSUPPORTED: system-darwin
-//
-// TODO: The dbgeng debugger does not support column step reporting at present.
-// XFAIL: system-windows
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: direction.cpp:
-
-int func(int i) {
-    return i; // step 7, 9, 11
-}
-
-int main()
-{
-    for (int i = 0; i < 2; ++i) { // step 1: FUNC, step 3, 5: VERTICAL_BACKWARD
-        i = i;                    // step 2, 4: VERTICAL_FORWARD
-    }
-    // ---------1           - step 6: VERTICAL_FORWARD
-    // ---------|---------2 - step 8: HORIZONTAL_FORWARD
-    // ----3----|---------| - step 10: HORIZONTAL_BACKWARD
-    return func(func(0) + func(1));
-}
-
-// DexExpectStepKind('VERTICAL_BACKWARD', 2)
-// DexExpectStepKind('VERTICAL_FORWARD', 3)
-// DexExpectStepKind('HORIZONTAL_FORWARD', 1)
-// DexExpectStepKind('HORIZONTAL_BACKWARD', 1)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/func.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/func.cpp
deleted file mode 100644
index 2126bd8776dd3d..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/func.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// Purpose:
-//      Check that \DexExpectStepKind correctly counts 'FUNC' steps for a
-//      trivial test. Expect one 'FUNC' per call to a function which is defined
-//      in one of the source files in the test directory.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: func.cpp:
-
-int func(int i) {
-    return i;
-}
-
-int main()
-{
-    func(0);
-    func(1);
-    return 0;
-}
-
-// main, func, func
-// DexExpectStepKind('FUNC', 3)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/func_external.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/func_external.cpp
deleted file mode 100644
index 41e7695cbdffd0..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/func_external.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-// Purpose:
-//      Check that \DexExpectStepKind correctly counts 'FUNC_EXTERNAL' steps
-//      for a trivial test. Expect one 'FUNC_EXTERNAL' per external call.
-//
-// UNSUPPORTED: system-darwin
-//
-// XFAIL:*
-// This fails right now on my linux and windows machine, needs examining as to
-// why.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: func_external.cpp:
-
-#include <cstdlib>
-
-int func(int i){
-    return abs(i);
-}
-
-int main()
-{
-    func(0);
-    func(1);
-    return 0;
-}
-
-// DexExpectStepKind('FUNC_EXTERNAL', 2)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/recursive.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/recursive.cpp
deleted file mode 100644
index 432b35181d899f..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/recursive.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// Purpose:
-//      Check that \DexExpectStepKind correctly handles recursive calls.
-//      Specifically, ensure recursive calls count towards 'FUNC' and not
-//      'VERTICAL_BACKWARD'.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: recursive.cpp:
-
-int func(int i) {
-    if (i > 1)
-        return i + func(i - 1);
-    return i;
-}
-
-int main()
-{
-    return func(3);
-}
-
-// main, func, func, func
-// DexExpectStepKind('FUNC', 4)
-// DexExpectStepKind('VERTICAL_BACKWARD', 0)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/small_loop.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/small_loop.cpp
deleted file mode 100644
index d47058e67584e0..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_kind/small_loop.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// Purpose:
-//      Check that \DexExpectStepKind correctly counts function calls in loops
-//      where the last source line in the loop is a call. Expect steps out
-//      of a function to a line before the call to count as 'VERTICAL_BACKWARD'.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: small_loop.cpp:
-
-int func(int i){
-    return i;
-}
-
-int main()
-{
-    for (int i = 0; i < 2; ++i) {
-        func(i);
-    }
-    return 0;
-}
-
-// DexExpectStepKind('VERTICAL_BACKWARD', 2)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_order.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_order.cpp
deleted file mode 100644
index 48735911d92d13..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_step_order.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// Purpose:
-//      Check that \DexExpectStepOrder applies no penalty when the expected
-//      order is found.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: expect_step_order.cpp:
-
-int main() // DexLabel('main')
-{
-  volatile int a = 1; // DexExpectStepOrder(1)
-  volatile int b = 1; // DexExpectStepOrder(2)
-  volatile int c = 1; // DexExpectStepOrder(3)
-
-  volatile int x = 1;
-  volatile int y = 1;
-  volatile int z = 1;
-  return 0;
-}
-
-// DexExpectStepOrder(4, on_line=ref('main')+6);
-// DexExpectStepOrder(5, on_line=ref('main')+7);
-// DexExpectStepOrder(6, on_line=ref('main')+8);
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_watch_type.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_watch_type.cpp
deleted file mode 100644
index d59f7206cc9b50..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_watch_type.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-// Purpose:
-//      Check that \DexExpectWatchType applies no penalties when expected
-//      types are found.
-//
-// UNSUPPORTED: system-darwin
-//
-// TODO: On Windows WITH dbgeng, This test takes a long time to run and doesn't evaluate type values
-// in the same manner as LLDB.
-// XFAIL: system-windows
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: expect_watch_type.cpp:
-
-template<class T>
-class Doubled {
-public:
-  Doubled(const T & to_double)
-    : m_member(to_double * 2) {}
-
-  T GetVal() {
-    T to_return = m_member; // DexLabel('gv_start')
-    return to_return;       // DexLabel('gv_end')
-  }
-
-  static T static_doubler(const T & to_double) {
-    T result = 0;           // DexLabel('sd_start')
-    result = to_double * 2;
-    return result;          // DexLabel('sd_end')
-  }
-
-private:
-  T m_member;
-};
-
-int main() {
-  auto myInt = Doubled<int>(5); // DexLabel('main_start')
-  auto myDouble = Doubled<double>(5.5);
-  auto staticallyDoubledInt = Doubled<int>::static_doubler(5);
-  auto staticallyDoubledDouble = Doubled<double>::static_doubler(5.5);
-  return int(double(myInt.GetVal())
-         + double(staticallyDoubledInt)
-         + myDouble.GetVal()
-         + staticallyDoubledDouble); // DexLabel('main_end')
-}
-
-// DexExpectWatchType('m_member', 'int', 'double', from_line=ref('gv_start'), to_line=ref('gv_end'))
-
-// DexExpectWatchType('to_double', 'const int &', 'const double &', from_line=ref('sd_start'), to_line=ref('sd_end'))
-
-// DexExpectWatchType('myInt', 'Doubled<int>', from_line=ref('main_start'), to_line=ref('main_end'))
-// DexExpectWatchType('myDouble', 'Doubled<double>', from_line=ref('main_start'), to_line=ref('main_end'))
-// DexExpectWatchType('staticallyDoubledInt', 'int', from_line=ref('main_start'), to_line=ref('main_end'))
-// DexExpectWatchType('staticallyDoubledDouble', 'double', from_line=ref('main_start'), to_line=ref('main_end'))
-
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_watch_value.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_watch_value.cpp
deleted file mode 100644
index 9286a2c704d5c7..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/expect_watch_value.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// Purpose:
-//      Check that \DexExpectWatchValue applies no penalties when expected
-//      values are found.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: expect_watch_value.cpp:
-
-unsigned long Factorial(int n) {
-    volatile unsigned long fac = 1; // DexLabel('entry')
-
-    for (int i = 1; i <= n; ++i)
-        fac *= i;                   // DexLabel('loop')
-
-    return fac;                     // DexLabel('ret')
-}
-
-int main()
-{
-    return Factorial(8);
-}
-
-/*
-DexExpectWatchValue('n', '8', on_line=ref('entry'))
-DexExpectWatchValue('i',
-                    '1', '2', '3', '4', '5', '6', '7', '8',
-                    on_line=ref('loop'))
-
-DexExpectWatchValue('fac',
-                    '1', '2', '6', '24', '120', '720', '5040',
-                     on_line=ref('loop'))
-
-DexExpectWatchValue('n', '8', on_line=ref('loop'))
-DexExpectWatchValue('fac', '40320', on_line=ref('ret'))
-DexExpectWatchValue('n', '8', on_line=ref('ret'))
-*/
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_multiple.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_multiple.cpp
deleted file mode 100644
index 46610b2cab6d4a..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_multiple.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// Purpose:
-//      Check that \DexExpectWatchValue float_range=0.5 considers a range
-//      difference of 0.49999 to be an expected watch value for multple values.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: float_range_multiple.cpp:
-
-int main() {
-  float a = 1.0f;
-  float b = 100.f;
-  a = a + 0.4999f;
-  a = a + b; // DexLabel('check1')
-  return a;  //DexLabel('check2')
-}
-
-// DexExpectWatchValue('a', '1.0', '101.0', from_line=ref('check1'), to_line=ref('check2'), float_range=0.5)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_no_arg.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_no_arg.cpp
deleted file mode 100644
index 320a400d9264ea..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_no_arg.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// Purpose:
-//      Check that omitted float_range from \DexExpectWatchValue turns off
-//      the floating point range evalution and defaults back to
-//      pre-float evalution.
-//
-// Since this test involves string comparison to the debugger output, it cannot
-// work for both dbgeng and lldb, which output floats differently.
-// UNSUPPORTED: system-darwin, system-windows
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: float_range_no_arg.cpp:
-
-int main() {
-  float a = 1.0f;
-  return a;  //DexLabel('check')
-}
-
-// DexExpectWatchValue('a', '1', on_line=ref('check'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_small.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_small.cpp
deleted file mode 100644
index 8034a3702636c8..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_small.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// Purpose:
-//      Check that \DexExpectWatchValue float_range=0.5 considers a range
-//      difference of 0.49999 to be an expected watch value.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: float_range_small.cpp:
-
-int main() {
-  float a = 1.0f;
-  a = a - 0.49999f;
-  return a; //DexLabel('check')
-}
-
-// DexExpectWatchValue('a', '1.0', on_line=ref('check'), float_range=0.5)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_zero_match.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_zero_match.cpp
deleted file mode 100644
index 0d55ab4405b6eb..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/float_range_watch/float_range_zero_match.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// Purpose:
-//      Check that \DexExpectWatchValue float_range=0.0 matches exact values.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: float_range_zero_match.cpp:
-
-int main() {
-  float a = 1.0f;
-  return a; //DexLabel('check')
-}
-
-// DexExpectWatchValue('a', '1.0000000', on_line=ref('check'), float_range=0.0)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/hit_count.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/hit_count.cpp
deleted file mode 100644
index 50cc3e21a85b72..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/hit_count.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// Purpose:
-//      Test that \DexLimitSteps keyword argument hit_count correctly limits
-//      the number of times the command can trigger.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: hit_count.cpp
-
-int a;
-int main() {
-  for (int i = 0; i < 4; i++) {
-    a = i; // DexLabel('check')
-  }
-  return 0;
-}
-
-//// Unconditionally limit dexter's view of the program to 'on_line' and check
-//// for i=0, i=1. The test will fail if dexter sees any other value for test.
-// DexLimitSteps(hit_count=2, on_line=ref('check'))
-// DexExpectWatchValue('i', '0', '1')
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_check_json_step_count.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_check_json_step_count.cpp
deleted file mode 100644
index a89d3167447814..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_check_json_step_count.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// Purpose:
-//      Check number of step lines are correctly reported in json output.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t --verbose -- %s | FileCheck %s
-// CHECK: limit_steps_check_json_step_count.cpp
-// CHECK: ## BEGIN ##
-// CHECK-COUNT-3: json_step_count.cpp",
-
-int main() {
-  int result = 0;
-  for(int ix = 0; ix != 10; ++ix) {
-    int index = ix;
-    result += index; // DexLabel('check')
-  }
-}
-
-// DexExpectWatchValue('index', 2, 7, 9, on_line=ref('check'))
-// DexLimitSteps('ix', 2, 7, 9, on_line=ref('check'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_expect_loop.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_expect_loop.cpp
deleted file mode 100644
index b60c5cafb8fb8b..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_expect_loop.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// Purpose:
-//      Check the DexLimit steps only gathers step info for 2 iterations of a
-//      for loop.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: limit_steps_expect_loop.cpp:
-
-int main(const int argc, const char * argv[]) {
-  unsigned int sum = 1;
-  for(unsigned int ix = 0; ix != 5; ++ix) {
-    unsigned thing_to_add = ix + ix - ix;   // DexLabel('start')
-    sum += ix;                              // DexLabel('end')
-  }
-  return sum;
-}
-
-// DexLimitSteps('ix', 0, 3, from_line=ref('start'), to_line=ref('end'))
-// DexExpectWatchValue('ix', 0, 3, from_line=ref('start'), to_line=ref('end'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_expect_value.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_expect_value.cpp
deleted file mode 100644
index 76c6be665aaaf1..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_expect_value.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// Purpose:
-//      Ensure that limited stepping breaks for all expected values.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: limit_steps_expect_value.cpp
-
-int main() {
-  int i = 0;
-  i = 1;    // DexLabel('from')
-  i = 2;
-  i = 3;
-  return 0; // DexLabel('long_range')
-}
-
-// DexLimitSteps('i', '0', from_line=ref('from'), to_line=ref('long_range'))
-// DexExpectWatchValue('i', 0, 1, 2, 3, from_line=ref('from'), to_line=ref('long_range'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_line_mismatch.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_line_mismatch.cpp
deleted file mode 100644
index 863782a5948b8a..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_line_mismatch.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// Purpose:
-//      Check that \DexLimitSteps works even if the opening breakpoint line
-//      doesn't exist. This can happen due to optimisations or label is on an
-//      empty line.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: limit_steps_line_mismatch.cpp
-
-int main() {
-  int i = 0;
-  for (; i < 2; i++) {
-    // DexLabel('from')
-    int x = i;
-  }
-  int ret = 0;
-  return ret; // DexLabel('to')
-}
-
-// DexLimitSteps('1', '1', from_line=ref('from'), to_line=ref('to'))
-// DexExpectWatchValue('i', 0, 1, 2, from_line=ref('from'), to_line=ref('to'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_overlapping_ranges.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_overlapping_ranges.cpp
deleted file mode 100644
index a250e5377f3c84..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_overlapping_ranges.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// Purpose:
-//      Ensure that multiple overlapping \DexLimitSteps ranges do not interfere.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: limit_steps_overlapping_ranges.cpp
-
-int main() {
-  int val1;
-  int val2;
-  int placeholder;
-  for (int ix = 0; ix != 10; ++ix) {
-    placeholder=val1+val2;   // DexLabel('from')
-    if (ix == 0) {
-      val1 = ix;
-      val2 = ix;             // DexLabel('val1_check')
-      placeholder=val1+val2; // DexLabel('val1_check_to')
-    }
-    else if (ix == 2) {
-      val2 = ix;
-      val1 = ix;             // DexLabel('val2_check')
-      placeholder=val1+val2; // DexLabel('val2_check_to')
-    }
-    placeholder=val1+val2;   // DexLabel('to')
-  }
-  return val1 + val2;
-}
-
-// DexExpectWatchValue('ix', 0, 2, 5, from_line=ref('from'), to_line=ref('to'))
-// DexExpectWatchValue('val1', 0, from_line=ref('val1_check'), to_line=ref('val1_check_to'))
-// DexExpectWatchValue('val2', 2, from_line=ref('val2_check'), to_line=ref('val2_check_to'))
-
-// DexLimitSteps('ix', 5, from_line=ref('from'), to_line=ref('to'))
-// DexLimitSteps('val1', 0, from_line=ref('val1_check'), to_line=ref('val1_check_to'))
-// DexLimitSteps('val2', 2, from_line=ref('val2_check'), to_line=ref('val2_check_to'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_same_line_conditional.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_same_line_conditional.cpp
deleted file mode 100644
index bc1a690111c0e7..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/limit_steps_same_line_conditional.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// Purpose:
-//      Test that LimitStep commands can exist on the same from line.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: limit_steps_same_line_conditional.cpp
-
-int main() {
-  int val1 = 0;
-
-  int placeholder;
-  for(int ix = 0; ix != 4; ++ix) {
-    val1 = ix;
-    placeholder = ix;    // DexLabel('from')
-    placeholder = ix;
-    val1 += 2;           // DexLabel('to')
-    placeholder = ix;    // DexLabel('extended_to')
-  }
-  return val1 + placeholder;
-}
-
-// DexExpectWatchValue('val1', 0, 1, 3, from_line=ref('from'), to_line=ref('extended_to'))
-
-// DexLimitSteps('ix', 0, from_line=ref('from'), to_line=ref('to'))
-// DexLimitSteps('ix', 1, from_line=ref('from'), to_line=ref('extended_to'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/lit.local.cfg b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/lit.local.cfg
deleted file mode 100644
index b6cc2f73f8baf0..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/lit.local.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-# The dbgeng driver doesn't support DexLimitSteps yet.
-if config.is_msvc:
-    config.unsupported = True
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/unconditional.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/unconditional.cpp
deleted file mode 100644
index d7bf8ca4097ff0..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/limit_steps/unconditional.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// Purpose:
-//      Test that \DexLimitSteps can be used without a condition (i.e. the
-//      breakpoint range is set any time from_line is stepped on).
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: unconditional.cpp
-
-int glob;
-int main() {
-  int test = 0;
-  for (test = 1; test < 4; test++) {
-    glob += test; // DexLabel('from')
-    glob += test; // DexLabel('to')
-  }
-  return test; // test = 4
-}
-
-// DexLimitSteps(from_line=ref('from'), to_line=ref('to'))
-//// Unconditionally limit dexter's view of the program from line 'from' to
-//// 'to'. Check for test=0, 1, 2 so that the test will fail if dexter sees
-//// test=0 or test=4.
-// DexExpectWatchValue('test', 1, 2, 3)
-
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/unreachable.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/unreachable.cpp
deleted file mode 100644
index 5e754c0cf5cabe..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/unreachable.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// Purpose:
-//    Check that \DexUnreachable has no effect if the command line is never
-//    stepped on.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: unreachable.cpp:
-
-int main()
-{
-  return 0;
-  return 1; // DexUnreachable()
-}
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/unreachable_not_cmd_lineno.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/unreachable_not_cmd_lineno.cpp
deleted file mode 100644
index cd98561d2a63a3..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/unreachable_not_cmd_lineno.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// Purpose:
-//    Check that \DexUnreachable doesn't trigger on the line it's specified
-//    on, if it has a specifier indicating which lines should be unreachable.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: unreachable_not_cmd_lineno.cpp:
-
-int main(int argc, char **argv)
-{
-  if (argc != 1)
-    return 1; // DexLabel('this_one')
-  else
-    return 0; // DexUnreachable(on_line=ref('this_one')) DexUnreachable(from_line=ref('this_one'), to_line=ref('this_one'))
-}
-
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/unreachable_on_line.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/unreachable_on_line.cpp
deleted file mode 100644
index a59b8b2802f6a2..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/commands/perfect/unreachable_on_line.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// Purpose:
-//    Check that \DexUnreachable has no effect if the command line is never
-//    stepped on.
-//
-// UNSUPPORTED: system-darwin
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: unreachable_on_line.cpp:
-
-int main()
-{
-  return 0;
-  return 1; // DexLabel('this_one')
-}
-
-
-// DexUnreachable(on_line=ref('this_one'))
-// DexUnreachable(from_line=ref('this_one'), to_line=ref('this_one'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/lit.local.cfg b/cross-project-tests/debuginfo-tests/dexter/feature_tests/lit.local.cfg
deleted file mode 100644
index 16b96905467022..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/lit.local.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-if "dexter" not in config.available_features:
-    config.unsupported = True
-
-config.name = "DExTer feature tests"
-config.suffixes = [".cpp", ".c", ".test"]
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/help/help.test b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/help/help.test
deleted file mode 100644
index 90119a1d74db7c..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/help/help.test
+++ /dev/null
@@ -1,9 +0,0 @@
-Purpose:
-    Check the `help` subtool runs.
-
-RUN: %dexter_base help | FileCheck %s
-CHECK: The following subtools are available:
-CHECK: help
-CHECK: list-debuggers
-CHECK: test
-CHECK: view
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/list-debuggers/list-debuggers.test b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/list-debuggers/list-debuggers.test
deleted file mode 100644
index 2bce540ced1813..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/list-debuggers/list-debuggers.test
+++ /dev/null
@@ -1,9 +0,0 @@
-Purpose:
-    Check the `list-debuggers` subtool runs.
-
-RUN: %dexter_base list-debuggers | FileCheck %s
-CHECK: lldb
-CHECK: vs2015
-CHECK: vs2017
-CHECK: vs2019
-CHECK: vs2022
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/address_printing.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/address_printing.cpp
deleted file mode 100644
index cdde3285111964..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/address_printing.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// Purpose:
-//      Test that address values in a \DexExpectWatchValue are printed with
-//      their address name along with the address' resolved value (if any), and
-//      that when verbose output is enabled the complete map of resolved
-//      addresses and list of unresolved addresses will also be printed.
-//
-//      Note: Currently "misordered result" is the only penalty that does not
-//      display the address properly; if it is implemented, this test should be
-//      updated.
-//
-// The dbgeng driver doesn't support \DexLimitSteps yet.
-// UNSUPPORTED: system-windows
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s
-
-// CHECK: Resolved Addresses:
-// CHECK-NEXT: 'x_2': 0x[[X2_VAL:[0-9a-f]+]]
-// CHECK-NEXT: 'y': 0x[[Y_VAL:[0-9a-f]+]]
-// CHECK: Unresolved Addresses:
-// CHECK-NEXT: ['x_1']
-
-// CHECK-LABEL: [x] ExpectValue
-// CHECK: expected encountered watches:
-// CHECK-NEXT: address 'x_2' (0x[[X2_VAL]])
-// CHECK: missing values:
-// CHECK-NEXT: address 'x_1'
-
-// CHECK-LABEL: [z] ExpectValue
-// CHECK: expected encountered watches:
-// CHECK-NEXT: address 'x_2' (0x[[X2_VAL]])
-// CHECK-NEXT: address 'y' (0x[[Y_VAL]])
-// CHECK: misordered result:
-// CHECK-NEXT: (0x[[Y_VAL]]): step 4
-// CHECK-NEXT: (0x[[X2_VAL]]): step 5
-
-int main() {
-    int *x = new int(5);
-    int *y = new int(4);
-    if (false) {
-        (void)0; // DexLabel('unreachable')
-    }
-    int *z = y;
-    z = x; // DexLabel('start_line')
-    delete y;
-    delete x; // DexLabel('end_line')
-}
-
-// DexDeclareAddress('x_1', 'x', on_line=ref('unreachable'))
-// DexDeclareAddress('x_2', 'x', on_line=ref('end_line'))
-// DexDeclareAddress('y', 'y', on_line=ref('start_line'))
-// DexExpectWatchValue('x', address('x_1'), address('x_2'), from_line=ref('start_line'), to_line=ref('end_line'))
-// DexExpectWatchValue('z', address('x_2'), address('y'), from_line=ref('start_line'), to_line=ref('end_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_bad_label_ref.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_bad_label_ref.cpp
deleted file mode 100644
index e1a2791e50c13b..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_bad_label_ref.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// Purpose:
-//      Check that referencing an undefined label gives a useful error message.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s --match-full-lines
-//
-// CHECK: parser error:{{.*}}err_bad_label_ref.cpp(15): Unresolved label: 'label_does_not_exist'
-// CHECK-NEXT: {{Dex}}ExpectWatchValue('result', '0', on_line=ref('label_does_not_exist'))
-
-int main() {
-    int result = 0;
-    return result;
-}
-
-// DexExpectWatchValue('result', '0', on_line=ref('label_does_not_exist'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_address.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_address.cpp
deleted file mode 100644
index 2120550bb81fff..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_address.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// Purpose:
-//      Check that declaring duplicate addresses gives a useful error message.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s --match-full-lines
-
-
-int main() {
-    int *result = new int(0);
-    delete result; // DexLabel('test_line')
-}
-
-// CHECK: parser error:{{.*}}err_duplicate_address.cpp([[# @LINE + 4]]): Found duplicate address: 'oops'
-// CHECK-NEXT: {{Dex}}DeclareAddress('oops', 'result', on_line=ref('test_line'))
-
-// DexDeclareAddress('oops', 'result', on_line=ref('test_line'))
-// DexDeclareAddress('oops', 'result', on_line=ref('test_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_label.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_label.cpp
deleted file mode 100644
index d8cef2be3322b4..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_label.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-// Purpose:
-//      Check that defining duplicate labels gives a useful error message.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s --match-full-lines
-//
-// CHECK: parser error:{{.*}}err_duplicate_label.cpp(12): Found duplicate line label: 'oops'
-// CHECK-NEXT: {{Dex}}Label('oops')
-
-int main() {
-    int result = 0; // DexLabel('oops')
-    return result;  // DexLabel('oops')
-}
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_label_kwarg.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_label_kwarg.cpp
deleted file mode 100644
index b0bd50a248d120..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_label_kwarg.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-// Purpose:
-//    Check that bad keyword args in \DexLabel are reported.
-//    Use --binary switch to trick dexter into skipping the build step.
-//
-// RUN: not %dexter_base test --binary %s --debugger 'lldb' -- %s | FileCheck %s
-// CHECK: parser error:{{.*}}err_label_kwarg.cpp(8): unexpected named args: bad_arg
-
-// DexLabel('test', bad_arg=0)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_limit_steps_no_values.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_limit_steps_no_values.cpp
deleted file mode 100644
index 64e41495ece107..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_limit_steps_no_values.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// Purpose:
-//    Check that specifying an expression without any values to compare against
-//    in a \DexLimitSteps command results in a useful error message.
-//    Use --binary switch to trick dexter into skipping the build step.
-//
-// RUN: not %dexter_base test --binary %s --debugger 'lldb' -- %s | FileCheck %s
-// CHECK: parser error:{{.*}}err_limit_steps_no_values.cpp(9): expected 0 or at least 2 positional arguments
-
-// DexLimitSteps('test')
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren.cpp
deleted file mode 100644
index bac1baec259da6..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// Purpose:
-//      Check that parsing bad commands gives a useful error.
-//          - Unbalanced parenthesis
-//      Check directives are in check.txt to prevent dexter reading any embedded
-//      commands.
-//
-// Note: Despite using 'lldb' as the debugger, lldb is not actually required
-//       as the test should finish before lldb would be invoked.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_base test --binary %t --debugger 'lldb' \
-// RUN:     -v -- %s | FileCheck %s --match-full-lines --strict-whitespace
-//
-// CHECK:parser error:{{.*}}err_paren.cpp(22): Unbalanced parenthesis starting here
-// CHECK:// {{Dex}}ExpectWatchValue(
-// CHECK:                      ^
-
-int main(){
-    return 0;
-}
-
-// DexExpectWatchValue(
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren_mline.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren_mline.cpp
deleted file mode 100644
index d48d0a0fcc3bd0..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_paren_mline.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// Purpose:
-//      Check that parsing bad commands gives a useful error.
-//          - Unbalanced parenthesis over multiple lines
-//      Check directives are in check.txt to prevent dexter reading any embedded
-//      commands.
-//
-// Note: Despite using 'lldb' as the debugger, lldb is not actually required
-//       as the test should finish before lldb would be invoked.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_base test --binary %t --debugger "lldb" \
-// RUN:     -v -- %s | FileCheck %s --match-full-lines --strict-whitespace
-//
-// CHECK:parser error:{{.*}}err_paren_mline.cpp(23): Unbalanced parenthesis starting here
-// CHECK:{{Dex}}ExpectWatchValue(
-// CHECK:                   ^
-
-int main(){
-    return 0;
-}
-
-/*
-DexExpectWatchValue(
-    1
-*/
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_syntax.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_syntax.cpp
deleted file mode 100644
index 732baef66701aa..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_syntax.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// Purpose:
-//      Check that parsing bad commands gives a useful error.
-//          - Syntax error (misplaced ',')
-//      Check directives are in check.txt to prevent dexter reading any embedded
-//      commands.
-//
-// Note: Despite using 'lldb' as the debugger, lldb is not actually required
-//       as the test should finish before lldb would be invoked.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_base test --binary %t --debugger "lldb" \
-// RUN:     -v -- %s | FileCheck %s --match-full-lines --strict-whitespace
-//
-// CHECK:parser error:{{.*}}err_syntax.cpp(21): invalid syntax
-// CHECK:// {{Dex}}ExpectWatchValue(,'a', 3, 3, 3, 3, on_line=0)
-// CHECK:                       ^
-
-int main(){
-    return 0;
-}
-// DexExpectWatchValue(,'a', 3, 3, 3, 3, on_line=0)
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_syntax_dexdeclarefile.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_syntax_dexdeclarefile.cpp
deleted file mode 100644
index e3f08af204e766..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_syntax_dexdeclarefile.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// Purpose:
-//      Check that Dexter command syntax errors associate with the line and file
-//      they appeared in rather than the current declared file.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_base test --binary %t --debugger 'lldb' -v -- %s \
-// RUN:     | FileCheck %s --implicit-check-not=FAIL-FILENAME-MATCH
-
-// CHECK: err_syntax_dexdeclarefile.cpp(14): Undeclared address: 'not_been_declared'
-
-int main() { return 0; }
-
-// DexDeclareFile('FAIL-FILENAME-MATCH')
-// DexExpectWatchValue('example', address('not_been_declared'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_syntax_mline.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_syntax_mline.cpp
deleted file mode 100644
index 3ede5e90caaf8e..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_syntax_mline.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// Purpose:
-//      Check that parsing bad commands gives a useful error.
-//          - Syntax error (misplaced ',') over multiple lines
-//      Check directives are in check.txt to prevent dexter reading any embedded
-//      commands.
-//
-// Note: Despite using 'lldb' as the debugger, lldb is not actually required
-//       as the test should finish before lldb would be invoked.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_base test --binary %t --debugger "lldb" \
-// RUN:     -v -- %s | FileCheck %s --match-full-lines --strict-whitespace
-//
-// CHECK:parser error:{{.*}}err_syntax_mline.cpp(24): invalid syntax
-// CHECK:    ,'a', 3, 3, 3, 3, on_line=0)
-// CHECK:    ^
-
-int main(){
-    return 0;
-}
-
-/*
-DexExpectWatchValue(
-    ,'a', 3, 3, 3, 3, on_line=0)
-*/
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_type.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_type.cpp
deleted file mode 100644
index 01c19330a4f520..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_type.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// Purpose:
-//      Check that parsing bad commands gives a useful error.
-//          - Type error (missing args)
-//      Check directives are in check.txt to prevent dexter reading any embedded
-//      commands.
-//
-// Note: Despite using 'lldb' as the debugger, lldb is not actually required
-//       as the test should finish before lldb would be invoked.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_base test --binary %t --debugger "lldb" \
-// RUN:     -v -- %s | FileCheck %s --match-full-lines --strict-whitespace
-//
-// CHECK:parser error:{{.*}}err_type.cpp(21): expected at least two args
-// CHECK:// {{Dex}}ExpectWatchValue()
-// CHECK:                      ^
-
-int main(){
-    return 0;
-}
-// DexExpectWatchValue()
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_type_mline.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_type_mline.cpp
deleted file mode 100644
index 38a163152007f1..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_type_mline.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// Purpose:
-//      Check that parsing bad commands gives a useful error.
-//          - Type error (missing args) over multple lines
-//      Check directives are in check.txt to prevent dexter reading any embedded
-//      commands.
-//
-// Note: Despite using 'lldb' as the debugger, lldb is not actually required
-//       as the test should finish before lldb would be invoked.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_base test --binary %t --debugger "lldb" \
-// RUN:     -v -- %s | FileCheck %s --match-full-lines --strict-whitespace
-//
-// CHECK:parser error:{{.*}}err_type_mline.cpp(22): expected at least two args
-// CHECK:{{Dex}}ExpectWatchValue(
-// CHECK:                   ^
-
-int main(){
-    return 0;
-}
-/*
-DexExpectWatchValue(
-    'a'
-)
-*/
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_undeclared_addr.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_undeclared_addr.cpp
deleted file mode 100644
index 7939c9ac98a3a2..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_undeclared_addr.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-// Purpose:
-//      Check that using an undeclared address gives a useful error message.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: not %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s --match-full-lines
-
-
-int main() {
-    int *result = new int(0);
-    delete result; // DexLabel('test_line')
-}
-
-
-// CHECK: parser error:{{.*}}err_undeclared_addr.cpp([[# @LINE + 3]]): Undeclared address: 'result'
-// CHECK-NEXT: {{Dex}}ExpectWatchValue('result', address('result'), on_line=ref('test_line'))
-
-// DexExpectWatchValue('result', address('result'), on_line=ref('test_line'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/label_another_line.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/label_another_line.cpp
deleted file mode 100644
index 0d2fc0b8821e8f..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/label_another_line.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// Purpose:
-//    Check that the optional keyword argument 'on_line' makes a \DexLabel label
-//    that line instead of the line the command is found on.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -- %s | FileCheck %s
-// CHECK: label_another_line.cpp: (1.0000)
-
-int main() {
-  int result = 0;
-  return result;
-}
-
-// DexLabel('test', on_line=11)
-// DexExpectWatchValue('result', '0', on_line=ref('test'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/label_offset.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/label_offset.cpp
deleted file mode 100644
index 138979269c39b3..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/label_offset.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// Purpose:
-//      Check that we can use label-relative line numbers.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s
-//
-// CHECK: label_offset.cpp: (1.0000)
-
-int main() {  // DexLabel('main')
-    int var = 0;
-    var = var;
-    return 0;
-}
-
-/*
-DexExpectWatchValue('var', '0', from_line=ref('main')+2, to_line=ref('main')+3)
-DexExpectProgramState({
-    'frames': [
-        {
-            'location': { 'lineno': ref('main')+2 },
-            'watches': { 'var': '0' }
-        }
-    ]
-})
-*/
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/source-root-dir.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/source-root-dir.cpp
deleted file mode 100644
index 36db3eb3b2750d..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/source-root-dir.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// This test started failing recently for unknown reasons.
-// XFAIL:*
-// RUN: %dexter_regression_test_build \
-// RUN:     -fdebug-prefix-map=%S=/changed %s -o %t
-// RUN: %dexter --fail-lt 1.0 -w \
-// RUN:     --binary %t \
-// RUN:     --debugger %dexter_regression_test_debugger \
-// RUN:     --source-root-dir=%S --debugger-use-relative-paths -- %s
-
-#include <stdio.h>
-int main() {
-  int x = 42;
-  printf("hello world: %d\n", x); // DexLabel('check')
-}
-
-// DexExpectWatchValue('x', 42, on_line=ref('check'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args.c b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args.c
deleted file mode 100644
index 7efd3c08c62372..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args.c
+++ /dev/null
@@ -1,16 +0,0 @@
-// The dbgeng driver doesn't support --target-run-args yet.
-// UNSUPPORTED: system-windows
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t --target-run-args "a b 'c d'" -- %s | FileCheck %s
-// CHECK: target_run_args.c:
-
-int main(int argc, const char **argv) {
-  if (argc == 4)
-    return 0; // DexLabel('retline')
-
-  return 1; // DexUnreachable()
-}
-
-// DexExpectWatchValue('argc', '4', on_line=ref('retline'))
-// DexExpectWatchValue('argv[1][0]', "'a'", on_line=ref('retline'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args_with_command.c b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args_with_command.c
deleted file mode 100644
index 34ce63fa033ec6..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/target_run_args_with_command.c
+++ /dev/null
@@ -1,17 +0,0 @@
-// The dbgeng driver doesn't support --target-run-args yet.
-// UNSUPPORTED: system-windows
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t --target-run-args "a b 'c d'" -- %s | FileCheck %s
-// CHECK: target_run_args_with_command.c:
-
-int main(int argc, const char **argv) {
-  if (argc == 6)
-    return 0; // DexLabel('retline')
-
-  return 1; // DexUnreachable()
-}
-
-// DexCommandLine(['e', 'f'])
-// DexExpectWatchValue('argc', '6', on_line=ref('retline'))
-// DexExpectWatchValue('argv[1][0]', "'e'", on_line=ref('retline'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/view.cpp b/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/view.cpp
deleted file mode 100644
index 9373c0447ac70c..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/view.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-// Purpose:
-//      Check the `view` subtool works with typical inputs.
-//
-// RUN: %dexter_regression_test_build %s -o %t
-// RUN: %dexter_regression_test_run --binary %t --results %t.results -- %s
-//
-// RUN: %dexter_base view %t.results/view.cpp.dextIR | FileCheck %s
-// CHECK: ## BEGIN
-// CHECK: ## END
-//
-// # [TODO] This doesn't run if FileCheck fails!
-// RUN: rm -rf %t
-
-int main() {
-    int a = 0;
-    return 0; //DexLabel('ret')
-}
-// DexExpectWatchValue('a', '0', on_line=ref('ret'))
diff --git a/cross-project-tests/debuginfo-tests/dexter/feature_tests/unittests/run.test b/cross-project-tests/debuginfo-tests/dexter/feature_tests/unittests/run.test
deleted file mode 100644
index 721732a1bb5a2c..00000000000000
--- a/cross-project-tests/debuginfo-tests/dexter/feature_tests/unittests/run.test
+++ /dev/null
@@ -1,9 +0,0 @@
-Purpose:
-    Run DExTer unit tests.
-
-# Dexter returns 1 when no subtools are specified.
-RUN: not %dexter_base --unittest=show-all 2>&1 | FileCheck %s
-
-CHECK: Ran {{[0-9]+}} tests
-CHECK-EMPTY:
-CHECK-NEXT: OK
diff --git a/cross-project-tests/debuginfo-tests/lit.local.cfg b/cross-project-tests/debuginfo-tests/lit.local.cfg
deleted file mode 100644
index 530f4c01646ff2..00000000000000
--- a/cross-project-tests/debuginfo-tests/lit.local.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-if "clang" not in config.available_features:
-    config.unsupported = True
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/apple-accel.cpp b/cross-project-tests/debuginfo-tests/llgdb-tests/apple-accel.cpp
deleted file mode 100644
index 2705c29a5fb2d4..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/apple-accel.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// REQUIRES: system-darwin
-// Test that clang produces the __apple accelerator tables,
-// e.g., __apple_types, correctly.
-// These sections are going to be retired in DWARF 5, so we hardcode
-// the DWARF version in the tests.
-// RUN: %clang %s %target_itanium_abi_host_triple -gdwarf-2 -O0 -c -g -o %t-ex
-// RUN: llvm-objdump --section-headers %t-ex | FileCheck %s
-// RUN: %clang %s %target_itanium_abi_host_triple -gdwarf-4 -O0 -c -g -o %t-ex
-// RUN: llvm-objdump --section-headers %t-ex | FileCheck %s
-
-// A function in a different section forces the compiler to create the
-// __debug_ranges section.
-__attribute__((section("1,__text_foo"))) void foo() {}
-int main (int argc, char const *argv[]) { return argc; }
-
-// CHECK-DAG: __debug_abbrev
-// CHECK-DAG: __debug_info
-// CHECK-DAG: __debug_str
-// CHECK-DAG: __debug_ranges
-// CHECK-DAG: __apple_names
-// CHECK-DAG: __apple_objc
-// CHECK-DAG: __apple_namespac
-// CHECK-DAG: __apple_types
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/asan-blocks.c b/cross-project-tests/debuginfo-tests/llgdb-tests/asan-blocks.c
deleted file mode 100644
index e836b32a955b3e..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/asan-blocks.c
+++ /dev/null
@@ -1,43 +0,0 @@
-// RUN: %clang -fblocks %target_itanium_abi_host_triple -arch x86_64 %s -o %t.out -g -fsanitize=address
-// RUN: %test_debuginfo %s %t.out
-// FIXME: Remove system-darwin when we build BlocksRuntime everywhere.
-// REQUIRES: !asan, compiler-rt, system-darwin
-//           Zorg configures the ASAN stage2 bots to not build the asan
-//           compiler-rt. Only run this test on non-asanified configurations.
-// XFAIL: !system-darwin && gdb-clang-incompatibility
-
-void b();
-struct S {
-  int a[8];
-};
-
-int f(struct S s, unsigned i) {
-  // DEBUGGER: break 19
-  // DEBUGGER: r
-  // DEBUGGER: p s
-  // CHECK: a = ([0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7)
-  return s.a[i];
-}
-
-int main(int argc, const char **argv) {
-  struct S s = {{0, 1, 2, 3, 4, 5, 6, 7}};
-  if (f(s, 4) == 4) {
-    // DEBUGGER: break 29
-    // DEBUGGER: c
-    // DEBUGGER: p s
-    // CHECK: a = ([0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7)
-    b();
-  }
-  return 0;
-}
-
-void c() {}
-
-void b() {
-  // DEBUGGER: break 42
-  // DEBUGGER: c
-  // DEBUGGER: p x
-  // CHECK: 42
-  __block int x = 42;
-  c();
-}
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/asan-deque.cpp b/cross-project-tests/debuginfo-tests/llgdb-tests/asan-deque.cpp
deleted file mode 100644
index ae765dbbc96aa5..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/asan-deque.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-// RUN: %clangxx -arch x86_64 %target_itanium_abi_host_triple -O1 -g %s -o %t.out -fsanitize=address
-// RUN: %test_debuginfo %s %t.out
-// REQUIRES: !asan, compiler-rt, system-darwin
-//           Zorg configures the ASAN stage2 bots to not build the asan
-//           compiler-rt. Only run this test on non-asanified configurations.
-//           gdb is used on non-darwin; some configs pretty print std::deque,
-//           some don't.
-// UNSUPPORTED: apple-lldb-pre-1000
-// XFAIL: !system-darwin && gdb-clang-incompatibility
-#include <deque>
-
-struct A {
-  int a;
-  A(int a) : a(a) {}
-};
-
-using log_t = std::deque<A>;
-
-static void __attribute__((noinline, optnone)) escape(log_t &log) {
-  static volatile log_t *sink;
-  sink = &log;
-}
-
-int main() {
-  log_t log;
-  log.push_back(1234);
-  log.push_back(56789);
-  escape(log);
-  // DEBUGGER: break 28
-  while (!log.empty()) {
-    auto record = log.front();
-    log.pop_front();
-    escape(log);
-    // DEBUGGER: break 33
-  }
-}
-
-// DEBUGGER: r
-
-// (at line 28)
-// DEBUGGER: p log
-// CHECK: 1234
-// CHECK: 56789
-
-// DEBUGGER: c
-
-// (at line 33)
-// DEBUGGER: p log
-// CHECK: 56789
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/asan.c b/cross-project-tests/debuginfo-tests/llgdb-tests/asan.c
deleted file mode 100644
index e0bfa7bfb913dd..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/asan.c
+++ /dev/null
@@ -1,31 +0,0 @@
-// RUN: %clang -fblocks %target_itanium_abi_host_triple -arch x86_64 %s -o %t.out -g -fsanitize=address
-// RUN: %test_debuginfo %s %t.out
-// REQUIRES: !asan, compiler-rt
-//           Zorg configures the ASAN stage2 bots to not build the asan
-//           compiler-rt. Only run this test on non-asanified configurations.
-// XFAIL: !system-darwin && gdb-clang-incompatibility
-
-struct S {
-  int a[8];
-};
-
-int f(struct S s, unsigned i) {
-  // DEBUGGER: break 14
-  return s.a[i];
-}
-
-int main(int argc, const char **argv) {
-  struct S s = {{0, 1, 2, 3, 4, 5, 6, 7}};
-  if (f(s, 4) == 4)
-    return f(s, 0);
-  return 0;
-}
-
-// DEBUGGER: r
-// DEBUGGER: p s
-// CHECK: a =
-// DEBUGGER: p s.a[0]
-// CHECK: = 0
-// DEBUGGER: p s.a[1]
-// CHECK: = 1
-// DEBUGGER: p s.a[7]
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/block_var.m b/cross-project-tests/debuginfo-tests/llgdb-tests/block_var.m
deleted file mode 100644
index 7ec786f1798732..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/block_var.m
+++ /dev/null
@@ -1,32 +0,0 @@
-// RUN: %clang %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
-// RUN: %clang %target_itanium_abi_host_triple %t.o -o %t.out -framework Foundation
-// RUN: %test_debuginfo %s %t.out 
-
-// REQUIRES: system-darwin
-
-// DEBUGGER: break 24
-// DEBUGGER: r
-// DEBUGGER: p result
-// CHECK: ${{[0-9]}} = 42
-
-void doBlock(void (^block)(void))
-{
-    block();
-}
-
-int I(int n)
-{
-    __block int result;
-    int i = 2;
-    doBlock(^{
-        result = n;
-    });
-    return result + i; /* Check value of 'result' */
-}
-
-
-int main (int argc, const char * argv[]) {
-  return I(42);
-}
-
-
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/blocks.m b/cross-project-tests/debuginfo-tests/llgdb-tests/blocks.m
deleted file mode 100644
index 79ec6fd271e8a6..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/blocks.m
+++ /dev/null
@@ -1,43 +0,0 @@
-// RUN: %clang %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
-// RUN: %clang %target_itanium_abi_host_triple %t.o -o %t.out -framework Foundation
-// RUN: %test_debuginfo %s %t.out 
-
-// REQUIRES: system-darwin
-// Radar 9279956
-
-// DEBUGGER: break 31
-// DEBUGGER: r
-// DEBUGGER: p m2
-// CHECK: ${{[0-9]}} = 1
-// DEBUGGER: p dbTransaction
-// CHECK: ${{[0-9]}} = 0
-// DEBUGGER: p controller
-// CHECK: ${{[0-9]}} = 0
-
-#include <Cocoa/Cocoa.h>
-
-extern void foo(void(^)(void));
-
- at interface A:NSObject @end
- at implementation A
-- (void) helper {
- int controller = 0;
- __block int m2 = 0;
- __block int dbTransaction = 0;
- int (^x)(void) = ^(void) { (void) self; 
-	(void) controller; 
-	(void) dbTransaction; 
-	m2++;
-	return m2;
-	};
-  controller = x();
-}
- at end
-
-void foo(void(^x)(void)) {}
-
-int main() {
-	A *a = [A alloc];
-	[a helper];
-	return 0;
-}
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/foreach.m b/cross-project-tests/debuginfo-tests/llgdb-tests/foreach.m
deleted file mode 100644
index 2e3c312c877c35..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/foreach.m
+++ /dev/null
@@ -1,31 +0,0 @@
-// RUN: %clang %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
-// RUN: %clang %target_itanium_abi_host_triple %t.o -o %t.out -framework Foundation
-// RUN: %test_debuginfo %s %t.out 
-//
-// REQUIRES: system-darwin
-// Radar 8757124
-
-// DEBUGGER: break 25
-// DEBUGGER: r
-// DEBUGGER: po thing
-// CHECK: aaa
-
-#import <Foundation/Foundation.h>
-
-int main (int argc, const char * argv[]) {
-
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    NSArray *things = [NSArray arrayWithObjects:@"one", @"two", @"three" , nil];
-    for (NSString *thing in things) {
-        NSLog (@"%@", thing);
-    }
-    
-    things = [NSArray arrayWithObjects:@"aaa", @"bbb", @"ccc" , nil];
-    for (NSString *thing in things) {
-        NSLog (@"%@", thing);
-    }
-    [pool release];
-    return 0;
-}
-
-
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/forward-declare-class.cpp b/cross-project-tests/debuginfo-tests/llgdb-tests/forward-declare-class.cpp
deleted file mode 100644
index 130c439faec8cd..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/forward-declare-class.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
-// RUN: %test_debuginfo %s %t.o
-// Radar 9168773
-// XFAIL: !system-darwin && gdb-clang-incompatibility
-
-// DEBUGGER: ptype A
-// Work around a gdb bug where it believes that a class is a
-// struct if there aren't any methods - even though it's tagged
-// as a class.
-// CHECK: {{struct|class}} A {
-// CHECK:        int MyData;
-// CHECK-NEXT: }
-class A;
-class B {
-public:
-  void foo(const A *p);
-};
-
-B iEntry;
-
-class A {
-public:
-  int MyData;
-};
-
-A irp;
-
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/lit.local.cfg b/cross-project-tests/debuginfo-tests/llgdb-tests/lit.local.cfg
deleted file mode 100644
index 2b79104f73d358..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/lit.local.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-# debuginfo-tests are not expected to pass in a cross-compilation setup.
-if "native" not in config.available_features or config.is_msvc:
-    config.unsupported = True
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/llgdb.py b/cross-project-tests/debuginfo-tests/llgdb-tests/llgdb.py
deleted file mode 100755
index 6795d3b989a306..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/llgdb.py
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/usr/bin/env python3
-"""
-A gdb-compatible frontend for lldb that implements just enough
-commands to run the tests in the debuginfo-tests repository with lldb.
-"""
-
-# ----------------------------------------------------------------------
-# Auto-detect lldb python module.
-import subprocess, platform, os, sys
-
-try:
-    # Just try for LLDB in case PYTHONPATH is already correctly setup.
-    import lldb
-except ImportError:
-    # Ask the command line driver for the path to the lldb module. Copy over
-    # the environment so that SDKROOT is propagated to xcrun.
-    command = (
-        ["xcrun", "lldb", "-P"] if platform.system() == "Darwin" else ["lldb", "-P"]
-    )
-    # Extend the PYTHONPATH if the path exists and isn't already there.
-    lldb_python_path = subprocess.check_output(command).decode("utf-8").strip()
-    if os.path.exists(lldb_python_path) and not sys.path.__contains__(lldb_python_path):
-        sys.path.append(lldb_python_path)
-    # Try importing LLDB again.
-    try:
-        import lldb
-
-        print('imported lldb from: "%s"' % lldb_python_path)
-    except ImportError:
-        print(
-            "error: couldn't locate the 'lldb' module, please set PYTHONPATH correctly"
-        )
-        sys.exit(1)
-# ----------------------------------------------------------------------
-
-# Command line option handling.
-import argparse
-
-parser = argparse.ArgumentParser(description=__doc__)
-parser.add_argument("--quiet", "-q", action="store_true", help="ignored")
-parser.add_argument(
-    "-batch", action="store_true", help="exit after processing comand line"
-)
-parser.add_argument("-n", action="store_true", help="ignore .lldb file")
-parser.add_argument(
-    "-x", dest="script", type=argparse.FileType("r"), help="execute commands from file"
-)
-parser.add_argument("target", help="the program to debug")
-args = parser.parse_args()
-
-
-# Create a new debugger instance.
-debugger = lldb.SBDebugger.Create()
-debugger.SkipLLDBInitFiles(args.n)
-
-# Make sure to clean up the debugger on exit.
-import atexit
-
-
-def on_exit():
-    debugger.Terminate()
-
-
-atexit.register(on_exit)
-
-# Don't return from lldb function calls until the process stops.
-debugger.SetAsync(False)
-
-# Create a target from a file and arch.
-arch = os.popen("file " + args.target).read().split()[-1]
-target = debugger.CreateTargetWithFileAndArch(args.target, arch)
-
-if not target:
-    print("Could not create target %s" % args.target)
-    sys.exit(1)
-
-if not args.script:
-    print("Interactive mode is not implemented.")
-    sys.exit(1)
-
-import re
-
-for command in args.script:
-    # Strip newline and whitespaces and split into words.
-    cmd = command[:-1].strip().split()
-    if not cmd:
-        continue
-
-    print("> %s" % command[:-1])
-
-    try:
-        if re.match("^r|(run)$", cmd[0]):
-            error = lldb.SBError()
-            launchinfo = lldb.SBLaunchInfo([])
-            launchinfo.SetWorkingDirectory(os.getcwd())
-            process = target.Launch(launchinfo, error)
-            print(error)
-            if not process or error.fail:
-                state = process.GetState()
-                print("State = %d" % state)
-                print(
-                    """
-ERROR: Could not launch process.
-NOTE: There are several reasons why this may happen:
-  * Root needs to run "DevToolsSecurity --enable".
-  * Older versions of lldb cannot launch more than one process simultaneously.
-"""
-                )
-                sys.exit(1)
-
-        elif re.match("^b|(break)$", cmd[0]) and len(cmd) == 2:
-            if re.match("[0-9]+", cmd[1]):
-                # b line
-                mainfile = target.FindFunctions("main")[0].compile_unit.file
-                print(target.BreakpointCreateByLocation(mainfile, int(cmd[1])))
-            else:
-                # b file:line
-                file, line = cmd[1].split(":")
-                print(target.BreakpointCreateByLocation(file, int(line)))
-
-        elif re.match("^ptype$", cmd[0]) and len(cmd) == 2:
-            # GDB's ptype has multiple incarnations depending on its
-            # argument (global variable, function, type).  The definition
-            # here is for looking up the signature of a function and only
-            # if that fails it looks for a type with that name.
-            # Type lookup in LLDB would be "image lookup --type".
-            for elem in target.FindFunctions(cmd[1]):
-                print(elem.function.type)
-                continue
-            print(target.FindFirstType(cmd[1]))
-
-        elif re.match("^po$", cmd[0]) and len(cmd) > 1:
-            try:
-                opts = lldb.SBExpressionOptions()
-                opts.SetFetchDynamicValue(True)
-                opts.SetCoerceResultToId(True)
-                print(target.EvaluateExpression(" ".join(cmd[1:]), opts))
-            except:
-                # FIXME: This is a fallback path for the lab.llvm.org
-                # buildbot running OS X 10.7; it should be removed.
-                thread = process.GetThreadAtIndex(0)
-                frame = thread.GetFrameAtIndex(0)
-                print(frame.EvaluateExpression(" ".join(cmd[1:])))
-
-        elif re.match("^p|(print)$", cmd[0]) and len(cmd) > 1:
-            thread = process.GetThreadAtIndex(0)
-            frame = thread.GetFrameAtIndex(0)
-            print(frame.EvaluateExpression(" ".join(cmd[1:])))
-
-        elif re.match("^n|(next)$", cmd[0]):
-            thread = process.GetThreadAtIndex(0)
-            thread.StepOver()
-
-        elif re.match("^q|(quit)$", cmd[0]):
-            sys.exit(0)
-
-        else:
-            print(debugger.HandleCommand(" ".join(cmd)))
-
-    except SystemExit:
-        raise
-    except:
-        print('Could not handle the command "%s"' % " ".join(cmd))
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/nested-struct.cpp b/cross-project-tests/debuginfo-tests/llgdb-tests/nested-struct.cpp
deleted file mode 100644
index 08668d61d222c4..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/nested-struct.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
-// RUN: %test_debuginfo %s %t.o
-// XFAIL: !system-darwin && gdb-clang-incompatibility
-// Radar 9440721
-// If debug info for my_number() is emitted outside function foo's scope
-// then a debugger may not be able to handle it. At least one version of
-// gdb crashes in such cases.
-
-// DEBUGGER: ptype foo
-// CHECK: int (void)
-
-int foo() {
-  struct Local {
-    static int my_number() {
-      return 42;
-    }
-  };
-
-  int i = 0;
-  i = Local::my_number();
-  return i + 1;
-}
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/nrvo-string.cpp b/cross-project-tests/debuginfo-tests/llgdb-tests/nrvo-string.cpp
deleted file mode 100644
index 988c4ae2232aee..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/nrvo-string.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// This ensures that DW_OP_deref is inserted when necessary, such as when NRVO
-// of a string object occurs in C++.
-//
-// RUN: %clangxx -O0 -fno-exceptions %target_itanium_abi_host_triple %s -o %t.out -g
-// RUN: %test_debuginfo %s %t.out
-// RUN: %clangxx -O1 -fno-exceptions %target_itanium_abi_host_triple %s -o %t.out -g
-// RUN: %test_debuginfo %s %t.out
-// XFAIL: !system-darwin && gdb-clang-incompatibility
-// PR34513
-volatile int sideeffect = 0;
-void __attribute__((noinline)) stop() { sideeffect++; }
-
-struct string {
-  string() {}
-  string(int i) : i(i) {}
-  ~string() {}
-  int i = 0;
-};
-string __attribute__((noinline)) get_string() {
-  string unused;
-  string result = 3;
-  // DEBUGGER: break 23
-  stop();
-  return result;
-}
-void some_function(int) {}
-struct string2 {
-  string2() = default;
-  string2(string2 &&other) { i = other.i; }
-  int i;
-};
-string2 __attribute__((noinline)) get_string2() {
-  string2 result;
-  result.i = 5;
-  some_function(result.i);
-  // Test that the debugger can get the value of result after another
-  // function is called.
-  // DEBUGGER: break 39
-  stop();
-  return result;
-}
-int main() {
-  get_string();
-  get_string2();
-}
-
-// DEBUGGER: r
-// DEBUGGER: print result.i
-// CHECK:  = 3
-// DEBUGGER: c
-// DEBUGGER: print result.i
-// CHECK:  = 5
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/safestack.c b/cross-project-tests/debuginfo-tests/llgdb-tests/safestack.c
deleted file mode 100644
index b2feab56de81d9..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/safestack.c
+++ /dev/null
@@ -1,52 +0,0 @@
-// RUN: %clang %target_itanium_abi_host_triple -arch x86_64 %s -o %t.out -g -fsanitize=safe-stack
-// RUN: %test_debuginfo %s %t.out
-// UNSUPPORTED: system-darwin
-// REQUIRES: !asan, compiler-rt
-//           Zorg configures the ASAN stage2 bots to not build the
-//           safestack compiler-rt.  Only run this test on
-//           non-asanified configurations.
-// XFAIL: !system-darwin && gdb-clang-incompatibility
-struct S {
-  int a[8];
-};
-
-int f(struct S s, unsigned i);
-
-int main(int argc, const char **argv) {
-  struct S s = {{0, 1, 2, 3, 4, 5, 6, 7}};
-  // DEBUGGER: break 17
-  f(s, 4);
-  // DEBUGGER: break 19
-  return 0;
-}
-
-int f(struct S s, unsigned i) {
-  // DEBUGGER: break 24
-  return s.a[i];
-}
-
-// DEBUGGER: r
-// DEBUGGER: p s
-// CHECK: a =
-// DEBUGGER: p s.a[0]
-// CHECK: = 0
-// DEBUGGER: p s.a[1]
-// CHECK: = 1
-// DEBUGGER: p s.a[7]
-// CHECK: = 7
-// DEBUGGER: c
-// DEBUGGER: p s
-// CHECK: a =
-// DEBUGGER: p s.a[0]
-// CHECK: = 0
-// DEBUGGER: p s.a[1]
-// CHECK: = 1
-// DEBUGGER: p s.a[7]
-// DEBUGGER: c
-// DEBUGGER: p s
-// CHECK: a =
-// DEBUGGER: p s.a[0]
-// CHECK: = 0
-// DEBUGGER: p s.a[1]
-// CHECK: = 1
-// DEBUGGER: p s.a[7]
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/sret.cpp b/cross-project-tests/debuginfo-tests/llgdb-tests/sret.cpp
deleted file mode 100644
index 28f057b4e9b569..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/sret.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
-// RUN: %clangxx %target_itanium_abi_host_triple %t.o -o %t.out
-// RUN: %test_debuginfo %s %t.out
-// XFAIL: !system-darwin && gdb-clang-incompatibility
-// Radar 8775834
-// DEBUGGER: break 63
-// DEBUGGER: r
-// DEBUGGER: p a
-// CHECK: ${{[0-9]+}} =
-// LLDB does not print artificial members.
-// CHECK:  {{(_vptr\$A =)?.*}}m_int = 12
-
-class A
-{
-public:
-    A (int i=0);
-    A (const A& rhs);
-    const A&
-    operator= (const A& rhs);
-    virtual ~A() {}
-
-    int get_int();
-
-protected:
-    int m_int;
-};
-
-A::A (int i) :
-    m_int(i)
-{
-}
-
-A::A (const A& rhs) :
-    m_int (rhs.m_int)
-{
-}
-
-const A &
-A::operator =(const A& rhs)
-{
-    m_int = rhs.m_int;
-    return *this;
-}
-
-int A::get_int()
-{
-    return m_int;
-}
-
-class B
-{
-public:
-    B () {}
-
-    A AInstance();
-};
-
-A
-B::AInstance()
-{
-    A a(12);
-    return a;
-}
-
-int main (int argc, char const *argv[])
-{
-    B b;
-    int return_val = b.AInstance().get_int();
-
-    A a(b.AInstance());
-    return return_val;
-}
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/static-member-2.cpp b/cross-project-tests/debuginfo-tests/llgdb-tests/static-member-2.cpp
deleted file mode 100644
index c9b416dace925c..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/static-member-2.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -o %t -c
-// RUN: %clangxx %target_itanium_abi_host_triple %t -o %t.out
-// RUN: %test_debuginfo %s %t.out
-// XFAIL: gdb-clang-incompatibility
-
-// DEBUGGER: delete breakpoints
-// DEBUGGER: break static-member-2.cpp:36
-// DEBUGGER: r
-// DEBUGGER: ptype C
-// CHECK:      {{struct|class}} C {
-// CHECK:      static const int a
-// CHECK-NEXT: static int b;
-// CHECK-NEXT: static int c;
-// CHECK:      int d;
-// CHECK-NEXT: }
-// DEBUGGER: p C::a
-// CHECK:  4
-// DEBUGGER: p C::c
-// CHECK: 15
-
-// PR14471, PR14734
-
-class C {
-public:
-  const static int a = 4;
-  static int b;
-  static int c;
-  int d;
-};
-
-int C::c = 15;
-const int C::a;
-
-int main() {
-    C instance_C;
-    return C::a;
-}
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/static-member.cpp b/cross-project-tests/debuginfo-tests/llgdb-tests/static-member.cpp
deleted file mode 100644
index 492e0ca084209f..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/static-member.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -o %t -c
-// RUN: %clangxx %target_itanium_abi_host_triple %t -o %t.out
-// RUN: %test_debuginfo %s %t.out
-// XFAIL: !system-darwin && gdb-clang-incompatibility
-// DEBUGGER: delete breakpoints
-// DEBUGGER: break static-member.cpp:35
-// DEBUGGER: r
-// DEBUGGER: ptype MyClass
-// CHECK:      {{struct|class}} MyClass {
-// CHECK:      static const int a
-// CHECK-NEXT: static int b;
-// CHECK-NEXT: static int c;
-// CHECK:      int d;
-// CHECK-NEXT: }
-// DEBUGGER: p MyClass::a
-// CHECK: ${{[0-9]}} = 4
-// DEBUGGER: p MyClass::c
-// CHECK: ${{[0-9]}} = 15
-
-// PR14471, PR14734
-
-class MyClass {
-public:
-  const static int a = 4;
-  static int b;
-  static int c;
-  int d;
-};
-
-int MyClass::c = 15;
-const int MyClass::a;
-
-int main() {
-    MyClass instance_MyClass;
-    return MyClass::a;
-}
diff --git a/cross-project-tests/debuginfo-tests/llgdb-tests/test_debuginfo.pl b/cross-project-tests/debuginfo-tests/llgdb-tests/test_debuginfo.pl
deleted file mode 100755
index fa52a5037c2196..00000000000000
--- a/cross-project-tests/debuginfo-tests/llgdb-tests/test_debuginfo.pl
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env perl
-#
-# This script tests debugging information generated by a compiler.
-# Input arguments
-#   - Input source program. Usually this source file is decorated using
-#     special comments to communicate debugger commands.
-#   - Executable file. This file is generated by the compiler.
-#
-# This perl script extracts debugger commands from input source program
-# comments in a script. A debugger is used to load the executable file
-# and run the script generated from source program comments. Finally,
-# the debugger output is checked, using FileCheck, to validate
-# debugging information.
-#
-# On Darwin the default is to use the llgdb.py wrapper script which
-# translates gdb commands into their lldb equivalents.
-
-use File::Basename;
-use Config;
-use Cwd;
-
-my $testcase_file = $ARGV[0];
-my $executable_file = $ARGV[1];
-
-my $input_filename = basename $testcase_file;
-my $output_dir = dirname $executable_file;
-
-my $debugger_script_file = "$output_dir/$input_filename.debugger.script";
-my $output_file = "$output_dir/$input_filename.gdb.output";
-
-my %cmd_map = ();
-# Assume lldb to be the debugger on Darwin.
-my $use_lldb = 0;
-$use_lldb = 1 if ($Config{osname} eq "darwin");
-
-# Extract debugger commands from testcase. They are marked with DEBUGGER:
-# at the beginning of a comment line.
-open(INPUT, $testcase_file);
-open(OUTPUT, ">$debugger_script_file");
-while(<INPUT>) {
-    my($line) = $_;
-    $i = index($line, "DEBUGGER:");
-    if ( $i >= 0) {
-        $l = length("DEBUGGER:");
-        $s = substr($line, $i + $l);
-        print OUTPUT  "$s";
-    }
-}
-print OUTPUT "\n";
-print OUTPUT "quit\n";
-close(INPUT);
-close(OUTPUT);
-
-# setup debugger and debugger options to run a script.
-my $my_debugger = $ENV{'DEBUGGER'};
-if (!$my_debugger) {
-    if ($use_lldb) {
-        my $path = dirname(Cwd::abs_path($0));
-        $my_debugger = "/usr/bin/xcrun python3 $path/llgdb.py";
-    } else {
-        $my_debugger = "gdb";
-    }
-}
-
-# quiet / exit after cmdline / no init file / execute script
-my $debugger_options = "-q -batch -n -x";
-
-# run debugger and capture output.
-print("Running debugger\n");
-system("$my_debugger $debugger_options $debugger_script_file $executable_file > $output_file 2>&1");
-if ($?) {
-    print("Debugger output was:\n");
-    system("cat", "$output_file");
-    exit 1;
-}
-# validate output.
-print("Running FileCheck\n");
-system("FileCheck", "-input-file", "$output_file", "$testcase_file");
-if ($?) {
-    print("Debugger output was:\n");
-    system("cat", "$output_file");
-    exit 1;
-}
-else {
-    exit 0;
-}
diff --git a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/lit.local.cfg b/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/lit.local.cfg
deleted file mode 100644
index 222448f169e025..00000000000000
--- a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/lit.local.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-import lit.util
-
-# debuginfo-tests are not expected to pass in a cross-compilation setup.
-if "native" not in config.available_features or lit.util.which("gdb") is None:
-    config.unsupported = True
-
-if config.mlir_src_root:
-    config.substitutions.append(("%mlir_src_root", config.mlir_src_root))
-    config.available_features.add("mlir")
-
-config.suffixes = [".gdb"]
diff --git a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp b/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp
deleted file mode 100644
index 737d9bd38c27c3..00000000000000
--- a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-#include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/PointerIntPair.h"
-#include "llvm/ADT/PointerUnion.h"
-#include "llvm/ADT/SmallString.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/StringMap.h"
-#include "llvm/ADT/Twine.h"
-#include "llvm/ADT/ilist.h"
-#include "llvm/Support/Error.h"
-#include <optional>
-
-int Array[] = {1, 2, 3};
-auto IntPtr = reinterpret_cast<int *>(0xabc);
-
-llvm::ArrayRef<int> ArrayRef(Array);
-llvm::MutableArrayRef<int> MutableArrayRef(Array);
-llvm::DenseMap<int, int> DenseMap = {{4, 5}, {6, 7}};
-llvm::StringMap<int> StringMap = {{"foo", 123}, {"bar", 456}};
-llvm::Expected<int> ExpectedValue(8);
-llvm::Expected<int> ExpectedError(llvm::createStringError(""));
-llvm::SmallVector<int, 5> SmallVector = {10, 11, 12};
-llvm::SmallString<5> SmallString("foo");
-llvm::StringRef StringRef = "bar";
-// Should test std::string in Twine too, but it's currently broken because I
-// don't know how to add 'str' and 'gdb.LazyString' (can't figure out any way to
-// string-ify LazyString).
-std::string String = "foo";
-llvm::Twine TempTwine = llvm::Twine(String) + StringRef;
-llvm::Twine Twine = TempTwine + "baz";
-llvm::PointerIntPair<int *, 1> PointerIntPair(IntPtr, 1);
-
-struct alignas(8) Z {};
-llvm::PointerUnion<Z *, int *> PointerUnion(IntPtr);
-
-// No members which instantiate PointerUnionUIntTraits<Z *> (e.g. get<T *>())
-// are called, and this instance will therefore be raw-printed.
-llvm::PointerUnion<Z *, float *> RawPrintingPointerUnion(nullptr);
-
-using IlistTag = llvm::ilist_tag<struct A>;
-using SimpleIlistTag = llvm::ilist_tag<struct B>;
-struct IlistNode : llvm::ilist_node<IlistNode, IlistTag>,
-                   llvm::ilist_node<IlistNode, SimpleIlistTag> {
-  int Value;
-};
-auto Ilist = [] {
-  llvm::ilist<IlistNode, IlistTag> Result;
-  for (int I : {13, 14, 15}) {
-    Result.push_back(new IlistNode);
-    Result.back().Value = I;
-  }
-  return Result;
-}();
-auto SimpleIlist = []() {
-  llvm::simple_ilist<IlistNode, SimpleIlistTag> Result;
-  for (auto &Node : Ilist)
-    Result.push_front(Node);
-  return Result;
-}();
-
-int main() {
-  std::uintptr_t result = 0;
-  auto dont_strip = [&](const auto &val) {
-    result += reinterpret_cast<std::uintptr_t>(&val);
-  };
-  dont_strip(ArrayRef);
-  dont_strip(MutableArrayRef);
-  dont_strip(ExpectedValue);
-  dont_strip(ExpectedError);
-  return result; // Non-zero return value is OK.
-}
diff --git a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.gdb b/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.gdb
deleted file mode 100644
index de6738e53bb51e..00000000000000
--- a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.gdb
+++ /dev/null
@@ -1,131 +0,0 @@
-# RUN: gdb -q -batch -n -iex 'source %llvm_src_root/utils/gdb-scripts/prettyprinters.py' -x %s %llvm_tools_dir/check-gdb-llvm-support | FileCheck %s
-# REQUIRES: debug-info
-
-break main
-run
-
-# CHECK: llvm::ArrayRef of length 3 = {1, 2, 3}
-p ArrayRef
-
-# CHECK: llvm::ArrayRef of length 3 = {1, 2, 3}
-p MutableArrayRef
-
-# CHECK: llvm::DenseMap with 2 elements = {
-# CHECK:   [4] = 5,
-# CHECK:   [6] = 7,
-# CHECK: }
-p DenseMap
-
-# CHECK: llvm::Expected = {value = 8}
-p ExpectedValue
-
-# CHECK: llvm::Expected is error
-p ExpectedError
-
-# CHECK: llvm::SmallVector of Size 3, Capacity 5 = {10, 11, 12}
-p SmallVector
-
-# CHECK: "foo"
-p SmallString
-
-# CHECK: "bar"
-p StringRef
-
-# CHECK: "{{foo|\(missing .*\)}}barbaz"
-p Twine
-
-# CHECK: llvm::StringMap with 2 elements = {["foo"] = 123, ["bar"] = 456}
-py import sys
-py gdb.execute("p StringMap" if sys.version_info.major > 2 else "printf \"llvm::StringMap with 2 elements = {[\\\"foo\\\"] = 123, [\\\"bar\\\"] = 456}\"\n\n")
-
-# CHECK: {pointer = 0xabc, value = 1}
-p PointerIntPair
-
-# CHECK: Containing int * = {pointer = 0xabc}
-p PointerUnion
-
-# CHECK: PointerUnionMembers<llvm::PointerUnion<Z*, float*>,
-p RawPrintingPointerUnion
-
-# Switch to print pretty adds newlines to the following statements.
-set print pretty
-
-# CHECK: {
-# CHECK:   [0] = {
-# CHECK:     <llvm::ilist_node<IlistNode, llvm::ilist_tag<A> >> = {
-# CHECK:       prev = [[Ilist_Sentinel:0x.*]] <Ilist>,
-# CHECK:       next = [[Node_14:0x.*]]
-# CHECK:     },
-# CHECK:     <llvm::ilist_node<IlistNode, llvm::ilist_tag<B> >> = {
-# CHECK:       prev = [[Node_14]],
-# CHECK:       next = [[SimpleIlist_Sentinel:0x.*]] <SimpleIlist>
-# CHECK:     },
-# CHECK:     members of IlistNode:
-# CHECK:     Value = 13
-# CHECK:   },
-# CHECK:   [1] = {
-# CHECK:     <llvm::ilist_node<IlistNode, llvm::ilist_tag<A> >> = {
-# CHECK:       prev = [[Node_13:0x.*]],
-# CHECK:       next = [[Node_15:0x.*]]
-# CHECK:     },
-# CHECK:     <llvm::ilist_node<IlistNode, llvm::ilist_tag<B> >> = {
-# CHECK:       prev = [[Node_15]],
-# CHECK:       next = [[Node_13]]
-# CHECK:     },
-# CHECK:     members of IlistNode:
-# CHECK:     Value = 14
-# CHECK:   },
-# CHECK:   [2] = {
-# CHECK:     <llvm::ilist_node<IlistNode, llvm::ilist_tag<A> >> = {
-# CHECK:       prev = [[Node_14]],
-# CHECK:       next = [[Ilist_Sentinel]] <Ilist>
-# CHECK:     },
-# CHECK:     <llvm::ilist_node<IlistNode, llvm::ilist_tag<B> >> = {
-# CHECK:       prev = [[SimpleIlist_Sentinel]] <SimpleIlist>,
-# CHECK:       next = [[Node_14]]
-# CHECK:     },
-# CHECK:     members of IlistNode:
-# CHECK:     Value = 15
-# CHECK:   }
-# CHECK: }
-p Ilist
-
-# CHECK: {
-# CHECK:   [0] = {
-# CHECK:     <llvm::ilist_node<IlistNode, llvm::ilist_tag<A> >> = {
-# CHECK:       prev = [[Node_14]],
-# CHECK:       next = [[Ilist_Sentinel]] <Ilist>
-# CHECK:     },
-# CHECK:     <llvm::ilist_node<IlistNode, llvm::ilist_tag<B> >> = {
-# CHECK:       prev = [[SimpleIlist_Sentinel]] <SimpleIlist>,
-# CHECK:       next = [[Node_14]]
-# CHECK:     },
-# CHECK:     members of IlistNode:
-# CHECK:     Value = 15
-# CHECK:   },
-# CHECK:   [1] = {
-# CHECK:     <llvm::ilist_node<IlistNode, llvm::ilist_tag<A> >> = {
-# CHECK:       prev = [[Node_13]],
-# CHECK:       next = [[Node_15]]
-# CHECK:     },
-# CHECK:     <llvm::ilist_node<IlistNode, llvm::ilist_tag<B> >> = {
-# CHECK:       prev = [[Node_15]],
-# CHECK:       next = [[Node_13]]
-# CHECK:     },
-# CHECK:     members of IlistNode:
-# CHECK:     Value = 14
-# CHECK:   },
-# CHECK:   [2] = {
-# CHECK:     <llvm::ilist_node<IlistNode, llvm::ilist_tag<A> >> = {
-# CHECK:       prev = [[Ilist_Sentinel]] <Ilist>,
-# CHECK:       next = [[Node_14]]
-# CHECK:     },
-# CHECK:     <llvm::ilist_node<IlistNode, llvm::ilist_tag<B> >> = {
-# CHECK:       prev = [[Node_14]],
-# CHECK:       next = [[SimpleIlist_Sentinel]] <SimpleIlist>
-# CHECK:     },
-# CHECK:     members of IlistNode:
-# CHECK:     Value = 13
-# CHECK:   }
-# CHECK: }
-p SimpleIlist
diff --git a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp b/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp
deleted file mode 100644
index 026028447e6134..00000000000000
--- a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-#include "mlir/IR/BuiltinAttributes.h"
-#include "mlir/IR/BuiltinTypes.h"
-#include "mlir/IR/Location.h"
-#include "mlir/IR/MLIRContext.h"
-#include "mlir/IR/OperationSupport.h"
-
-mlir::MLIRContext Context;
-
-auto Identifier = mlir::StringAttr::get(&Context, "foo");
-mlir::OperationName OperationName("FooOp", &Context);
-
-mlir::Type Type(nullptr);
-mlir::Type IndexType = mlir::IndexType::get(&Context);
-mlir::Type IntegerType =
-    mlir::IntegerType::get(&Context, 3, mlir::IntegerType::Unsigned);
-mlir::Type FloatType = mlir::Float32Type::get(&Context);
-mlir::Type MemRefType = mlir::MemRefType::get({4, 5}, FloatType);
-mlir::Type UnrankedMemRefType = mlir::UnrankedMemRefType::get(IntegerType, 6);
-mlir::Type VectorType = mlir::VectorType::get({1, 2}, FloatType);
-mlir::Type TupleType =
-    mlir::TupleType::get(&Context, mlir::TypeRange({IndexType, FloatType}));
-
-
-mlir::detail::OutOfLineOpResult Result(FloatType, 42);
-mlir::Value Value(&Result);
-
-auto UnknownLoc = mlir::UnknownLoc::get(&Context);
-auto FileLineColLoc = mlir::FileLineColLoc::get(&Context, "file", 7, 8);
-auto OpaqueLoc = mlir::OpaqueLoc::get<uintptr_t>(9, &Context);
-auto NameLoc = mlir::NameLoc::get(Identifier);
-auto CallSiteLoc = mlir::CallSiteLoc::get(FileLineColLoc, OpaqueLoc);
-auto FusedLoc = mlir::FusedLoc::get(&Context, {FileLineColLoc, NameLoc});
-
-mlir::Attribute UnitAttr = mlir::UnitAttr::get(&Context);
-mlir::Attribute FloatAttr = mlir::FloatAttr::get(FloatType, 1.0);
-mlir::Attribute IntegerAttr = mlir::IntegerAttr::get(IntegerType, 10);
-mlir::Attribute TypeAttr = mlir::TypeAttr::get(IndexType);
-mlir::Attribute ArrayAttr = mlir::ArrayAttr::get(&Context, {UnitAttr});
-mlir::Attribute StringAttr = mlir::StringAttr::get(&Context, "foo");
-mlir::Attribute ElementsAttr = mlir::DenseElementsAttr::get(
-    mlir::cast<mlir::ShapedType>(VectorType), llvm::ArrayRef<float>{2.0f, 3.0f});
-
-int main() {
-  // Reference symbols that might otherwise be stripped.
-  std::uintptr_t result = 0;
-  auto dont_strip = [&](const auto &val) {
-    result += reinterpret_cast<std::uintptr_t>(&val);
-  };
-  dont_strip(Value);
-  return result; // Non-zero return value is OK.
-}
diff --git a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.gdb b/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.gdb
deleted file mode 100644
index 269c24c83ee77e..00000000000000
--- a/cross-project-tests/debuginfo-tests/llvm-prettyprinters/gdb/mlir-support.gdb
+++ /dev/null
@@ -1,147 +0,0 @@
-# RUN: gdb -q -batch -n \
-# RUN:   -iex 'source %mlir_src_root/utils/gdb-scripts/prettyprinters.py' \
-# RUN:   -iex 'source %llvm_src_root/utils/gdb-scripts/prettyprinters.py' \
-# RUN:   -ex 'source -v %s' %llvm_tools_dir/check-gdb-mlir-support \
-# RUN: | FileCheck %s
-# REQUIRES: debug-info
-# REQUIRES: mlir
-
-break main
-run
-set print pretty on
-
-# CHECK-LABEL: +print Identifier
-print Identifier
-# CHECK: "foo"
-
-# CHECK-LABEL: +print OperationName
-print OperationName
-# CHECK: "FooOp"
-
-# CHECK-LABEL: +print Type
-print Type
-# CHECK: impl = 0x0
-
-# CHECK-LABEL: +print IndexType
-print IndexType
-# CHECK: typeID = mlir::TypeID::get<mlir::IndexType>()
-
-# CHECK-LABEL: +print IntegerType
-print IntegerType
-# CHECK: typeID = mlir::TypeID::get<mlir::IntegerType>()
-# CHECK: members of mlir::detail::IntegerTypeStorage
-
-# CHECK-LABEL: +print FloatType
-print FloatType
-# CHECK: typeID = mlir::TypeID::get<mlir::Float32Type>()
-
-# CHECK-LABEL: +print MemRefType
-print MemRefType
-# CHECK: typeID = mlir::TypeID::get<mlir::MemRefType>()
-# CHECK: members of mlir::detail::MemRefTypeStorage
-
-# CHECK-LABEL: +print UnrankedMemRefType
-print UnrankedMemRefType
-# CHECK: typeID = mlir::TypeID::get<mlir::UnrankedMemRefType>()
-# CHECK: members of mlir::detail::UnrankedMemRefTypeStorage
-
-# CHECK-LABEL: +print VectorType
-print VectorType
-# CHECK: typeID = mlir::TypeID::get<mlir::VectorType>()
-# CHECK: members of mlir::detail::VectorTypeStorage
-
-# CHECK-LABEL: +print TupleType
-print TupleType
-# CHECK: typeID = mlir::TypeID::get<mlir::TupleType>()
-# CHECK: elements[0]
-# CHECK-NEXT: typeID = mlir::TypeID::get<mlir::IndexType>()
-# CHECK: elements[1]
-# CHECK-NEXT: typeID = mlir::TypeID::get<mlir::Float32Type>()
-
-# CHECK-LABEL: +print Result
-print Result
-# CHECK: typeID = mlir::TypeID::get<mlir::Float32Type>()
-# CHECK: outOfLineIndex = 42
-
-# CHECK-LABEL: +print Value
-print Value
-# CHECK: typeID = mlir::TypeID::get<mlir::Float32Type>()
-# CHECK: mlir::detail::ValueImpl::Kind::OutOfLineOpResult
-
-# CHECK-LABEL: +print UnknownLoc
-print UnknownLoc
-# CHECK: typeID = mlir::TypeID::get<mlir::UnknownLoc>()
-
-# CHECK-LABEL: +print FileLineColLoc
-print FileLineColLoc
-# CHECK: typeID = mlir::TypeID::get<mlir::FileLineColLoc>()
-# CHECK: members of mlir::detail::FileLineColLocAttrStorage
-# CHECK: "file"
-# CHECK: line = 7
-# CHECK: column = 8
-
-# CHECK-LABEL: +print OpaqueLoc
-print OpaqueLoc
-# CHECK: typeID = mlir::TypeID::get<mlir::OpaqueLoc>()
-# CHECK: members of mlir::detail::OpaqueLocAttrStorage
-# CHECK: underlyingLocation = 9
-
-# CHECK-LABEL: +print NameLoc
-print NameLoc
-# CHECK: typeID = mlir::TypeID::get<mlir::NameLoc>()
-# CHECK: members of mlir::detail::NameLocAttrStorage
-# CHECK: "foo"
-# CHECK: typeID = mlir::TypeID::get<mlir::UnknownLoc>()
-
-# CHECK-LABEL: +print CallSiteLoc
-print CallSiteLoc
-# CHECK: typeID = mlir::TypeID::get<mlir::CallSiteLoc>()
-# CHECK: members of mlir::detail::CallSiteLocAttrStorage
-# CHECK: typeID = mlir::TypeID::get<mlir::FileLineColLoc>()
-# CHECK: typeID = mlir::TypeID::get<mlir::OpaqueLoc>()
-
-# CHECK-LABEL: +print FusedLoc
-print FusedLoc
-# CHECK: typeID = mlir::TypeID::get<mlir::FusedLoc>()
-# CHECK: members of mlir::detail::FusedLocAttrStorage
-# CHECK: locations = llvm::ArrayRef of length 2
-# CHECK: typeID = mlir::TypeID::get<mlir::FileLineColLoc>()
-# CHECK: typeID = mlir::TypeID::get<mlir::NameLoc>()
-
-# CHECK-LABEL: +print UnitAttr
-print UnitAttr
-# CHECK: typeID = mlir::TypeID::get<mlir::UnitAttr>()
-
-# CHECK-LABEL: +print FloatAttr
-print FloatAttr
-# CHECK: typeID = mlir::TypeID::get<mlir::FloatAttr>()
-# CHECK: members of mlir::detail::FloatAttrStorage
-
-# CHECK-LABEL: +print IntegerAttr
-print IntegerAttr
-# CHECK: typeID = mlir::TypeID::get<mlir::IntegerAttr>()
-# CHECK: members of mlir::detail::IntegerAttrStorage
-
-# CHECK-LABEL: +print TypeAttr
-print TypeAttr
-# CHECK: typeID = mlir::TypeID::get<mlir::TypeAttr>()
-# CHECK: members of mlir::detail::TypeAttrStorage
-# CHECK: typeID = mlir::TypeID::get<mlir::IndexType>()
-
-# CHECK-LABEL: +print ArrayAttr
-print ArrayAttr
-# CHECK: typeID = mlir::TypeID::get<mlir::ArrayAttr>()
-# CHECK: members of mlir::detail::ArrayAttrStorage
-# CHECK: llvm::ArrayRef of length 1
-# CHECK: typeID = mlir::TypeID::get<mlir::UnitAttr>()
-
-# CHECK-LABEL: +print StringAttr
-print StringAttr
-# CHECK: typeID = mlir::TypeID::get<mlir::StringAttr>()
-# CHECK: members of mlir::detail::StringAttrStorage
-# CHECK: value = "foo"
-
-# CHECK-LABEL: +print ElementsAttr
-print ElementsAttr
-# CHECK: typeID = mlir::TypeID::get<mlir::DenseIntOrFPElementsAttr>()
-# CHECK: members of mlir::detail::DenseIntOrFPElementsAttrStorage
diff --git a/cross-project-tests/debuginfo-tests/win_cdb-tests/README.txt b/cross-project-tests/debuginfo-tests/win_cdb-tests/README.txt
deleted file mode 100644
index 4ef69c09660d79..00000000000000
--- a/cross-project-tests/debuginfo-tests/win_cdb-tests/README.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-These are debug info integration tests similar to the ones in the parent
-directory, except that these are designed to test compatibility between clang,
-lld, and cdb, the command line debugger that ships as part of the Microsoft
-Windows SDK. The debugger command language that cdb uses is very different from
-gdb and LLDB, so it's useful to be able to write some tests directly in the cdb
-command language.
-
-An example header for a CDB test, of which there are currently none:
-
-// RUN: %clang_cl %s -o %t.exe -fuse-ld=lld -Z7
-// RUN: grep DE[B]UGGER: %s | sed -e 's/.*DE[B]UGGER: //' > %t.script
-// RUN: %cdb -cf %t.script %t.exe | FileCheck %s --check-prefixes=DEBUGGER,CHECK
diff --git a/cross-project-tests/debuginfo-tests/win_cdb-tests/lit.local.cfg.py b/cross-project-tests/debuginfo-tests/win_cdb-tests/lit.local.cfg.py
deleted file mode 100644
index e4d61b1fbb6350..00000000000000
--- a/cross-project-tests/debuginfo-tests/win_cdb-tests/lit.local.cfg.py
+++ /dev/null
@@ -1,2 +0,0 @@
-# The win_cdb tests are supported when cmake was run in an MSVC environment.
-config.unsupported = not config.is_msvc
diff --git a/cross-project-tests/intrinsic-header-tests/README.txt b/cross-project-tests/intrinsic-header-tests/README.txt
deleted file mode 100644
index 2e9c7dd0f50f8c..00000000000000
--- a/cross-project-tests/intrinsic-header-tests/README.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-                                                                   -*- rst -*-
-This is a collection of tests to check that the expected assembly is generated
-from clang intrinsic headers.
diff --git a/cross-project-tests/intrinsic-header-tests/lit.local.cfg b/cross-project-tests/intrinsic-header-tests/lit.local.cfg
deleted file mode 100644
index 530f4c01646ff2..00000000000000
--- a/cross-project-tests/intrinsic-header-tests/lit.local.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-if "clang" not in config.available_features:
-    config.unsupported = True
diff --git a/cross-project-tests/intrinsic-header-tests/wasm_simd128.c b/cross-project-tests/intrinsic-header-tests/wasm_simd128.c
deleted file mode 100644
index b601d90cfcc927..00000000000000
--- a/cross-project-tests/intrinsic-header-tests/wasm_simd128.c
+++ /dev/null
@@ -1,1523 +0,0 @@
-// REQUIRES: webassembly-registered-target
-// expected-no-diagnostics
-
-// RUN: %clang %s -O2 -S -o - -target wasm32-unknown-unknown \
-// RUN: -msimd128 -mrelaxed-simd -mfp16 -Wcast-qual -Werror | FileCheck %s
-
-#include <wasm_simd128.h>
-
-// CHECK-LABEL: test_v128_load:
-// CHECK: v128.load 0:p2align=0{{$}}
-v128_t test_v128_load(const void *mem) { return wasm_v128_load(mem); }
-
-// CHECK-LABEL: test_v128_load8_splat:
-// CHECK: v128.load8_splat 0{{$}}
-v128_t test_v128_load8_splat(const void *mem) {
-  return wasm_v128_load8_splat(mem);
-}
-
-// CHECK-LABEL: test_v128_load16_splat:
-// CHECK: v128.load16_splat 0:p2align=0{{$}}
-v128_t test_v128_load16_splat(const void *mem) {
-  return wasm_v128_load16_splat(mem);
-}
-
-// CHECK-LABEL: test_v128_load32_splat:
-// CHECK: v128.load32_splat 0:p2align=0{{$}}
-v128_t test_v128_load32_splat(const void *mem) {
-  return wasm_v128_load32_splat(mem);
-}
-
-// CHECK-LABEL: test_v128_load64_splat:
-// CHECK: v128.load64_splat 0:p2align=0{{$}}
-v128_t test_v128_load64_splat(const void *mem) {
-  return wasm_v128_load64_splat(mem);
-}
-
-// CHECK-LABEL: test_i16x8_load8x8:
-// CHECK: i16x8.load8x8_s 0:p2align=0{{$}}
-v128_t test_i16x8_load8x8(const void *mem) { return wasm_i16x8_load8x8(mem); }
-
-// CHECK-LABEL: test_u16x8_load8x8:
-// CHECK: i16x8.load8x8_u 0:p2align=0{{$}}
-v128_t test_u16x8_load8x8(const void *mem) { return wasm_u16x8_load8x8(mem); }
-
-// CHECK-LABEL: test_i32x4_load16x4:
-// CHECK: i32x4.load16x4_s 0:p2align=0{{$}}
-v128_t test_i32x4_load16x4(const void *mem) { return wasm_i32x4_load16x4(mem); }
-
-// CHECK-LABEL: test_u32x4_load16x4:
-// CHECK: i32x4.load16x4_u 0:p2align=0{{$}}
-v128_t test_u32x4_load16x4(const void *mem) { return wasm_u32x4_load16x4(mem); }
-
-// CHECK-LABEL: test_i64x2_load32x2:
-// CHECK: i64x2.load32x2_s 0:p2align=0{{$}}
-v128_t test_i64x2_load32x2(const void *mem) { return wasm_i64x2_load32x2(mem); }
-
-// CHECK-LABEL: test_u64x2_load32x2:
-// CHECK: i64x2.load32x2_u 0:p2align=0{{$}}
-v128_t test_u64x2_load32x2(const void *mem) { return wasm_u64x2_load32x2(mem); }
-
-// CHECK-LABEL: test_v128_load32_zero:
-// CHECK: v128.load32_zero 0:p2align=0{{$}}
-v128_t test_v128_load32_zero(const void *mem) {
-  return wasm_v128_load32_zero(mem);
-}
-
-// CHECK-LABEL: test_v128_load64_zero:
-// CHECK: v128.load64_zero 0:p2align=0{{$}}
-v128_t test_v128_load64_zero(const void *mem) {
-  return wasm_v128_load64_zero(mem);
-}
-
-// CHECK-LABEL: test_v128_load8_lane:
-// CHECK: v128.load8_lane 0, 15{{$}}
-v128_t test_v128_load8_lane(uint8_t *ptr, v128_t vec) {
-  return wasm_v128_load8_lane(ptr, vec, 15);
-}
-
-// CHECK-LABEL: test_v128_load16_lane:
-// CHECK: v128.load16_lane 0:p2align=0, 7{{$}}
-v128_t test_v128_load16_lane(uint16_t *ptr, v128_t vec) {
-  return wasm_v128_load16_lane(ptr, vec, 7);
-}
-
-// CHECK-LABEL: test_v128_load32_lane:
-// CHECK: v128.load32_lane 0:p2align=0, 3{{$}}
-v128_t test_v128_load32_lane(uint32_t *ptr, v128_t vec) {
-  return wasm_v128_load32_lane(ptr, vec, 3);
-}
-
-// CHECK-LABEL: test_v128_load64_lane:
-// CHECK: v128.load64_lane 0:p2align=0, 1{{$}}
-v128_t test_v128_load64_lane(uint64_t *ptr, v128_t vec) {
-  return wasm_v128_load64_lane(ptr, vec, 1);
-}
-
-// CHECK-LABEL: test_v128_store:
-// CHECK: v128.store 0:p2align=0{{$}}
-void test_v128_store(void *mem, v128_t a) { return wasm_v128_store(mem, a); }
-
-// CHECK-LABEL: test_v128_store8_lane:
-// CHECK: v128.store8_lane 0, 15{{$}}
-void test_v128_store8_lane(uint8_t *ptr, v128_t vec) {
-  return wasm_v128_store8_lane(ptr, vec, 15);
-}
-
-// CHECK-LABEL: test_v128_store16_lane:
-// CHECK: v128.store16_lane 0:p2align=0, 7{{$}}
-void test_v128_store16_lane(uint16_t *ptr, v128_t vec) {
-  return wasm_v128_store16_lane(ptr, vec, 7);
-}
-
-// CHECK-LABEL: test_v128_store32_lane:
-// CHECK: v128.store32_lane 0:p2align=0, 3{{$}}
-void test_v128_store32_lane(uint32_t *ptr, v128_t vec) {
-  return wasm_v128_store32_lane(ptr, vec, 3);
-}
-
-// CHECK-LABEL: test_v128_store64_lane:
-// CHECK: v128.store64_lane 0:p2align=0, 1{{$}}
-void test_v128_store64_lane(uint64_t *ptr, v128_t vec) {
-  return wasm_v128_store64_lane(ptr, vec, 1);
-}
-
-// CHECK-LABEL: test_i8x16_make:
-// CHECK:      local.get 0{{$}}
-// CHECK-NEXT: i8x16.splat{{$}}
-// CHECK-NEXT: local.get 1{{$}}
-// CHECK-NEXT: i8x16.replace_lane 1{{$}}
-// CHECK-NEXT: local.get 2{{$}}
-// CHECK-NEXT: i8x16.replace_lane 2{{$}}
-// CHECK-NEXT: local.get 3{{$}}
-// CHECK-NEXT: i8x16.replace_lane 3{{$}}
-// CHECK-NEXT: local.get 4{{$}}
-// CHECK-NEXT: i8x16.replace_lane 4{{$}}
-// CHECK-NEXT: local.get 5{{$}}
-// CHECK-NEXT: i8x16.replace_lane 5{{$}}
-// CHECK-NEXT: local.get 6{{$}}
-// CHECK-NEXT: i8x16.replace_lane 6{{$}}
-// CHECK-NEXT: local.get 7{{$}}
-// CHECK-NEXT: i8x16.replace_lane 7{{$}}
-// CHECK-NEXT: local.get 8{{$}}
-// CHECK-NEXT: i8x16.replace_lane 8{{$}}
-// CHECK-NEXT: local.get 9{{$}}
-// CHECK-NEXT: i8x16.replace_lane 9{{$}}
-// CHECK-NEXT: local.get 10{{$}}
-// CHECK-NEXT: i8x16.replace_lane 10{{$}}
-// CHECK-NEXT: local.get 11{{$}}
-// CHECK-NEXT: i8x16.replace_lane 11{{$}}
-// CHECK-NEXT: local.get 12{{$}}
-// CHECK-NEXT: i8x16.replace_lane 12{{$}}
-// CHECK-NEXT: local.get 13{{$}}
-// CHECK-NEXT: i8x16.replace_lane 13{{$}}
-// CHECK-NEXT: local.get 14{{$}}
-// CHECK-NEXT: i8x16.replace_lane 14{{$}}
-// CHECK-NEXT: local.get 15{{$}}
-// CHECK-NEXT: i8x16.replace_lane 15{{$}}
-v128_t test_i8x16_make(int8_t c0, int8_t c1, int8_t c2, int8_t c3, int8_t c4,
-                       int8_t c5, int8_t c6, int8_t c7, int8_t c8, int8_t c9,
-                       int8_t c10, int8_t c11, int8_t c12, int8_t c13,
-                       int8_t c14, int8_t c15) {
-  return wasm_i8x16_make(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
-                         c13, c14, c15);
-}
-
-// CHECK-LABEL: test_i16x8_make:
-// CHECK:      local.get 0{{$}}
-// CHECK-NEXT: i16x8.splat{{$}}
-// CHECK-NEXT: local.get 1{{$}}
-// CHECK-NEXT: i16x8.replace_lane 1{{$}}
-// CHECK-NEXT: local.get 2{{$}}
-// CHECK-NEXT: i16x8.replace_lane 2{{$}}
-// CHECK-NEXT: local.get 3{{$}}
-// CHECK-NEXT: i16x8.replace_lane 3{{$}}
-// CHECK-NEXT: local.get 4{{$}}
-// CHECK-NEXT: i16x8.replace_lane 4{{$}}
-// CHECK-NEXT: local.get 5{{$}}
-// CHECK-NEXT: i16x8.replace_lane 5{{$}}
-// CHECK-NEXT: local.get 6{{$}}
-// CHECK-NEXT: i16x8.replace_lane 6{{$}}
-// CHECK-NEXT: local.get 7{{$}}
-// CHECK-NEXT: i16x8.replace_lane 7{{$}}
-v128_t test_i16x8_make(int16_t c0, int16_t c1, int16_t c2, int16_t c3,
-                       int16_t c4, int16_t c5, int16_t c6, int16_t c7) {
-  return wasm_i16x8_make(c0, c1, c2, c3, c4, c5, c6, c7);
-}
-
-// CHECK-LABEL: test_i32x4_make:
-// CHECK:      local.get 0{{$}}
-// CHECK-NEXT: i32x4.splat{{$}}
-// CHECK-NEXT: local.get 1{{$}}
-// CHECK-NEXT: i32x4.replace_lane 1{{$}}
-// CHECK-NEXT: local.get 2{{$}}
-// CHECK-NEXT: i32x4.replace_lane 2{{$}}
-// CHECK-NEXT: local.get 3{{$}}
-// CHECK-NEXT: i32x4.replace_lane 3{{$}}
-v128_t test_i32x4_make(int32_t c0, int32_t c1, int32_t c2, int32_t c3) {
-  return wasm_i32x4_make(c0, c1, c2, c3);
-}
-
-// CHECK-LABEL: test_i64x2_make:
-// CHECK:      local.get 0{{$}}
-// CHECK-NEXT: i64x2.splat{{$}}
-// CHECK-NEXT: local.get 1{{$}}
-// CHECK-NEXT: i64x2.replace_lane 1{{$}}
-v128_t test_i64x2_make(int64_t c0, int64_t c1) {
-  return wasm_i64x2_make(c0, c1);
-}
-
-// CHECK-LABEL: test_f32x4_make:
-// CHECK:      local.get 0{{$}}
-// CHECK-NEXT: f32x4.splat{{$}}
-// CHECK-NEXT: local.get 1{{$}}
-// CHECK-NEXT: f32x4.replace_lane 1{{$}}
-// CHECK-NEXT: local.get 2{{$}}
-// CHECK-NEXT: f32x4.replace_lane 2{{$}}
-// CHECK-NEXT: local.get 3{{$}}
-// CHECK-NEXT: f32x4.replace_lane 3{{$}}
-v128_t test_f32x4_make(float c0, float c1, float c2, float c3) {
-  return wasm_f32x4_make(c0, c1, c2, c3);
-}
-
-// CHECK-LABEL: test_f64x2_make:
-// CHECK:      local.get 0{{$}}
-// CHECK-NEXT: f64x2.splat{{$}}
-// CHECK-NEXT: local.get 1{{$}}
-// CHECK-NEXT: f64x2.replace_lane 1{{$}}
-v128_t test_f64x2_make(double c0, double c1) { return wasm_f64x2_make(c0, c1); }
-
-// CHECK-LABEL: test_i8x16_const:
-// CHECK: v128.const 50462976, 117835012, 185207048, 252579084{{$}}
-v128_t test_i8x16_const() {
-  return wasm_i8x16_const(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
-}
-
-// CHECK-LABEL: test_i16x8_const:
-// CHECK: v128.const 65536, 196610, 327684, 458758{{$}}
-v128_t test_i16x8_const() { return wasm_i16x8_const(0, 1, 2, 3, 4, 5, 6, 7); }
-
-// CHECK-LABEL: test_i32x4_const:
-// CHECK: v128.const 0, 1, 2, 3{{$}}
-v128_t test_i32x4_const() { return wasm_i32x4_const(0, 1, 2, 3); }
-
-// CHECK-LABEL: test_i64x2_const:
-// CHECK: v128.const 0, 0, 1, 0{{$}}
-v128_t test_i64x2_const() { return wasm_i64x2_const(0, 1); }
-
-// CHECK-LABEL: test_f32x4_const:
-// CHECK: v128.const 0, 1065353216, 1073741824, 1077936128{{$}}
-v128_t test_f32x4_const() { return wasm_f32x4_const(0, 1, 2, 3); }
-
-// CHECK-LABEL: test_f64x2_const:
-// CHECK: v128.const 0, 0, 0, 1072693248{{$}}
-v128_t test_f64x2_const() { return wasm_f64x2_const(0, 1); }
-
-// CHECK-LABEL: test_i8x16_splat:
-// CHECK: i8x16.splat{{$}}
-v128_t test_i8x16_splat(int8_t a) { return wasm_i8x16_splat(a); }
-
-// CHECK-LABEL: test_i8x16_extract_lane:
-// CHECK: i8x16.extract_lane_s 15{{$}}
-int8_t test_i8x16_extract_lane(v128_t a) {
-  return wasm_i8x16_extract_lane(a, 15);
-}
-
-// CHECK-LABEL: test_u8x16_extract_lane:
-// CHECK: i8x16.extract_lane_u 15{{$}}
-uint8_t test_u8x16_extract_lane(v128_t a) {
-  return wasm_u8x16_extract_lane(a, 15);
-}
-
-// CHECK-LABEL: test_i8x16_replace_lane:
-// CHECK: i8x16.replace_lane 15{{$}}
-v128_t test_i8x16_replace_lane(v128_t a, int8_t b) {
-  return wasm_i8x16_replace_lane(a, 15, b);
-}
-
-// CHECK-LABEL: test_i16x8_splat:
-// CHECK: i16x8.splat{{$}}
-v128_t test_i16x8_splat(int16_t a) { return wasm_i16x8_splat(a); }
-
-// CHECK-LABEL: test_i16x8_extract_lane:
-// CHECK: i16x8.extract_lane_s 7{{$}}
-int16_t test_i16x8_extract_lane(v128_t a) {
-  return wasm_i16x8_extract_lane(a, 7);
-}
-
-// CHECK-LABEL: test_u16x8_extract_lane:
-// CHECK: i16x8.extract_lane_u 7{{$}}
-uint16_t test_u16x8_extract_lane(v128_t a) {
-  return wasm_u16x8_extract_lane(a, 7);
-}
-
-// CHECK-LABEL: test_i16x8_replace_lane:
-// CHECK: i16x8.replace_lane 7{{$}}
-v128_t test_i16x8_replace_lane(v128_t a, int16_t b) {
-  return wasm_i16x8_replace_lane(a, 7, b);
-}
-
-// CHECK-LABEL: test_i32x4_splat:
-// CHECK: i32x4.splat{{$}}
-v128_t test_i32x4_splat(int32_t a) { return wasm_i32x4_splat(a); }
-
-// CHECK-LABEL: test_i32x4_extract_lane:
-// CHECK: i32x4.extract_lane 3{{$}}
-int32_t test_i32x4_extract_lane(v128_t a) {
-  return wasm_i32x4_extract_lane(a, 3);
-}
-
-// CHECK-LABEL: test_i32x4_replace_lane:
-// CHECK: i32x4.replace_lane 3{{$}}
-v128_t test_i32x4_replace_lane(v128_t a, int32_t b) {
-  return wasm_i32x4_replace_lane(a, 3, b);
-}
-
-// CHECK-LABEL: test_i64x2_splat:
-// CHECK: i64x2.splat{{$}}
-v128_t test_i64x2_splat(int64_t a) { return wasm_i64x2_splat(a); }
-
-// CHECK-LABEL: test_i64x2_extract_lane:
-// CHECK: i64x2.extract_lane 1{{$}}
-int64_t test_i64x2_extract_lane(v128_t a) {
-  return wasm_i64x2_extract_lane(a, 1);
-}
-
-// CHECK-LABEL: test_i64x2_replace_lane:
-// CHECK: i64x2.replace_lane 1{{$}}
-v128_t test_i64x2_replace_lane(v128_t a, int64_t b) {
-  return wasm_i64x2_replace_lane(a, 1, b);
-}
-
-// CHECK-LABEL: test_f32x4_splat:
-// CHECK: f32x4.splat{{$}}
-v128_t test_f32x4_splat(float a) { return wasm_f32x4_splat(a); }
-
-// CHECK-LABEL: test_f32x4_extract_lane:
-// CHECK: f32x4.extract_lane 3{{$}}
-float test_f32x4_extract_lane(v128_t a) {
-  return wasm_f32x4_extract_lane(a, 3);
-}
-
-// CHECK-LABEL: test_f32x4_replace_lane:
-// CHECK: f32x4.replace_lane 3{{$}}
-v128_t test_f32x4_replace_lane(v128_t a, float b) {
-  return wasm_f32x4_replace_lane(a, 3, b);
-}
-
-// CHECK-LABEL: test_f64x2_splat:
-// CHECK: f64x2.splat{{$}}
-v128_t test_f64x2_splat(double a) { return wasm_f64x2_splat(a); }
-
-// CHECK-LABEL: test_f64x2_extract_lane:
-// CHECK: f64x2.extract_lane 1{{$}}
-double test_f64x2_extract_lane(v128_t a) {
-  return wasm_f64x2_extract_lane(a, 1);
-}
-
-// CHECK-LABEL: test_f64x2_replace_lane:
-// CHECK: f64x2.replace_lane 1{{$}}
-v128_t test_f64x2_replace_lane(v128_t a, double b) {
-  return wasm_f64x2_replace_lane(a, 1, b);
-}
-
-// CHECK-LABEL: test_i8x16_eq:
-// CHECK: i8x16.eq{{$}}
-v128_t test_i8x16_eq(v128_t a, v128_t b) { return wasm_i8x16_eq(a, b); }
-
-// CHECK-LABEL: test_i8x16_ne:
-// CHECK: i8x16.ne{{$}}
-v128_t test_i8x16_ne(v128_t a, v128_t b) { return wasm_i8x16_ne(a, b); }
-
-// CHECK-LABEL: test_i8x16_lt:
-// CHECK: i8x16.lt_s{{$}}
-v128_t test_i8x16_lt(v128_t a, v128_t b) { return wasm_i8x16_lt(a, b); }
-
-// CHECK-LABEL: test_u8x16_lt:
-// CHECK: i8x16.lt_u{{$}}
-v128_t test_u8x16_lt(v128_t a, v128_t b) { return wasm_u8x16_lt(a, b); }
-
-// CHECK-LABEL: test_i8x16_gt:
-// CHECK: i8x16.gt_s{{$}}
-v128_t test_i8x16_gt(v128_t a, v128_t b) { return wasm_i8x16_gt(a, b); }
-
-// CHECK-LABEL: test_u8x16_gt:
-// CHECK: i8x16.gt_u{{$}}
-v128_t test_u8x16_gt(v128_t a, v128_t b) { return wasm_u8x16_gt(a, b); }
-
-// CHECK-LABEL: test_i8x16_le:
-// CHECK: i8x16.le_s{{$}}
-v128_t test_i8x16_le(v128_t a, v128_t b) { return wasm_i8x16_le(a, b); }
-
-// CHECK-LABEL: test_u8x16_le:
-// CHECK: i8x16.le_u{{$}}
-v128_t test_u8x16_le(v128_t a, v128_t b) { return wasm_u8x16_le(a, b); }
-
-// CHECK-LABEL: test_i8x16_ge:
-// CHECK: i8x16.ge_s{{$}}
-v128_t test_i8x16_ge(v128_t a, v128_t b) { return wasm_i8x16_ge(a, b); }
-
-// CHECK-LABEL: test_u8x16_ge:
-// CHECK: i8x16.ge_u{{$}}
-v128_t test_u8x16_ge(v128_t a, v128_t b) { return wasm_u8x16_ge(a, b); }
-
-// CHECK-LABEL: test_i16x8_eq:
-// CHECK: i16x8.eq{{$}}
-v128_t test_i16x8_eq(v128_t a, v128_t b) { return wasm_i16x8_eq(a, b); }
-
-// CHECK-LABEL: test_i16x8_ne:
-// CHECK: i16x8.ne{{$}}
-v128_t test_i16x8_ne(v128_t a, v128_t b) { return wasm_i16x8_ne(a, b); }
-
-// CHECK-LABEL: test_i16x8_lt:
-// CHECK: i16x8.lt_s{{$}}
-v128_t test_i16x8_lt(v128_t a, v128_t b) { return wasm_i16x8_lt(a, b); }
-
-// CHECK-LABEL: test_u16x8_lt:
-// CHECK: i16x8.lt_u{{$}}
-v128_t test_u16x8_lt(v128_t a, v128_t b) { return wasm_u16x8_lt(a, b); }
-
-// CHECK-LABEL: test_i16x8_gt:
-// CHECK: i16x8.gt_s{{$}}
-v128_t test_i16x8_gt(v128_t a, v128_t b) { return wasm_i16x8_gt(a, b); }
-
-// CHECK-LABEL: test_u16x8_gt:
-// CHECK: i16x8.gt_u{{$}}
-v128_t test_u16x8_gt(v128_t a, v128_t b) { return wasm_u16x8_gt(a, b); }
-
-// CHECK-LABEL: test_i16x8_le:
-// CHECK: i16x8.le_s{{$}}
-v128_t test_i16x8_le(v128_t a, v128_t b) { return wasm_i16x8_le(a, b); }
-
-// CHECK-LABEL: test_u16x8_le:
-// CHECK: i16x8.le_u{{$}}
-v128_t test_u16x8_le(v128_t a, v128_t b) { return wasm_u16x8_le(a, b); }
-
-// CHECK-LABEL: test_i16x8_ge:
-// CHECK: i16x8.ge_s{{$}}
-v128_t test_i16x8_ge(v128_t a, v128_t b) { return wasm_i16x8_ge(a, b); }
-
-// CHECK-LABEL: test_u16x8_ge:
-// CHECK: i16x8.ge_u{{$}}
-v128_t test_u16x8_ge(v128_t a, v128_t b) { return wasm_u16x8_ge(a, b); }
-
-// CHECK-LABEL: test_i32x4_eq:
-// CHECK: i32x4.eq{{$}}
-v128_t test_i32x4_eq(v128_t a, v128_t b) { return wasm_i32x4_eq(a, b); }
-
-// CHECK-LABEL: test_i32x4_ne:
-// CHECK: i32x4.ne{{$}}
-v128_t test_i32x4_ne(v128_t a, v128_t b) { return wasm_i32x4_ne(a, b); }
-
-// CHECK-LABEL: test_i32x4_lt:
-// CHECK: i32x4.lt_s{{$}}
-v128_t test_i32x4_lt(v128_t a, v128_t b) { return wasm_i32x4_lt(a, b); }
-
-// CHECK-LABEL: test_u32x4_lt:
-// CHECK: i32x4.lt_u{{$}}
-v128_t test_u32x4_lt(v128_t a, v128_t b) { return wasm_u32x4_lt(a, b); }
-
-// CHECK-LABEL: test_i32x4_gt:
-// CHECK: i32x4.gt_s{{$}}
-v128_t test_i32x4_gt(v128_t a, v128_t b) { return wasm_i32x4_gt(a, b); }
-
-// CHECK-LABEL: test_u32x4_gt:
-// CHECK: i32x4.gt_u{{$}}
-v128_t test_u32x4_gt(v128_t a, v128_t b) { return wasm_u32x4_gt(a, b); }
-
-// CHECK-LABEL: test_i32x4_le:
-// CHECK: i32x4.le_s{{$}}
-v128_t test_i32x4_le(v128_t a, v128_t b) { return wasm_i32x4_le(a, b); }
-
-// CHECK-LABEL: test_u32x4_le:
-// CHECK: i32x4.le_u{{$}}
-v128_t test_u32x4_le(v128_t a, v128_t b) { return wasm_u32x4_le(a, b); }
-
-// CHECK-LABEL: test_i32x4_ge:
-// CHECK: i32x4.ge_s{{$}}
-v128_t test_i32x4_ge(v128_t a, v128_t b) { return wasm_i32x4_ge(a, b); }
-
-// CHECK-LABEL: test_u32x4_ge:
-// CHECK: i32x4.ge_u{{$}}
-v128_t test_u32x4_ge(v128_t a, v128_t b) { return wasm_u32x4_ge(a, b); }
-
-// CHECK-LABEL: test_i64x2_eq:
-// CHECK: i64x2.eq{{$}}
-v128_t test_i64x2_eq(v128_t a, v128_t b) { return wasm_i64x2_eq(a, b); }
-
-// CHECK-LABEL: test_i64x2_ne:
-// CHECK: i64x2.ne{{$}}
-v128_t test_i64x2_ne(v128_t a, v128_t b) { return wasm_i64x2_ne(a, b); }
-
-// CHECK-LABEL: test_i64x2_lt:
-// CHECK: i64x2.lt_s{{$}}
-v128_t test_i64x2_lt(v128_t a, v128_t b) { return wasm_i64x2_lt(a, b); }
-
-// CHECK-LABEL: test_i64x2_gt:
-// CHECK: i64x2.gt_s{{$}}
-v128_t test_i64x2_gt(v128_t a, v128_t b) { return wasm_i64x2_gt(a, b); }
-
-// CHECK-LABEL: test_i64x2_le:
-// CHECK: i64x2.le_s{{$}}
-v128_t test_i64x2_le(v128_t a, v128_t b) { return wasm_i64x2_le(a, b); }
-
-// CHECK-LABEL: test_i64x2_ge:
-// CHECK: i64x2.ge_s{{$}}
-v128_t test_i64x2_ge(v128_t a, v128_t b) { return wasm_i64x2_ge(a, b); }
-
-// CHECK-LABEL: test_f32x4_eq:
-// CHECK: f32x4.eq{{$}}
-v128_t test_f32x4_eq(v128_t a, v128_t b) { return wasm_f32x4_eq(a, b); }
-
-// CHECK-LABEL: test_f32x4_ne:
-// CHECK: f32x4.ne{{$}}
-v128_t test_f32x4_ne(v128_t a, v128_t b) { return wasm_f32x4_ne(a, b); }
-
-// CHECK-LABEL: test_f32x4_lt:
-// CHECK: f32x4.lt{{$}}
-v128_t test_f32x4_lt(v128_t a, v128_t b) { return wasm_f32x4_lt(a, b); }
-
-// CHECK-LABEL: test_f32x4_gt:
-// CHECK: f32x4.gt{{$}}
-v128_t test_f32x4_gt(v128_t a, v128_t b) { return wasm_f32x4_gt(a, b); }
-
-// CHECK-LABEL: test_f32x4_le:
-// CHECK: f32x4.le{{$}}
-v128_t test_f32x4_le(v128_t a, v128_t b) { return wasm_f32x4_le(a, b); }
-
-// CHECK-LABEL: test_f32x4_ge:
-// CHECK: f32x4.ge{{$}}
-v128_t test_f32x4_ge(v128_t a, v128_t b) { return wasm_f32x4_ge(a, b); }
-
-// CHECK-LABEL: test_f64x2_eq:
-// CHECK: f64x2.eq{{$}}
-v128_t test_f64x2_eq(v128_t a, v128_t b) { return wasm_f64x2_eq(a, b); }
-
-// CHECK-LABEL: test_f64x2_ne:
-// CHECK: f64x2.ne{{$}}
-v128_t test_f64x2_ne(v128_t a, v128_t b) { return wasm_f64x2_ne(a, b); }
-
-// CHECK-LABEL: test_f64x2_lt:
-// CHECK: f64x2.lt{{$}}
-v128_t test_f64x2_lt(v128_t a, v128_t b) { return wasm_f64x2_lt(a, b); }
-
-// CHECK-LABEL: test_f64x2_gt:
-// CHECK: f64x2.gt{{$}}
-v128_t test_f64x2_gt(v128_t a, v128_t b) { return wasm_f64x2_gt(a, b); }
-
-// CHECK-LABEL: test_f64x2_le:
-// CHECK: f64x2.le{{$}}
-v128_t test_f64x2_le(v128_t a, v128_t b) { return wasm_f64x2_le(a, b); }
-
-// CHECK-LABEL: test_f64x2_ge:
-// CHECK: f64x2.ge{{$}}
-v128_t test_f64x2_ge(v128_t a, v128_t b) { return wasm_f64x2_ge(a, b); }
-
-// CHECK-LABEL: test_v128_not:
-// CHECK: v128.not{{$}}
-v128_t test_v128_not(v128_t a) { return wasm_v128_not(a); }
-
-// CHECK-LABEL: test_v128_and:
-// CHECK: v128.and{{$}}
-v128_t test_v128_and(v128_t a, v128_t b) { return wasm_v128_and(a, b); }
-
-// CHECK-LABEL: test_v128_or:
-// CHECK: v128.or{{$}}
-v128_t test_v128_or(v128_t a, v128_t b) { return wasm_v128_or(a, b); }
-
-// CHECK-LABEL: test_v128_xor:
-// CHECK: v128.xor{{$}}
-v128_t test_v128_xor(v128_t a, v128_t b) { return wasm_v128_xor(a, b); }
-
-// CHECK-LABEL: test_v128_andnot:
-// CHECK: v128.andnot{{$}}
-v128_t test_v128_andnot(v128_t a, v128_t b) { return wasm_v128_andnot(a, b); }
-
-// CHECK-LABEL: test_v128_any_true:
-// CHECK: v128.any_true{{$}}
-bool test_v128_any_true(v128_t a) { return wasm_v128_any_true(a); }
-
-// CHECK-LABEL: test_v128_bitselect:
-// CHECK: v128.bitselect{{$}}
-v128_t test_v128_bitselect(v128_t a, v128_t b, v128_t mask) {
-  return wasm_v128_bitselect(a, b, mask);
-}
-
-// CHECK-LABEL: test_i8x16_abs:
-// CHECK: i8x16.abs{{$}}
-v128_t test_i8x16_abs(v128_t a) { return wasm_i8x16_abs(a); }
-
-// CHECK-LABEL: test_i8x16_neg:
-// CHECK: i8x16.neg{{$}}
-v128_t test_i8x16_neg(v128_t a) { return wasm_i8x16_neg(a); }
-
-// CHECK-LABEL: test_i8x16_all_true:
-// CHECK: i8x16.all_true{{$}}
-bool test_i8x16_all_true(v128_t a) { return wasm_i8x16_all_true(a); }
-
-// CHECK-LABEL: test_i8x16_bitmask:
-// CHECK: i8x16.bitmask{{$}}
-int32_t test_i8x16_bitmask(v128_t a) { return wasm_i8x16_bitmask(a); }
-
-// CHECK-LABEL: test_i8x16_popcnt:
-// CHECK: i8x16.popcnt{{$}}
-v128_t test_i8x16_popcnt(v128_t a) { return wasm_i8x16_popcnt(a); }
-
-// CHECK-LABEL: test_i8x16_shl:
-// CHECK: i8x16.shl{{$}}
-v128_t test_i8x16_shl(v128_t a, int32_t b) { return wasm_i8x16_shl(a, b); }
-
-// CHECK-LABEL: test_i8x16_shr:
-// CHECK: i8x16.shr_s{{$}}
-v128_t test_i8x16_shr(v128_t a, int32_t b) { return wasm_i8x16_shr(a, b); }
-
-// CHECK-LABEL: test_u8x16_shr:
-// CHECK: i8x16.shr_u{{$}}
-v128_t test_u8x16_shr(v128_t a, int32_t b) { return wasm_u8x16_shr(a, b); }
-
-// CHECK-LABEL: test_i8x16_add:
-// CHECK: i8x16.add{{$}}
-v128_t test_i8x16_add(v128_t a, v128_t b) { return wasm_i8x16_add(a, b); }
-
-// CHECK-LABEL: test_i8x16_add_sat:
-// CHECK: i8x16.add_sat_s{{$}}
-v128_t test_i8x16_add_sat(v128_t a, v128_t b) {
-  return wasm_i8x16_add_sat(a, b);
-}
-
-// CHECK-LABEL: test_u8x16_add_sat:
-// CHECK: i8x16.add_sat_u{{$}}
-v128_t test_u8x16_add_sat(v128_t a, v128_t b) {
-  return wasm_u8x16_add_sat(a, b);
-}
-
-// CHECK-LABEL: test_i8x16_sub:
-// CHECK: i8x16.sub{{$}}
-v128_t test_i8x16_sub(v128_t a, v128_t b) { return wasm_i8x16_sub(a, b); }
-
-// CHECK-LABEL: test_i8x16_sub_sat:
-// CHECK: i8x16.sub_sat_s{{$}}
-v128_t test_i8x16_sub_sat(v128_t a, v128_t b) {
-  return wasm_i8x16_sub_sat(a, b);
-}
-
-// CHECK-LABEL: test_u8x16_sub_sat:
-// CHECK: i8x16.sub_sat_u{{$}}
-v128_t test_u8x16_sub_sat(v128_t a, v128_t b) {
-  return wasm_u8x16_sub_sat(a, b);
-}
-
-// CHECK-LABEL: test_i8x16_min:
-// CHECK: i8x16.min_s{{$}}
-v128_t test_i8x16_min(v128_t a, v128_t b) { return wasm_i8x16_min(a, b); }
-
-// CHECK-LABEL: test_u8x16_min:
-// CHECK: i8x16.min_u{{$}}
-v128_t test_u8x16_min(v128_t a, v128_t b) { return wasm_u8x16_min(a, b); }
-
-// CHECK-LABEL: test_i8x16_max:
-// CHECK: i8x16.max_s{{$}}
-v128_t test_i8x16_max(v128_t a, v128_t b) { return wasm_i8x16_max(a, b); }
-
-// CHECK-LABEL: test_u8x16_max:
-// CHECK: i8x16.max_u{{$}}
-v128_t test_u8x16_max(v128_t a, v128_t b) { return wasm_u8x16_max(a, b); }
-
-// CHECK-LABEL: test_u8x16_avgr:
-// CHECK: i8x16.avgr_u{{$}}
-v128_t test_u8x16_avgr(v128_t a, v128_t b) { return wasm_u8x16_avgr(a, b); }
-
-// CHECK-LABEL: test_i16x8_abs:
-// CHECK: i16x8.abs{{$}}
-v128_t test_i16x8_abs(v128_t a) { return wasm_i16x8_abs(a); }
-
-// CHECK-LABEL: test_i16x8_neg:
-// CHECK: i16x8.neg{{$}}
-v128_t test_i16x8_neg(v128_t a) { return wasm_i16x8_neg(a); }
-
-// CHECK-LABEL: test_i16x8_all_true:
-// CHECK: i16x8.all_true{{$}}
-bool test_i16x8_all_true(v128_t a) { return wasm_i16x8_all_true(a); }
-
-// CHECK-LABEL: test_i16x8_bitmask:
-// CHECK: i16x8.bitmask{{$}}
-int32_t test_i16x8_bitmask(v128_t a) { return wasm_i16x8_bitmask(a); }
-
-// CHECK-LABEL: test_i16x8_shl:
-// CHECK: i16x8.shl{{$}}
-v128_t test_i16x8_shl(v128_t a, int32_t b) { return wasm_i16x8_shl(a, b); }
-
-// CHECK-LABEL: test_i16x8_shr:
-// CHECK: i16x8.shr_s{{$}}
-v128_t test_i16x8_shr(v128_t a, int32_t b) { return wasm_i16x8_shr(a, b); }
-
-// CHECK-LABEL: test_u16x8_shr:
-// CHECK: i16x8.shr_u{{$}}
-v128_t test_u16x8_shr(v128_t a, int32_t b) { return wasm_u16x8_shr(a, b); }
-
-// CHECK-LABEL: test_i16x8_add:
-// CHECK: i16x8.add{{$}}
-v128_t test_i16x8_add(v128_t a, v128_t b) { return wasm_i16x8_add(a, b); }
-
-// CHECK-LABEL: test_i16x8_add_sat:
-// CHECK: i16x8.add_sat_s{{$}}
-v128_t test_i16x8_add_sat(v128_t a, v128_t b) {
-  return wasm_i16x8_add_sat(a, b);
-}
-
-// CHECK-LABEL: test_u16x8_add_sat:
-// CHECK: i16x8.add_sat_u{{$}}
-v128_t test_u16x8_add_sat(v128_t a, v128_t b) {
-  return wasm_u16x8_add_sat(a, b);
-}
-
-// CHECK-LABEL: test_i16x8_sub:
-// CHECK: i16x8.sub{{$}}
-v128_t test_i16x8_sub(v128_t a, v128_t b) { return wasm_i16x8_sub(a, b); }
-
-// CHECK-LABEL: test_i16x8_sub_sat:
-// CHECK: i16x8.sub_sat_s{{$}}
-v128_t test_i16x8_sub_sat(v128_t a, v128_t b) {
-  return wasm_i16x8_sub_sat(a, b);
-}
-
-// CHECK-LABEL: test_u16x8_sub_sat:
-// CHECK: i16x8.sub_sat_u{{$}}
-v128_t test_u16x8_sub_sat(v128_t a, v128_t b) {
-  return wasm_u16x8_sub_sat(a, b);
-}
-
-// CHECK-LABEL: test_i16x8_mul:
-// CHECK: i16x8.mul{{$}}
-v128_t test_i16x8_mul(v128_t a, v128_t b) { return wasm_i16x8_mul(a, b); }
-
-// CHECK-LABEL: test_i16x8_min:
-// CHECK: i16x8.min_s{{$}}
-v128_t test_i16x8_min(v128_t a, v128_t b) { return wasm_i16x8_min(a, b); }
-
-// CHECK-LABEL: test_u16x8_min:
-// CHECK: i16x8.min_u{{$}}
-v128_t test_u16x8_min(v128_t a, v128_t b) { return wasm_u16x8_min(a, b); }
-
-// CHECK-LABEL: test_i16x8_max:
-// CHECK: i16x8.max_s{{$}}
-v128_t test_i16x8_max(v128_t a, v128_t b) { return wasm_i16x8_max(a, b); }
-
-// CHECK-LABEL: test_u16x8_max:
-// CHECK: i16x8.max_u{{$}}
-v128_t test_u16x8_max(v128_t a, v128_t b) { return wasm_u16x8_max(a, b); }
-
-// CHECK-LABEL: test_u16x8_avgr:
-// CHECK: i16x8.avgr_u{{$}}
-v128_t test_u16x8_avgr(v128_t a, v128_t b) { return wasm_u16x8_avgr(a, b); }
-
-// CHECK-LABEL: test_i32x4_abs:
-// CHECK: i32x4.abs{{$}}
-v128_t test_i32x4_abs(v128_t a) { return wasm_i32x4_abs(a); }
-
-// CHECK-LABEL: test_i32x4_neg:
-// CHECK: i32x4.neg{{$}}
-v128_t test_i32x4_neg(v128_t a) { return wasm_i32x4_neg(a); }
-
-// CHECK-LABEL: test_i32x4_all_true:
-// CHECK: i32x4.all_true{{$}}
-bool test_i32x4_all_true(v128_t a) { return wasm_i32x4_all_true(a); }
-
-// CHECK-LABEL: test_i32x4_bitmask:
-// CHECK: i32x4.bitmask{{$}}
-int32_t test_i32x4_bitmask(v128_t a) { return wasm_i32x4_bitmask(a); }
-
-// CHECK-LABEL: test_i32x4_shl:
-// CHECK: i32x4.shl{{$}}
-v128_t test_i32x4_shl(v128_t a, int32_t b) { return wasm_i32x4_shl(a, b); }
-
-// CHECK-LABEL: test_i32x4_shr:
-// CHECK: i32x4.shr_s{{$}}
-v128_t test_i32x4_shr(v128_t a, int32_t b) { return wasm_i32x4_shr(a, b); }
-
-// CHECK-LABEL: test_u32x4_shr:
-// CHECK: i32x4.shr_u{{$}}
-v128_t test_u32x4_shr(v128_t a, int32_t b) { return wasm_u32x4_shr(a, b); }
-
-// CHECK-LABEL: test_i32x4_add:
-// CHECK: i32x4.add{{$}}
-v128_t test_i32x4_add(v128_t a, v128_t b) { return wasm_i32x4_add(a, b); }
-
-// CHECK-LABEL: test_i32x4_sub:
-// CHECK: i32x4.sub{{$}}
-v128_t test_i32x4_sub(v128_t a, v128_t b) { return wasm_i32x4_sub(a, b); }
-
-// CHECK-LABEL: test_i32x4_mul:
-// CHECK: i32x4.mul{{$}}
-v128_t test_i32x4_mul(v128_t a, v128_t b) { return wasm_i32x4_mul(a, b); }
-
-// CHECK-LABEL: test_i32x4_min:
-// CHECK: i32x4.min_s{{$}}
-v128_t test_i32x4_min(v128_t a, v128_t b) { return wasm_i32x4_min(a, b); }
-
-// CHECK-LABEL: test_u32x4_min:
-// CHECK: i32x4.min_u{{$}}
-v128_t test_u32x4_min(v128_t a, v128_t b) { return wasm_u32x4_min(a, b); }
-
-// CHECK-LABEL: test_i32x4_max:
-// CHECK: i32x4.max_s{{$}}
-v128_t test_i32x4_max(v128_t a, v128_t b) { return wasm_i32x4_max(a, b); }
-
-// CHECK-LABEL: test_u32x4_max:
-// CHECK: i32x4.max_u{{$}}
-v128_t test_u32x4_max(v128_t a, v128_t b) { return wasm_u32x4_max(a, b); }
-
-// CHECK-LABEL: test_i32x4_dot_i16x8:
-// CHECK: i32x4.dot_i16x8_s{{$}}
-v128_t test_i32x4_dot_i16x8(v128_t a, v128_t b) {
-  return wasm_i32x4_dot_i16x8(a, b);
-}
-
-// CHECK-LABEL: test_i64x2_abs:
-// CHECK: i64x2.abs{{$}}
-v128_t test_i64x2_abs(v128_t a) { return wasm_i64x2_abs(a); }
-
-// CHECK-LABEL: test_i64x2_neg:
-// CHECK: i64x2.neg{{$}}
-v128_t test_i64x2_neg(v128_t a) { return wasm_i64x2_neg(a); }
-
-// CHECK-LABEL: test_i64x2_all_true:
-// CHECK: i64x2.all_true{{$}}
-bool test_i64x2_all_true(v128_t a) { return wasm_i64x2_all_true(a); }
-
-// CHECK-LABEL: test_i64x2_bitmask:
-// CHECK: i64x2.bitmask{{$}}
-int32_t test_i64x2_bitmask(v128_t a) { return wasm_i64x2_bitmask(a); }
-
-// CHECK-LABEL: test_i64x2_shl:
-// CHECK: i64x2.shl{{$}}
-v128_t test_i64x2_shl(v128_t a, int32_t b) { return wasm_i64x2_shl(a, b); }
-
-// CHECK-LABEL: test_i64x2_shr:
-// CHECK: i64x2.shr_s{{$}}
-v128_t test_i64x2_shr(v128_t a, int32_t b) { return wasm_i64x2_shr(a, b); }
-
-// CHECK-LABEL: test_u64x2_shr:
-// CHECK: i64x2.shr_u{{$}}
-v128_t test_u64x2_shr(v128_t a, int32_t b) { return wasm_u64x2_shr(a, b); }
-
-// CHECK-LABEL: test_i64x2_add:
-// CHECK: i64x2.add{{$}}
-v128_t test_i64x2_add(v128_t a, v128_t b) { return wasm_i64x2_add(a, b); }
-
-// CHECK-LABEL: test_i64x2_sub:
-// CHECK: i64x2.sub{{$}}
-v128_t test_i64x2_sub(v128_t a, v128_t b) { return wasm_i64x2_sub(a, b); }
-
-// CHECK-LABEL: test_i64x2_mul:
-// CHECK: i64x2.mul{{$}}
-v128_t test_i64x2_mul(v128_t a, v128_t b) { return wasm_i64x2_mul(a, b); }
-
-// CHECK-LABEL: test_f32x4_abs:
-// CHECK: f32x4.abs{{$}}
-v128_t test_f32x4_abs(v128_t a) { return wasm_f32x4_abs(a); }
-
-// CHECK-LABEL: test_f32x4_neg:
-// CHECK: f32x4.neg{{$}}
-v128_t test_f32x4_neg(v128_t a) { return wasm_f32x4_neg(a); }
-
-// CHECK-LABEL: test_f32x4_sqrt:
-// CHECK: f32x4.sqrt{{$}}
-v128_t test_f32x4_sqrt(v128_t a) { return wasm_f32x4_sqrt(a); }
-
-// CHECK-LABEL: test_f32x4_ceil:
-// CHECK: f32x4.ceil{{$}}
-v128_t test_f32x4_ceil(v128_t a) { return wasm_f32x4_ceil(a); }
-
-// CHECK-LABEL: test_f32x4_floor:
-// CHECK: f32x4.floor{{$}}
-v128_t test_f32x4_floor(v128_t a) { return wasm_f32x4_floor(a); }
-
-// CHECK-LABEL: test_f32x4_trunc:
-// CHECK: f32x4.trunc{{$}}
-v128_t test_f32x4_trunc(v128_t a) { return wasm_f32x4_trunc(a); }
-
-// CHECK-LABEL: test_f32x4_nearest:
-// CHECK: f32x4.nearest{{$}}
-v128_t test_f32x4_nearest(v128_t a) { return wasm_f32x4_nearest(a); }
-
-// CHECK-LABEL: test_f32x4_add:
-// CHECK: f32x4.add{{$}}
-v128_t test_f32x4_add(v128_t a, v128_t b) { return wasm_f32x4_add(a, b); }
-
-// CHECK-LABEL: test_f32x4_sub:
-// CHECK: f32x4.sub{{$}}
-v128_t test_f32x4_sub(v128_t a, v128_t b) { return wasm_f32x4_sub(a, b); }
-
-// CHECK-LABEL: test_f32x4_mul:
-// CHECK: f32x4.mul{{$}}
-v128_t test_f32x4_mul(v128_t a, v128_t b) { return wasm_f32x4_mul(a, b); }
-
-// CHECK-LABEL: test_f32x4_div:
-// CHECK: f32x4.div{{$}}
-v128_t test_f32x4_div(v128_t a, v128_t b) { return wasm_f32x4_div(a, b); }
-
-// CHECK-LABEL: test_f32x4_min:
-// CHECK: f32x4.min{{$}}
-v128_t test_f32x4_min(v128_t a, v128_t b) { return wasm_f32x4_min(a, b); }
-
-// CHECK-LABEL: test_f32x4_max:
-// CHECK: f32x4.max{{$}}
-v128_t test_f32x4_max(v128_t a, v128_t b) { return wasm_f32x4_max(a, b); }
-
-// CHECK-LABEL: test_f32x4_pmin:
-// CHECK: f32x4.pmin{{$}}
-v128_t test_f32x4_pmin(v128_t a, v128_t b) { return wasm_f32x4_pmin(a, b); }
-
-// CHECK-LABEL: test_f32x4_pmax:
-// CHECK: f32x4.pmax{{$}}
-v128_t test_f32x4_pmax(v128_t a, v128_t b) { return wasm_f32x4_pmax(a, b); }
-
-// CHECK-LABEL: test_f64x2_abs:
-// CHECK: f64x2.abs{{$}}
-v128_t test_f64x2_abs(v128_t a) { return wasm_f64x2_abs(a); }
-
-// CHECK-LABEL: test_f64x2_neg:
-// CHECK: f64x2.neg{{$}}
-v128_t test_f64x2_neg(v128_t a) { return wasm_f64x2_neg(a); }
-
-// CHECK-LABEL: test_f64x2_sqrt:
-// CHECK: f64x2.sqrt{{$}}
-v128_t test_f64x2_sqrt(v128_t a) { return wasm_f64x2_sqrt(a); }
-
-// CHECK-LABEL: test_f64x2_ceil:
-// CHECK: f64x2.ceil{{$}}
-v128_t test_f64x2_ceil(v128_t a) { return wasm_f64x2_ceil(a); }
-
-// CHECK-LABEL: test_f64x2_floor:
-// CHECK: f64x2.floor{{$}}
-v128_t test_f64x2_floor(v128_t a) { return wasm_f64x2_floor(a); }
-
-// CHECK-LABEL: test_f64x2_trunc:
-// CHECK: f64x2.trunc{{$}}
-v128_t test_f64x2_trunc(v128_t a) { return wasm_f64x2_trunc(a); }
-
-// CHECK-LABEL: test_f64x2_nearest:
-// CHECK: f64x2.nearest{{$}}
-v128_t test_f64x2_nearest(v128_t a) { return wasm_f64x2_nearest(a); }
-
-// CHECK-LABEL: test_f64x2_add:
-// CHECK: f64x2.add{{$}}
-v128_t test_f64x2_add(v128_t a, v128_t b) { return wasm_f64x2_add(a, b); }
-
-// CHECK-LABEL: test_f64x2_sub:
-// CHECK: f64x2.sub{{$}}
-v128_t test_f64x2_sub(v128_t a, v128_t b) { return wasm_f64x2_sub(a, b); }
-
-// CHECK-LABEL: test_f64x2_mul:
-// CHECK: f64x2.mul{{$}}
-v128_t test_f64x2_mul(v128_t a, v128_t b) { return wasm_f64x2_mul(a, b); }
-
-// CHECK-LABEL: test_f64x2_div:
-// CHECK: f64x2.div{{$}}
-v128_t test_f64x2_div(v128_t a, v128_t b) { return wasm_f64x2_div(a, b); }
-
-// CHECK-LABEL: test_f64x2_min:
-// CHECK: f64x2.min{{$}}
-v128_t test_f64x2_min(v128_t a, v128_t b) { return wasm_f64x2_min(a, b); }
-
-// CHECK-LABEL: test_f64x2_max:
-// CHECK: f64x2.max{{$}}
-v128_t test_f64x2_max(v128_t a, v128_t b) { return wasm_f64x2_max(a, b); }
-
-// CHECK-LABEL: test_f64x2_pmin:
-// CHECK: f64x2.pmin{{$}}
-v128_t test_f64x2_pmin(v128_t a, v128_t b) { return wasm_f64x2_pmin(a, b); }
-
-// CHECK-LABEL: test_f64x2_pmax:
-// CHECK: f64x2.pmax{{$}}
-v128_t test_f64x2_pmax(v128_t a, v128_t b) { return wasm_f64x2_pmax(a, b); }
-
-// CHECK-LABEL: test_i32x4_trunc_sat_f32x4:
-// CHECK: i32x4.trunc_sat_f32x4_s{{$}}
-v128_t test_i32x4_trunc_sat_f32x4(v128_t a) {
-  return wasm_i32x4_trunc_sat_f32x4(a);
-}
-
-// CHECK-LABEL: test_u32x4_trunc_sat_f32x4:
-// CHECK: i32x4.trunc_sat_f32x4_u{{$}}
-v128_t test_u32x4_trunc_sat_f32x4(v128_t a) {
-  return wasm_u32x4_trunc_sat_f32x4(a);
-}
-
-// CHECK-LABEL: test_f32x4_convert_i32x4:
-// CHECK: f32x4.convert_i32x4_s{{$}}
-v128_t test_f32x4_convert_i32x4(v128_t a) {
-  return wasm_f32x4_convert_i32x4(a);
-}
-
-// CHECK-LABEL: test_f32x4_convert_u32x4:
-// CHECK: f32x4.convert_i32x4_u{{$}}
-v128_t test_f32x4_convert_u32x4(v128_t a) {
-  return wasm_f32x4_convert_u32x4(a);
-}
-
-// CHECK-LABEL: test_f64x2_convert_low_i32x4:
-// CHECK: f64x2.convert_low_i32x4_s{{$}}
-v128_t test_f64x2_convert_low_i32x4(v128_t a) {
-  return wasm_f64x2_convert_low_i32x4(a);
-}
-
-// CHECK-LABEL: test_f64x2_convert_low_u32x4:
-// CHECK: f64x2.convert_low_i32x4_u{{$}}
-v128_t test_f64x2_convert_low_u32x4(v128_t a) {
-  return wasm_f64x2_convert_low_u32x4(a);
-}
-
-// CHECK-LABEL: test_i32x4_trunc_sat_f64x2_zero:
-// CHECK: i32x4.trunc_sat_f64x2_s_zero{{$}}
-v128_t test_i32x4_trunc_sat_f64x2_zero(v128_t a) {
-  return wasm_i32x4_trunc_sat_f64x2_zero(a);
-}
-
-// CHECK-LABEL: test_u32x4_trunc_sat_f64x2_zero:
-// CHECK: i32x4.trunc_sat_f64x2_u_zero{{$}}
-v128_t test_u32x4_trunc_sat_f64x2_zero(v128_t a) {
-  return wasm_u32x4_trunc_sat_f64x2_zero(a);
-}
-
-// CHECK-LABEL: test_f32x4_demote_f64x2_zero:
-// CHECK: f32x4.demote_f64x2_zero{{$}}
-v128_t test_f32x4_demote_f64x2_zero(v128_t a) {
-  return wasm_f32x4_demote_f64x2_zero(a);
-}
-
-// CHECK-LABEL: test_f64x2_promote_low_f32x4:
-// CHECK: f64x2.promote_low_f32x4{{$}}
-v128_t test_f64x2_promote_low_f32x4(v128_t a) {
-  return wasm_f64x2_promote_low_f32x4(a);
-}
-
-// CHECK-LABEL: test_i8x16_shuffle:
-// CHECK: i8x16.shuffle 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,
-// 0{{$}}
-v128_t test_i8x16_shuffle(v128_t a, v128_t b) {
-  return wasm_i8x16_shuffle(a, b, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3,
-                            2, 1, 0);
-}
-
-// CHECK-LABEL: test_i16x8_shuffle:
-// CHECK: i8x16.shuffle 14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 0,
-// 1{{$}}
-v128_t test_i16x8_shuffle(v128_t a, v128_t b) {
-  return wasm_i16x8_shuffle(a, b, 7, 6, 5, 4, 3, 2, 1, 0);
-}
-
-// CHECK-LABEL: test_i32x4_shuffle:
-// CHECK: i8x16.shuffle 12, 13, 14, 15, 8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2,
-// 3{{$}}
-v128_t test_i32x4_shuffle(v128_t a, v128_t b) {
-  return wasm_i32x4_shuffle(a, b, 3, 2, 1, 0);
-}
-
-// CHECK-LABEL: test_i64x2_shuffle:
-// CHECK: i8x16.shuffle 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6,
-// 7{{$}}
-v128_t test_i64x2_shuffle(v128_t a, v128_t b) {
-  return wasm_i64x2_shuffle(a, b, 1, 0);
-}
-
-// CHECK-LABEL: test_i8x16_swizzle:
-// CHECK: i8x16.swizzle{{$}}
-v128_t test_i8x16_swizzle(v128_t a, v128_t b) {
-  return wasm_i8x16_swizzle(a, b);
-}
-
-// CHECK-LABEL: test_i8x16_narrow_i16x8:
-// CHECK: i8x16.narrow_i16x8_s{{$}}
-v128_t test_i8x16_narrow_i16x8(v128_t a, v128_t b) {
-  return wasm_i8x16_narrow_i16x8(a, b);
-}
-
-// CHECK-LABEL: test_u8x16_narrow_i16x8:
-// CHECK: i8x16.narrow_i16x8_u{{$}}
-v128_t test_u8x16_narrow_i16x8(v128_t a, v128_t b) {
-  return wasm_u8x16_narrow_i16x8(a, b);
-}
-
-// CHECK-LABEL: test_i16x8_narrow_i32x4:
-// CHECK: i16x8.narrow_i32x4_s{{$}}
-v128_t test_i16x8_narrow_i32x4(v128_t a, v128_t b) {
-  return wasm_i16x8_narrow_i32x4(a, b);
-}
-
-// CHECK-LABEL: test_u16x8_narrow_i32x4:
-// CHECK: i16x8.narrow_i32x4_u{{$}}
-v128_t test_u16x8_narrow_i32x4(v128_t a, v128_t b) {
-  return wasm_u16x8_narrow_i32x4(a, b);
-}
-
-// CHECK-LABEL: test_i16x8_extend_low_i8x16:
-// CHECK: i16x8.extend_low_i8x16_s{{$}}
-v128_t test_i16x8_extend_low_i8x16(v128_t a) {
-  return wasm_i16x8_extend_low_i8x16(a);
-}
-
-// CHECK-LABEL: test_i16x8_extend_high_i8x16:
-// CHECK: i16x8.extend_high_i8x16_s{{$}}
-v128_t test_i16x8_extend_high_i8x16(v128_t a) {
-  return wasm_i16x8_extend_high_i8x16(a);
-}
-
-// CHECK-LABEL: test_u16x8_extend_low_u8x16:
-// CHECK: i16x8.extend_low_i8x16_u{{$}}
-v128_t test_u16x8_extend_low_u8x16(v128_t a) {
-  return wasm_u16x8_extend_low_u8x16(a);
-}
-
-// CHECK-LABEL: test_u16x8_extend_high_u8x16:
-// CHECK: i16x8.extend_high_i8x16_u{{$}}
-v128_t test_u16x8_extend_high_u8x16(v128_t a) {
-  return wasm_u16x8_extend_high_u8x16(a);
-}
-
-// CHECK-LABEL: test_i32x4_extend_low_i16x8:
-// CHECK: i32x4.extend_low_i16x8_s{{$}}
-v128_t test_i32x4_extend_low_i16x8(v128_t a) {
-  return wasm_i32x4_extend_low_i16x8(a);
-}
-
-// CHECK-LABEL: test_i32x4_extend_high_i16x8:
-// CHECK: i32x4.extend_high_i16x8_s{{$}}
-v128_t test_i32x4_extend_high_i16x8(v128_t a) {
-  return wasm_i32x4_extend_high_i16x8(a);
-}
-
-// CHECK-LABEL: test_u32x4_extend_low_u16x8:
-// CHECK: i32x4.extend_low_i16x8_u{{$}}
-v128_t test_u32x4_extend_low_u16x8(v128_t a) {
-  return wasm_u32x4_extend_low_u16x8(a);
-}
-
-// CHECK-LABEL: test_u32x4_extend_high_u16x8:
-// CHECK: i32x4.extend_high_i16x8_u{{$}}
-v128_t test_u32x4_extend_high_u16x8(v128_t a) {
-  return wasm_u32x4_extend_high_u16x8(a);
-}
-
-// CHECK-LABEL: test_i64x2_extend_low_i32x4:
-// CHECK: i64x2.extend_low_i32x4_s{{$}}
-v128_t test_i64x2_extend_low_i32x4(v128_t a) {
-  return wasm_i64x2_extend_low_i32x4(a);
-}
-
-// CHECK-LABEL: test_i64x2_extend_high_i32x4:
-// CHECK: i64x2.extend_high_i32x4_s{{$}}
-v128_t test_i64x2_extend_high_i32x4(v128_t a) {
-  return wasm_i64x2_extend_high_i32x4(a);
-}
-
-// CHECK-LABEL: test_u64x2_extend_low_u32x4:
-// CHECK: i64x2.extend_low_i32x4_u{{$}}
-v128_t test_u64x2_extend_low_u32x4(v128_t a) {
-  return wasm_u64x2_extend_low_u32x4(a);
-}
-
-// CHECK-LABEL: test_u64x2_extend_high_u32x4:
-// CHECK: i64x2.extend_high_i32x4_u{{$}}
-v128_t test_u64x2_extend_high_u32x4(v128_t a) {
-  return wasm_u64x2_extend_high_u32x4(a);
-}
-
-// CHECK-LABEL: test_i16x8_extadd_pairwise_i8x16:
-// CHECK: i16x8.extadd_pairwise_i8x16_s{{$}}
-v128_t test_i16x8_extadd_pairwise_i8x16(v128_t a) {
-  return wasm_i16x8_extadd_pairwise_i8x16(a);
-}
-
-// CHECK-LABEL: test_u16x8_extadd_pairwise_u8x16:
-// CHECK: i16x8.extadd_pairwise_i8x16_u{{$}}
-v128_t test_u16x8_extadd_pairwise_u8x16(v128_t a) {
-  return wasm_u16x8_extadd_pairwise_u8x16(a);
-}
-
-// CHECK-LABEL: test_i32x4_extadd_pairwise_i16x8:
-// CHECK: i32x4.extadd_pairwise_i16x8_s{{$}}
-v128_t test_i32x4_extadd_pairwise_i16x8(v128_t a) {
-  return wasm_i32x4_extadd_pairwise_i16x8(a);
-}
-
-// CHECK-LABEL: test_u32x4_extadd_pairwise_u16x8:
-// CHECK: i32x4.extadd_pairwise_i16x8_u{{$}}
-v128_t test_u32x4_extadd_pairwise_u16x8(v128_t a) {
-  return wasm_u32x4_extadd_pairwise_u16x8(a);
-}
-
-// CHECK-LABEL: test_i16x8_extmul_low_i8x16:
-// CHECK: i16x8.extmul_low_i8x16_s{{$}}
-v128_t test_i16x8_extmul_low_i8x16(v128_t a, v128_t b) {
-  return wasm_i16x8_extmul_low_i8x16(a, b);
-}
-
-// CHECK-LABEL: test_i16x8_extmul_high_i8x16:
-// CHECK: i16x8.extmul_high_i8x16_s{{$}}
-v128_t test_i16x8_extmul_high_i8x16(v128_t a, v128_t b) {
-  return wasm_i16x8_extmul_high_i8x16(a, b);
-}
-
-// CHECK-LABEL: test_u16x8_extmul_low_u8x16:
-// CHECK: i16x8.extmul_low_i8x16_u{{$}}
-v128_t test_u16x8_extmul_low_u8x16(v128_t a, v128_t b) {
-  return wasm_u16x8_extmul_low_u8x16(a, b);
-}
-
-// CHECK-LABEL: test_u16x8_extmul_high_u8x16:
-// CHECK: i16x8.extmul_high_i8x16_u{{$}}
-v128_t test_u16x8_extmul_high_u8x16(v128_t a, v128_t b) {
-  return wasm_u16x8_extmul_high_u8x16(a, b);
-}
-
-// CHECK-LABEL: test_i32x4_extmul_low_i16x8:
-// CHECK: i32x4.extmul_low_i16x8_s{{$}}
-v128_t test_i32x4_extmul_low_i16x8(v128_t a, v128_t b) {
-  return wasm_i32x4_extmul_low_i16x8(a, b);
-}
-
-// CHECK-LABEL: test_i32x4_extmul_high_i16x8:
-// CHECK: i32x4.extmul_high_i16x8_s{{$}}
-v128_t test_i32x4_extmul_high_i16x8(v128_t a, v128_t b) {
-  return wasm_i32x4_extmul_high_i16x8(a, b);
-}
-
-// CHECK-LABEL: test_u32x4_extmul_low_u16x8:
-// CHECK: i32x4.extmul_low_i16x8_u{{$}}
-v128_t test_u32x4_extmul_low_u16x8(v128_t a, v128_t b) {
-  return wasm_u32x4_extmul_low_u16x8(a, b);
-}
-
-// CHECK-LABEL: test_u32x4_extmul_high_u16x8:
-// CHECK: i32x4.extmul_high_i16x8_u{{$}}
-v128_t test_u32x4_extmul_high_u16x8(v128_t a, v128_t b) {
-  return wasm_u32x4_extmul_high_u16x8(a, b);
-}
-
-// CHECK-LABEL: test_i64x2_extmul_low_i32x4:
-// CHECK: i64x2.extmul_low_i32x4_s{{$}}
-v128_t test_i64x2_extmul_low_i32x4(v128_t a, v128_t b) {
-  return wasm_i64x2_extmul_low_i32x4(a, b);
-}
-
-// CHECK-LABEL: test_i64x2_extmul_high_i32x4:
-// CHECK: i64x2.extmul_high_i32x4_s{{$}}
-v128_t test_i64x2_extmul_high_i32x4(v128_t a, v128_t b) {
-  return wasm_i64x2_extmul_high_i32x4(a, b);
-}
-
-// CHECK-LABEL: test_u64x2_extmul_low_u32x4:
-// CHECK: i64x2.extmul_low_i32x4_u{{$}}
-v128_t test_u64x2_extmul_low_u32x4(v128_t a, v128_t b) {
-  return wasm_u64x2_extmul_low_u32x4(a, b);
-}
-
-// CHECK-LABEL: test_u64x2_extmul_high_u32x4:
-// CHECK: i64x2.extmul_high_i32x4_u{{$}}
-v128_t test_u64x2_extmul_high_u32x4(v128_t a, v128_t b) {
-  return wasm_u64x2_extmul_high_u32x4(a, b);
-}
-
-// CHECK-LABEL: test_i16x8_q15mulr_sat:
-// CHECK: i16x8.q15mulr_sat_s{{$}}
-v128_t test_i16x8_q15mulr_sat(v128_t a, v128_t b) {
-  return wasm_i16x8_q15mulr_sat(a, b);
-}
-
-// CHECK-LABEL: test_f32x4_relaxed_madd:
-// CHECK: f32x4.relaxed_madd{{$}}
-v128_t test_f32x4_relaxed_madd(v128_t a, v128_t b, v128_t c) {
-  return wasm_f32x4_relaxed_madd(a, b, c);
-}
-
-// CHECK-LABEL: test_f32x4_relaxed_nmadd:
-// CHECK: f32x4.relaxed_nmadd{{$}}
-v128_t test_f32x4_relaxed_nmadd(v128_t a, v128_t b, v128_t c) {
-  return wasm_f32x4_relaxed_nmadd(a, b, c);
-}
-
-// CHECK-LABEL: test_f64x2_relaxed_madd:
-// CHECK: f64x2.relaxed_madd{{$}}
-v128_t test_f64x2_relaxed_madd(v128_t a, v128_t b, v128_t c) {
-  return wasm_f64x2_relaxed_madd(a, b, c);
-}
-
-// CHECK-LABEL: test_f64x2_relaxed_nmadd:
-// CHECK: f64x2.relaxed_nmadd{{$}}
-v128_t test_f64x2_relaxed_nmadd(v128_t a, v128_t b, v128_t c) {
-  return wasm_f64x2_relaxed_nmadd(a, b, c);
-}
-
-// CHECK-LABEL: test_i8x16_relaxed_laneselect:
-// CHECK: i8x16.relaxed_laneselect{{$}}
-v128_t test_i8x16_relaxed_laneselect(v128_t a, v128_t b, v128_t m) {
-  return wasm_i8x16_relaxed_laneselect(a, b, m);
-}
-
-// CHECK-LABEL: test_i16x8_relaxed_laneselect:
-// CHECK: i16x8.relaxed_laneselect{{$}}
-v128_t test_i16x8_relaxed_laneselect(v128_t a, v128_t b, v128_t m) {
-  return wasm_i16x8_relaxed_laneselect(a, b, m);
-}
-
-// CHECK-LABEL: test_i32x4_relaxed_laneselect:
-// CHECK: i32x4.relaxed_laneselect{{$}}
-v128_t test_i32x4_relaxed_laneselect(v128_t a, v128_t b, v128_t m) {
-  return wasm_i32x4_relaxed_laneselect(a, b, m);
-}
-
-// CHECK-LABEL: test_i64x2_relaxed_laneselect:
-// CHECK: i64x2.relaxed_laneselect{{$}}
-v128_t test_i64x2_relaxed_laneselect(v128_t a, v128_t b, v128_t m) {
-  return wasm_i64x2_relaxed_laneselect(a, b, m);
-}
-
-// CHECK-LABEL: test_i8x16_relaxed_swizzle:
-// CHECK: i8x16.relaxed_swizzle{{$}}
-v128_t test_i8x16_relaxed_swizzle(v128_t a, v128_t s) {
-  return wasm_i8x16_relaxed_swizzle(a, s);
-}
-
-// CHECK-LABEL: test_f32x4_relaxed_min:
-// CHECK: f32x4.relaxed_min{{$}}
-v128_t test_f32x4_relaxed_min(v128_t a, v128_t b) {
-  return wasm_f32x4_relaxed_min(a, b);
-}
-
-// CHECK-LABEL: test_f32x4_relaxed_max:
-// CHECK: f32x4.relaxed_max{{$}}
-v128_t test_f32x4_relaxed_max(v128_t a, v128_t b) {
-  return wasm_f32x4_relaxed_max(a, b);
-}
-
-// CHECK-LABEL: test_f64x2_relaxed_min:
-// CHECK: f64x2.relaxed_min{{$}}
-v128_t test_f64x2_relaxed_min(v128_t a, v128_t b) {
-  return wasm_f64x2_relaxed_min(a, b);
-}
-
-// CHECK-LABEL: test_f64x2_relaxed_max:
-// CHECK: f64x2.relaxed_max
-v128_t test_f64x2_relaxed_max(v128_t a, v128_t b) {
-  return wasm_f64x2_relaxed_max(a, b);
-}
-
-// CHECK-LABEL: test_i32x4_relaxed_trunc_f32x4:
-// CHECK: i32x4.relaxed_trunc_f32x4_s{{$}}
-v128_t test_i32x4_relaxed_trunc_f32x4(v128_t a) {
-  return wasm_i32x4_relaxed_trunc_f32x4(a);
-}
-
-// CHECK-LABEL: test_u32x4_relaxed_trunc_f32x4:
-// CHECK: i32x4.relaxed_trunc_f32x4_u{{$}}
-v128_t test_u32x4_relaxed_trunc_f32x4(v128_t a) {
-  return wasm_u32x4_relaxed_trunc_f32x4(a);
-}
-
-// CHECK-LABEL: test_i32x4_relaxed_trunc_f64x2_zero:
-// CHECK: i32x4.relaxed_trunc_f64x2_s_zero{{$}}
-v128_t test_i32x4_relaxed_trunc_f64x2_zero(v128_t a) {
-  return wasm_i32x4_relaxed_trunc_f64x2_zero(a);
-}
-
-// CHECK-LABEL: test_u32x4_relaxed_trunc_f64x2_zero:
-// CHECK: i32x4.relaxed_trunc_f64x2_u_zero{{$}}
-v128_t test_u32x4_relaxed_trunc_f64x2_zero(v128_t a) {
-  return wasm_u32x4_relaxed_trunc_f64x2_zero(a);
-}
-
-// CHECK-LABEL: test_i16x8_relaxed_q15mulr:
-// CHECK: i16x8.relaxed_q15mulr_s{{$}}
-v128_t test_i16x8_relaxed_q15mulr(v128_t a, v128_t b) {
-  return wasm_i16x8_relaxed_q15mulr(a, b);
-}
-
-// CHECK-LABEL: test_i16x8_relaxed_dot_i8x16_i7x16:
-// CHECK: i16x8.relaxed_dot_i8x16_i7x16_s{{$}}
-v128_t test_i16x8_relaxed_dot_i8x16_i7x16(v128_t a, v128_t b) {
-  return wasm_i16x8_relaxed_dot_i8x16_i7x16(a, b);
-}
-
-// CHECK-LABEL: test_i32x4_relaxed_dot_i8x16_i7x16_add:
-// CHECK: i32x4.relaxed_dot_i8x16_i7x16_add_s{{$}}
-v128_t test_i32x4_relaxed_dot_i8x16_i7x16_add(v128_t a, v128_t b, v128_t c) {
-  return wasm_i32x4_relaxed_dot_i8x16_i7x16_add(a, b, c);
-}
-
-// CHECK-LABEL: test_f16x8_splat:
-// CHECK: f16x8.splat{{$}}
-v128_t test_f16x8_splat(float a) { return wasm_f16x8_splat(a); }
-
-// CHECK-LABEL: test_f16x8_extract_lane:
-// CHECK: f16x8.extract_lane 7{{$}}
-int16_t test_f16x8_extract_lane(v128_t a) {
-  return wasm_f16x8_extract_lane(a, 7);
-}
-
-// CHECK-LABEL: test_f16x8_replace_lane:
-// CHECK: f16x8.replace_lane 7{{$}}
-v128_t test_f16x8_replace_lane(v128_t a, float b) {
-  return wasm_f16x8_replace_lane(a, 7, b);
-}
-
-// CHECK-LABEL: test_f16x8_abs:
-// CHECK: f16x8.abs{{$}}
-v128_t test_f16x8_abs(v128_t a) { return wasm_f16x8_abs(a); }
-
-// CHECK-LABEL: test_f16x8_neg:
-// CHECK: f16x8.neg{{$}}
-v128_t test_f16x8_neg(v128_t a) { return wasm_f16x8_neg(a); }
-
-// CHECK-LABEL: test_f16x8_sqrt:
-// CHECK: f16x8.sqrt{{$}}
-v128_t test_f16x8_sqrt(v128_t a) { return wasm_f16x8_sqrt(a); }
-
-// CHECK-LABEL: test_f16x8_ceil:
-// CHECK: f16x8.ceil{{$}}
-v128_t test_f16x8_ceil(v128_t a) { return wasm_f16x8_ceil(a); }
-
-// CHECK-LABEL: test_f16x8_floor:
-// CHECK: f16x8.floor{{$}}
-v128_t test_f16x8_floor(v128_t a) { return wasm_f16x8_floor(a); }
-
-// CHECK-LABEL: test_f16x8_trunc:
-// CHECK: f16x8.trunc{{$}}
-v128_t test_f16x8_trunc(v128_t a) { return wasm_f16x8_trunc(a); }
-
-// CHECK-LABEL: test_f16x8_nearest:
-// CHECK: f16x8.nearest{{$}}
-v128_t test_f16x8_nearest(v128_t a) { return wasm_f16x8_nearest(a); }
-
-// CHECK-LABEL: test_f16x8_add:
-// CHECK: f16x8.add{{$}}
-v128_t test_f16x8_add(v128_t a, v128_t b) { return wasm_f16x8_add(a, b); }
-
-// CHECK-LABEL: test_f16x8_sub:
-// CHECK: f16x8.sub{{$}}
-v128_t test_f16x8_sub(v128_t a, v128_t b) { return wasm_f16x8_sub(a, b); }
-
-// CHECK-LABEL: test_f16x8_mul:
-// CHECK: f16x8.mul{{$}}
-v128_t test_f16x8_mul(v128_t a, v128_t b) { return wasm_f16x8_mul(a, b); }
-
-// CHECK-LABEL: test_f16x8_div:
-// CHECK: f16x8.div{{$}}
-v128_t test_f16x8_div(v128_t a, v128_t b) { return wasm_f16x8_div(a, b); }
-
-// CHECK-LABEL: test_f16x8_min:
-// CHECK: f16x8.min{{$}}
-v128_t test_f16x8_min(v128_t a, v128_t b) { return wasm_f16x8_min(a, b); }
-
-// CHECK-LABEL: test_f16x8_max:
-// CHECK: f16x8.max{{$}}
-v128_t test_f16x8_max(v128_t a, v128_t b) { return wasm_f16x8_max(a, b); }
-
-// CHECK-LABEL: test_f16x8_pmin:
-// CHECK: f16x8.pmin{{$}}
-v128_t test_f16x8_pmin(v128_t a, v128_t b) { return wasm_f16x8_pmin(a, b); }
-
-// CHECK-LABEL: test_f16x8_pmax:
-// CHECK: f16x8.pmax{{$}}
-v128_t test_f16x8_pmax(v128_t a, v128_t b) { return wasm_f16x8_pmax(a, b); }
-
-// CHECK-LABEL: test_f16x8_eq:
-// CHECK: f16x8.eq{{$}}
-v128_t test_f16x8_eq(v128_t a, v128_t b) { return wasm_f16x8_eq(a, b); }
-
-// CHECK-LABEL: test_f16x8_ne:
-// CHECK: f16x8.ne{{$}}
-v128_t test_f16x8_ne(v128_t a, v128_t b) { return wasm_f16x8_ne(a, b); }
-
-// CHECK-LABEL: test_f16x8_lt:
-// CHECK: f16x8.lt{{$}}
-v128_t test_f16x8_lt(v128_t a, v128_t b) { return wasm_f16x8_lt(a, b); }
-
-// CHECK-LABEL: test_f16x8_gt:
-// CHECK: f16x8.gt{{$}}
-v128_t test_f16x8_gt(v128_t a, v128_t b) { return wasm_f16x8_gt(a, b); }
-
-// CHECK-LABEL: test_f16x8_le:
-// CHECK: f16x8.le{{$}}
-v128_t test_f16x8_le(v128_t a, v128_t b) { return wasm_f16x8_le(a, b); }
-
-// CHECK-LABEL: test_f16x8_ge:
-// CHECK: f16x8.ge{{$}}
-v128_t test_f16x8_ge(v128_t a, v128_t b) { return wasm_f16x8_ge(a, b); }
-
-// CHECK-LABEL: test_i16x8_trunc_sat_f16x8:
-// CHECK: i16x8.trunc_sat_f16x8_s{{$}}
-v128_t test_i16x8_trunc_sat_f16x8(v128_t a) {
-  return wasm_i16x8_trunc_sat_f16x8(a);
-}
-
-// CHECK-LABEL: test_u16x8_trunc_sat_f16x8:
-// CHECK: i16x8.trunc_sat_f16x8_u{{$}}
-v128_t test_u16x8_trunc_sat_f16x8(v128_t a) {
-  return wasm_u16x8_trunc_sat_f16x8(a);
-}
-
-// CHECK-LABEL: test_f16x8_convert_i16x8:
-// CHECK: f16x8.convert_i16x8_s{{$}}
-v128_t test_f16x8_convert_i16x8(v128_t a) {
-  return wasm_f16x8_convert_i16x8(a);
-}
-
-// CHECK-LABEL: test_f16x8_convert_u16x8:
-// CHECK: f16x8.convert_i16x8_u{{$}}
-v128_t test_f16x8_convert_u16x8(v128_t a) {
-  return wasm_f16x8_convert_u16x8(a);
-}
-
-// CHECK-LABEL: test_f16x8_relaxed_madd:
-// CHECK: f16x8.relaxed_madd{{$}}
-v128_t test_f16x8_relaxed_madd(v128_t a, v128_t b, v128_t c) {
-  return wasm_f16x8_relaxed_madd(a, b, c);
-}
-
-// CHECK-LABEL: test_f16x8_relaxed_nmadd:
-// CHECK: f16x8.relaxed_nmadd{{$}}
-v128_t test_f16x8_relaxed_nmadd(v128_t a, v128_t b, v128_t c) {
-  return wasm_f16x8_relaxed_nmadd(a, b, c);
-}
diff --git a/cross-project-tests/lit.cfg.py b/cross-project-tests/lit.cfg.py
deleted file mode 100644
index 9935fe6a199da8..00000000000000
--- a/cross-project-tests/lit.cfg.py
+++ /dev/null
@@ -1,296 +0,0 @@
-import os
-import platform
-import re
-import subprocess
-import sys
-
-import lit.formats
-import lit.util
-
-from lit.llvm import llvm_config
-from lit.llvm.subst import ToolSubst
-
-# Configuration file for the 'lit' test runner.
-
-# name: The name of this test suite.
-config.name = "cross-project-tests"
-
-# testFormat: The test format to use to interpret tests.
-config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
-
-# suffixes: A list of file extensions to treat as test files.
-config.suffixes = [".c", ".cl", ".cpp", ".m"]
-
-# excludes: A list of directories to exclude from the testsuite. The 'Inputs'
-# subdirectories contain auxiliary inputs for various tests in their parent
-# directories.
-config.excludes = ["Inputs"]
-
-# test_source_root: The root path where tests are located.
-config.test_source_root = config.cross_project_tests_src_root
-
-# test_exec_root: The root path where tests should be run.
-config.test_exec_root = config.cross_project_tests_obj_root
-
-llvm_config.use_default_substitutions()
-
-tools = [
-    ToolSubst(
-        "%test_debuginfo",
-        command=os.path.join(
-            config.cross_project_tests_src_root,
-            "debuginfo-tests",
-            "llgdb-tests",
-            "test_debuginfo.pl",
-        ),
-    ),
-    ToolSubst("%llvm_src_root", config.llvm_src_root),
-    ToolSubst("%llvm_tools_dir", config.llvm_tools_dir),
-]
-
-
-def get_required_attr(config, attr_name):
-    attr_value = getattr(config, attr_name, None)
-    if attr_value == None:
-        lit_config.fatal(
-            "No attribute %r in test configuration! You may need to run "
-            "tests from your build directory or add this attribute "
-            "to lit.site.cfg " % attr_name
-        )
-    return attr_value
-
-
-# If this is an MSVC environment, the tests at the root of the tree are
-# unsupported. The local win_cdb test suite, however, is supported.
-is_msvc = get_required_attr(config, "is_msvc")
-if is_msvc:
-    config.available_features.add("msvc")
-    # FIXME: We should add some llvm lit utility code to find the Windows SDK
-    # and set up the environment appopriately.
-    win_sdk = "C:/Program Files (x86)/Windows Kits/10/"
-    arch = "x64"
-    llvm_config.with_system_environment(["LIB", "LIBPATH", "INCLUDE"])
-    # Clear _NT_SYMBOL_PATH to prevent cdb from attempting to load symbols from
-    # the network.
-    llvm_config.with_environment("_NT_SYMBOL_PATH", "")
-    tools.append(
-        ToolSubst("%cdb", '"%s"' % os.path.join(win_sdk, "Debuggers", arch, "cdb.exe"))
-    )
-
-# clang_src_dir and lld_src_dir are not used by these tests, but are required by
-# use_clang() and use_lld() respectively, so set them to "", if needed.
-if not hasattr(config, "clang_src_dir"):
-    config.clang_src_dir = ""
-llvm_config.use_clang(required=("clang" in config.llvm_enabled_projects))
-
-if not hasattr(config, "lld_src_dir"):
-    config.lld_src_dir = ""
-llvm_config.use_lld(required=("lld" in config.llvm_enabled_projects))
-
-if "compiler-rt" in config.llvm_enabled_projects:
-    config.available_features.add("compiler-rt")
-
-# Check which debuggers are available:
-lldb_path = llvm_config.use_llvm_tool("lldb", search_env="LLDB")
-
-if lldb_path is not None:
-    config.available_features.add("lldb")
-
-
-def configure_dexter_substitutions():
-    """Configure substitutions for host platform and return list of dependencies"""
-    # Produce dexter path, lldb path, and combine into the %dexter substitution
-    # for running a test.
-    dexter_path = os.path.join(
-        config.cross_project_tests_src_root, "debuginfo-tests", "dexter", "dexter.py"
-    )
-    dexter_test_cmd = '"{}" "{}" test'.format(sys.executable, dexter_path)
-    if lldb_path is not None:
-        dexter_test_cmd += ' --lldb-executable "{}"'.format(lldb_path)
-    tools.append(ToolSubst("%dexter", dexter_test_cmd))
-
-    # For testing other bits of dexter that aren't under the "test" subcommand,
-    # have a %dexter_base substitution.
-    dexter_base_cmd = '"{}" "{}"'.format(sys.executable, dexter_path)
-    tools.append(ToolSubst("%dexter_base", dexter_base_cmd))
-
-    # Set up commands for DexTer regression tests.
-    # Builder, debugger, optimisation level and several other flags differ
-    # depending on whether we're running a unix like or windows os.
-    if platform.system() == "Windows":
-        # The Windows builder script uses lld.
-        dependencies = ["clang", "lld-link"]
-        dexter_regression_test_builder = "clang-cl"
-        dexter_regression_test_debugger = "dbgeng"
-        dexter_regression_test_flags = "/Zi /Od"
-    else:
-        # Use lldb as the debugger on non-Windows platforms.
-        dependencies = ["clang", "lldb"]
-        dexter_regression_test_builder = "clang++"
-        dexter_regression_test_debugger = "lldb"
-        dexter_regression_test_flags = "-O0 -glldb -std=gnu++11"
-
-    tools.append(
-        ToolSubst("%dexter_regression_test_builder", dexter_regression_test_builder)
-    )
-    tools.append(
-        ToolSubst("%dexter_regression_test_debugger", dexter_regression_test_debugger)
-    )
-    # We don't need to distinguish cflags and ldflags because for Dexter
-    # regression tests we use clang to drive the linker, and so all flags will be
-    # passed in a single command.
-    tools.append(
-        ToolSubst("%dexter_regression_test_flags", dexter_regression_test_flags)
-    )
-
-    # Typical command would take the form:
-    # ./path_to_py/python.exe ./path_to_dex/dexter.py test --fail-lt 1.0 -w --binary %t --debugger lldb --cflags '-O0 -g'
-    dexter_regression_test_run = " ".join(
-        # "python", "dexter.py", test, fail_mode, builder, debugger, cflags, ldflags
-        [
-            '"{}"'.format(sys.executable),
-            '"{}"'.format(dexter_path),
-            "test",
-            "--fail-lt 1.0 -w",
-            "--debugger",
-            dexter_regression_test_debugger,
-        ]
-    )
-    tools.append(ToolSubst("%dexter_regression_test_run", dexter_regression_test_run))
-
-    # Include build flags for %dexter_regression_test.
-    dexter_regression_test_build = " ".join(
-        [
-            dexter_regression_test_builder,
-            dexter_regression_test_flags,
-        ]
-    )
-    tools.append(ToolSubst("%dexter_regression_test_build", dexter_regression_test_build))
-    return dependencies
-
-
-def add_host_triple(clang):
-    return "{} --target={}".format(clang, config.host_triple)
-
-
-# The set of arches we can build.
-targets = set(config.targets_to_build)
-# Add aliases to the target set.
-if "AArch64" in targets:
-    targets.add("arm64")
-if "ARM" in config.targets_to_build:
-    targets.add("thumbv7")
-
-
-def can_target_host():
-    # Check if the targets set contains anything that looks like our host arch.
-    # The arch name in the triple and targets set may be spelled differently
-    # (e.g. x86 vs X86).
-    return any(config.host_triple.lower().startswith(x.lower()) for x in targets)
-
-
-# Dexter tests run on the host machine. If the host arch is supported add
-# 'dexter' as an available feature and force the dexter tests to use the host
-# triple.
-if can_target_host():
-    if config.host_triple != config.target_triple:
-        print("Forcing dexter tests to use host triple {}.".format(config.host_triple))
-    dependencies = configure_dexter_substitutions()
-    if all(d in config.available_features for d in dependencies):
-        config.available_features.add("dexter")
-        llvm_config.with_environment(
-            "PATHTOCLANG", add_host_triple(llvm_config.config.clang)
-        )
-        llvm_config.with_environment(
-            "PATHTOCLANGPP", add_host_triple(llvm_config.use_llvm_tool("clang++"))
-        )
-        llvm_config.with_environment(
-            "PATHTOCLANGCL", add_host_triple(llvm_config.use_llvm_tool("clang-cl"))
-        )
-else:
-    print(
-        "Host triple {} not supported. Skipping dexter tests in the "
-        "debuginfo-tests project.".format(config.host_triple)
-    )
-
-tool_dirs = [config.llvm_tools_dir]
-
-llvm_config.add_tool_substitutions(tools, tool_dirs)
-
-lit.util.usePlatformSdkOnDarwin(config, lit_config)
-
-if platform.system() == "Darwin":
-    xcode_lldb_vers = subprocess.check_output(["xcrun", "lldb", "--version"]).decode(
-        "utf-8"
-    )
-    match = re.search("lldb-(\d+)", xcode_lldb_vers)
-    if match:
-        apple_lldb_vers = int(match.group(1))
-        if apple_lldb_vers < 1000:
-            config.available_features.add("apple-lldb-pre-1000")
-
-
-def get_gdb_version_string():
-    """Return gdb's version string, or None if gdb cannot be found or the
-    --version output is formatted unexpectedly.
-    """
-    # See if we can get a gdb version, e.g.
-    #   $ gdb --version
-    #   GNU gdb (GDB) 10.2
-    #   ...More stuff...
-    try:
-        gdb_vers_lines = (
-            subprocess.check_output(["gdb", "--version"]).decode().splitlines()
-        )
-    except:
-        return None  # We coudln't find gdb or something went wrong running it.
-    if len(gdb_vers_lines) < 1:
-        print("Unkown GDB version format (too few lines)", file=sys.stderr)
-        return None
-    match = re.search("GNU gdb \(.*?\) ((\d|\.)+)", gdb_vers_lines[0].strip())
-    if match is None:
-        print(f"Unkown GDB version format: {gdb_vers_lines[0]}", file=sys.stderr)
-        return None
-    return match.group(1)
-
-
-def get_clang_default_dwarf_version_string(triple):
-    """Return the default dwarf version string for clang on this (host) platform
-    or None if we can't work it out.
-    """
-    # Get the flags passed by the driver and look for -dwarf-version.
-    cmd = f'{llvm_config.use_llvm_tool("clang")} -g -xc  -c - -v -### --target={triple}'
-    stderr = subprocess.run(cmd.split(), stderr=subprocess.PIPE).stderr.decode()
-    match = re.search("-dwarf-version=(\d+)", stderr)
-    if match is None:
-        print("Cannot determine default dwarf version", file=sys.stderr)
-        return None
-    return match.group(1)
-
-
-# Some cross-project-tests use gdb, but not all versions of gdb are compatible
-# with clang's dwarf. Add feature `gdb-clang-incompatibility` to signal that
-# there's an incompatibility between clang's default dwarf version for this
-# platform and the installed gdb version.
-dwarf_version_string = get_clang_default_dwarf_version_string(config.host_triple)
-gdb_version_string = get_gdb_version_string()
-if dwarf_version_string and gdb_version_string:
-    if int(dwarf_version_string) >= 5:
-        try:
-            from packaging import version
-        except:
-            lit_config.fatal("Running gdb tests requires the packaging package")
-        if version.parse(gdb_version_string) < version.parse("10.1"):
-            # Example for llgdb-tests, which use lldb on darwin but gdb elsewhere:
-            # XFAIL: !system-darwin && gdb-clang-incompatibility
-            config.available_features.add("gdb-clang-incompatibility")
-            print(
-                "XFAIL some tests: use gdb version >= 10.1 to restore test coverage",
-                file=sys.stderr,
-            )
-
-llvm_config.feature_config([("--build-mode", {"Debug|RelWithDebInfo": "debug-info"})])
-
-# Allow 'REQUIRES: XXX-registered-target' in tests.
-for arch in config.targets_to_build:
-    config.available_features.add(arch.lower() + "-registered-target")
diff --git a/cross-project-tests/lit.site.cfg.py.in b/cross-project-tests/lit.site.cfg.py.in
deleted file mode 100644
index 39458dfc79afd2..00000000000000
--- a/cross-project-tests/lit.site.cfg.py.in
+++ /dev/null
@@ -1,28 +0,0 @@
- at LIT_SITE_CFG_IN_HEADER@
-
-import sys
-import lit.util
-
-config.targets_to_build = "@TARGETS_TO_BUILD@".split()
-config.llvm_src_root = "@LLVM_SOURCE_DIR@"
-config.llvm_tools_dir = lit_config.substitute("@LLVM_TOOLS_DIR@")
-config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
-config.llvm_shlib_dir = lit_config.substitute("@SHLIBDIR@")
-config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
-config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
-config.cross_project_tests_obj_root = "@CROSS_PROJECT_TESTS_BINARY_DIR@"
-config.cross_project_tests_src_root = "@CROSS_PROJECT_TESTS_SOURCE_DIR@"
-config.host_triple = "@LLVM_HOST_TRIPLE@"
-config.target_triple = "@LLVM_TARGET_TRIPLE@"
-config.is_msvc = lit.util.pythonize_bool("@MSVC@")
-config.llvm_enabled_projects = "@LLVM_ENABLE_PROJECTS@".split(";")
-
-config.mlir_src_root = "@MLIR_SOURCE_DIR@"
-
-config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
-
-import lit.llvm
-lit.llvm.initialize(lit_config, config)
-
-# Let the main config do the real work.
-lit_config.load_config(config, "@CROSS_PROJECT_TESTS_SOURCE_DIR@/lit.cfg.py")
diff --git a/llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll b/llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll
index 3f3c76861e9aa2..afeeb095b22769 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vl-opt-instrs.ll
@@ -4,7 +4,7 @@
 ; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v,+zvbb -riscv-enable-vl-optimizer -verify-machineinstrs | FileCheck %s --check-prefixes=VLOPT
 ; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v,+zvbb -riscv-enable-vl-optimizer -verify-machineinstrs | FileCheck %s --check-prefixes=VLOPT
 
-; The purpose of this test is to check the behavior of specific instructions as it relates to the VL optimizer
+; The purpose of this file is to check the behavior of specific instructions as it relates to the VL optimizer
 
 define <vscale x 4 x i32> @vadd_vi(<vscale x 4 x i32> %a, iXLen %vl) {
 ; NOVLOPT-LABEL: vadd_vi:
@@ -146,7 +146,7 @@ define <vscale x 4 x i32> @vrsub_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
   ret <vscale x 4 x i32> %2
 }
 
-define <vscale x 4 x i64> @vwaddu.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwaddu_vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwaddu.vv:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
@@ -167,7 +167,7 @@ define <vscale x 4 x i64> @vwaddu.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i64> @vwaddu.vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwaddu_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwaddu.vx:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
@@ -188,7 +188,7 @@ define <vscale x 4 x i64> @vwaddu.vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i64> @vwsubu.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwsubu_vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwsubu.vv:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
@@ -209,7 +209,7 @@ define <vscale x 4 x i64> @vwsubu.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i64> @vwsubu.vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwsubu_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwsubu.vx:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
@@ -230,7 +230,7 @@ define <vscale x 4 x i64> @vwsubu.vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i64> @vwadd.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwadd_vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwadd.vv:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
@@ -251,7 +251,7 @@ define <vscale x 4 x i64> @vwadd.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i64> @vwadd.vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwadd_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwadd.vx:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
@@ -272,7 +272,7 @@ define <vscale x 4 x i64> @vwadd.vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i64> @vwsub.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwsub_vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwsub.vv:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
@@ -293,7 +293,7 @@ define <vscale x 4 x i64> @vwsub.vv(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i64> @vwsub.vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwsub_vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwsub.vx:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
@@ -314,7 +314,7 @@ define <vscale x 4 x i64> @vwsub.vx(<vscale x 4 x i32> %a, i32 %b, iXLen %vl) {
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i64> @vwaddu.wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwaddu_wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwaddu.wv:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
@@ -335,7 +335,7 @@ define <vscale x 4 x i64> @vwaddu.wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i64> @vwaddu.wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwaddu_wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwaddu.wx:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
@@ -356,7 +356,7 @@ define <vscale x 4 x i64> @vwaddu.wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i64> @vwsubu.wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwsubu_wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwsubu.wv:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
@@ -377,7 +377,7 @@ define <vscale x 4 x i64> @vwsubu.wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i64> @vwsubu.wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwsubu_wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwsubu.wx:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
@@ -398,7 +398,7 @@ define <vscale x 4 x i64> @vwsubu.wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i64> @vwadd.wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwadd_wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwadd.wv:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
@@ -419,7 +419,7 @@ define <vscale x 4 x i64> @vwadd.wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %b
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i64> @vwadd.wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwadd_wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwadd.wx:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
@@ -440,7 +440,7 @@ define <vscale x 4 x i64> @vwadd.wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i64> @vwsub.wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwsub_wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwsub.wv:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
@@ -461,7 +461,7 @@ define <vscale x 4 x i64> @vwsub.wv(<vscale x 4 x i64> %a, <vscale x 4 x i32> %b
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i64> @vwsub.wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
+define <vscale x 4 x i64> @vwsub_wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwsub.wx:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
@@ -482,7 +482,7 @@ define <vscale x 4 x i64> @vwsub.wx(<vscale x 4 x i64> %a, i32 %b, iXLen %vl) {
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i32> @vsext.vf2(<vscale x 4 x i16> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+define <vscale x 4 x i32> @vsext_vf2(<vscale x 4 x i16> %a, <vscale x 4 x i32> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vsext.vf2:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
@@ -502,7 +502,7 @@ define <vscale x 4 x i32> @vsext.vf2(<vscale x 4 x i16> %a, <vscale x 4 x i32> %
   ret <vscale x 4 x i32> %2
 }
 
-define <vscale x 4 x i32> @vsext.vf4(<vscale x 4 x i8> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+define <vscale x 4 x i32> @vsext_vf4(<vscale x 4 x i8> %a, <vscale x 4 x i32> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vsext.vf4:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
@@ -522,7 +522,7 @@ define <vscale x 4 x i32> @vsext.vf4(<vscale x 4 x i8> %a, <vscale x 4 x i32> %b
   ret <vscale x 4 x i32> %2
 }
 
-define <vscale x 4 x i64> @vsext.vf8(<vscale x 4 x i8> %a, <vscale x 4 x i64> %b, iXLen %vl) {
+define <vscale x 4 x i64> @vsext_vf8(<vscale x 4 x i8> %a, <vscale x 4 x i64> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vsext.vf8:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e64, m4, ta, ma
@@ -542,7 +542,7 @@ define <vscale x 4 x i64> @vsext.vf8(<vscale x 4 x i8> %a, <vscale x 4 x i64> %b
   ret <vscale x 4 x i64> %2
 }
 
-define <vscale x 4 x i32> @vzext.vf2(<vscale x 4 x i16> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+define <vscale x 4 x i32> @vzext_vf2(<vscale x 4 x i16> %a, <vscale x 4 x i32> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vzext.vf2:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
@@ -562,7 +562,7 @@ define <vscale x 4 x i32> @vzext.vf2(<vscale x 4 x i16> %a, <vscale x 4 x i32> %
   ret <vscale x 4 x i32> %2
 }
 
-define <vscale x 4 x i32> @vzext.vf4(<vscale x 4 x i8> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+define <vscale x 4 x i32> @vzext_vf4(<vscale x 4 x i8> %a, <vscale x 4 x i32> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vzext.vf4:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e32, m2, ta, ma
@@ -582,7 +582,7 @@ define <vscale x 4 x i32> @vzext.vf4(<vscale x 4 x i8> %a, <vscale x 4 x i32> %b
   ret <vscale x 4 x i32> %2
 }
 
-define <vscale x 4 x i64> @vzext.vf8(<vscale x 4 x i8> %a, <vscale x 4 x i64> %b, iXLen %vl) {
+define <vscale x 4 x i64> @vzext_vf8(<vscale x 4 x i8> %a, <vscale x 4 x i64> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vzext.vf8:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e64, m4, ta, ma
@@ -846,7 +846,7 @@ define <vscale x 4 x i32> @vwmaccu_vx(<vscale x 4 x i16> %a, i16 %b, iXLen %vl)
   ret <vscale x 4 x i32> %2
 }
 
-define <vscale x 4 x i32> @vmv.v.i(<vscale x 4 x i32> %a, i32 %x, iXLen %vl) {
+define <vscale x 4 x i32> @vmv_v_i(<vscale x 4 x i32> %a, i32 %x, iXLen %vl) {
 ; NOVLOPT-LABEL: vmv.v.i:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a0, zero, e32, m2, ta, ma
@@ -866,7 +866,7 @@ define <vscale x 4 x i32> @vmv.v.i(<vscale x 4 x i32> %a, i32 %x, iXLen %vl) {
   ret <vscale x 4 x i32> %2
 }
 
-define <vscale x 4 x i32> @vmv.v.x(<vscale x 4 x i32> %a, i32 %x, iXLen %vl) {
+define <vscale x 4 x i32> @vmv_v_x(<vscale x 4 x i32> %a, i32 %x, iXLen %vl) {
 ; NOVLOPT-LABEL: vmv.v.x:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a2, zero, e32, m2, ta, ma
@@ -886,7 +886,7 @@ define <vscale x 4 x i32> @vmv.v.x(<vscale x 4 x i32> %a, i32 %x, iXLen %vl) {
   ret <vscale x 4 x i32> %2
 }
 
-define <vscale x 4 x i32> @vwsll.vi(<vscale x 4 x i16> %a, <vscale x 4 x i32> %b, iXLen %vl) {
+define <vscale x 4 x i32> @vwsll_vi(<vscale x 4 x i16> %a, <vscale x 4 x i32> %b, iXLen %vl) {
 ; NOVLOPT-LABEL: vwsll.vi:
 ; NOVLOPT:       # %bb.0:
 ; NOVLOPT-NEXT:    vsetvli a1, zero, e16, m1, ta, ma



More information about the llvm-commits mailing list