[llvm] [NFC][RISCV] Keep AVLReg define instr inside VSETVLInfo (PR #89180)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 23:33:04 PDT 2024


================
@@ -495,24 +495,29 @@ class VSETVLIInfo {
   void setAVLIgnored() { State = AVLIsIgnored; }
 
   bool hasAVLImm() const { return State == AVLIsImm; }
-  bool hasAVLReg() const { return State == AVLIsReg; }
+  bool hasAVLDefMI() const { return State == AVLIsDefMI; }
   bool hasAVLVLMAX() const { return State == AVLIsVLMAX; }
   bool hasAVLIgnored() const { return State == AVLIsIgnored; }
   Register getAVLReg() const {
-    assert(hasAVLReg());
-    return AVLReg;
+    assert(hasAVLDefMI());
+    return AVLDefMI->getOperand(0).getReg();
----------------
lukel97 wrote:

If the AVL comes from the def of a fault first load then I think it will come from the first operand. I think we might need to track the operand number then in that case?

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


More information about the llvm-commits mailing list