[llvm] [GlobalISel] Clamp out-of-range G_EXTRACT_VECTOR_ELT constant indices when converting them into loads. (PR #82460)

via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 20:49:32 PST 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 c02b0d008c17cdf8dc46ad930c69311bcd8c7dd4 53b0ccc30440d98c74f364feb9aaa15a224393fb -- llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
index 6e35c7dd91..dacb13d685 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
@@ -3972,7 +3972,7 @@ LegalizerHelper::createStackTemporary(TypeSize Bytes, Align Alignment,
 }
 
 static Register clampVectorIndex(MachineIRBuilder &B, Register IdxReg,
-                                        LLT VecTy) {
+                                 LLT VecTy) {
   LLT IdxTy = B.getMRI()->getType(IdxReg);
   unsigned NElts = VecTy.getNumElements();
 

``````````

</details>


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


More information about the llvm-commits mailing list