[clang] [RISCV] Refactor RVV builtin code generation for reduce compilation time [NFC] (PR #154906)

via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 24 20:03:23 PDT 2025


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 HEAD~1 HEAD --extensions cpp -- clang/lib/CodeGen/TargetBuiltins/RISCV.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/TargetBuiltins/RISCV.cpp b/clang/lib/CodeGen/TargetBuiltins/RISCV.cpp
index 7f2f15d2c..3d1d08929 100644
--- a/clang/lib/CodeGen/TargetBuiltins/RISCV.cpp
+++ b/clang/lib/CodeGen/TargetBuiltins/RISCV.cpp
@@ -426,7 +426,7 @@ static LLVM_ATTRIBUTE_NOINLINE Value *emitRVVUnitStridedSegLoadFFTupleBuiltin(
   Builder.CreateStore(V, Address(NewVL, V->getType(), Align));
   if (ReturnValue.isNull())
     return ReturnTuple;
-    return Builder.CreateStore(ReturnTuple, ReturnValue.getValue());
+  return Builder.CreateStore(ReturnTuple, ReturnValue.getValue());
 }
 
 static LLVM_ATTRIBUTE_NOINLINE Value *emitRVVStridedSegLoadTupleBuiltin(
@@ -457,7 +457,7 @@ static LLVM_ATTRIBUTE_NOINLINE Value *emitRVVStridedSegLoadTupleBuiltin(
   llvm::Value *LoadValue = Builder.CreateCall(F, Ops, "");
   if (ReturnValue.isNull())
     return LoadValue;
-    return Builder.CreateStore(LoadValue, ReturnValue.getValue());
+  return Builder.CreateStore(LoadValue, ReturnValue.getValue());
 }
 
 static LLVM_ATTRIBUTE_NOINLINE Value *emitRVVStridedSegStoreTupleBuiltin(
@@ -654,7 +654,7 @@ static LLVM_ATTRIBUTE_NOINLINE Value *emitRVVIndexedSegLoadTupleBuiltin(
 
   if (ReturnValue.isNull())
     return LoadValue;
-    return Builder.CreateStore(LoadValue, ReturnValue.getValue());
+  return Builder.CreateStore(LoadValue, ReturnValue.getValue());
 }
 
 static LLVM_ATTRIBUTE_NOINLINE Value *emitRVVIndexedSegStoreTupleBuiltin(

``````````

</details>


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


More information about the cfe-commits mailing list