[llvm] [RISCV][VLOPT] Allow propagation even when VL isn't VLMAX (PR #112228)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 07:09:09 PDT 2024


================
@@ -31,6 +31,44 @@ using namespace llvm;
 
 namespace {
 
+struct VLInfo {
+  VLInfo(const MachineOperand &VLOp) {
+    IsImm = VLOp.isImm();
+    if (IsImm)
+      Imm = VLOp.getImm();
+    else
+      Reg = VLOp.getReg();
+  }
+
+  Register Reg;
----------------
michaelmaitland wrote:

updated to use std::variant.

https://github.com/llvm/llvm-project/pull/112228


More information about the llvm-commits mailing list