[llvm] [RISCV][VSETVLI] Prefer VTYPE for immediate known to be less than VLMAX (PR #69759)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 20 12:48:36 PDT 2023


github-actions[bot] wrote:


<!--LLVM CODE FORMAT COMMENT: {clang-format}-->

:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 9399094586aa803fb399ae508e5aa46c8728fdd6 622682a707bc53b5ee411b8d6778b77299832749 -- llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
index bf7dd2359d9b..4b3edd237135 100644
--- a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
@@ -882,7 +882,6 @@ static bool willVLBeAVL(const VSETVLIInfo &Info, const RISCVSubtarget &ST) {
   return ST.getRealMinVLen() * LMul >= AVLInBits;
 }
 
-
 /// Return true if a vsetvli instruction to change from PrevInfo
 /// to Info might change the VL register.  If this returns false,
 /// the vsetvli can use the X0, X0 form.
@@ -913,8 +912,8 @@ bool RISCVInsertVSETVLI::mayChangeVL(const VSETVLIInfo &Info,
   // if the two AVLs are the same, we know the VLs must also be.  As such,
   // this vsetvli is not changing VL.
   if (Info.hasAVLImm() && PrevInfo.hasAVLImm() &&
-      Info.getAVLImm() == PrevInfo.getAVLImm() &&
-      willVLBeAVL(Info, *ST) && willVLBeAVL(PrevInfo, *ST))
+      Info.getAVLImm() == PrevInfo.getAVLImm() && willVLBeAVL(Info, *ST) &&
+      willVLBeAVL(PrevInfo, *ST))
     return false;
 
   return true;

``````````

</details>


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


More information about the llvm-commits mailing list