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

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 07:12:44 PDT 2024


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 2f077ece2fa59681627963cf9325aeddcf476af6 9ad694e590c8ffd1216b1fbae4f701c1d95a5971 --extensions cpp -- llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index 9b69aa0c60..65d28f8bc7 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -56,12 +56,12 @@ struct VLInfo {
   bool isValid() const { return isImm() || getReg().isVirtual(); }
 
   int64_t getImm() const {
-    assert (isImm() && "Expected VL to be an immediate");
+    assert(isImm() && "Expected VL to be an immediate");
     return std::get<int64_t>(VL);
   }
 
   Register getReg() const {
-    assert (isReg() && "Expected VL to be a Register");
+    assert(isReg() && "Expected VL to be a Register");
     return std::get<Register>(VL);
   }
 

``````````

</details>


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


More information about the llvm-commits mailing list