[llvm] [InstCombine] Handle more scalable geps in EmitGEPOffset (PR #71699)

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 04:44:39 PST 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 bd611264993f64decbce178d460caf1d1cb05f59 b6bab71853b12e1649dea76f53ac1b2caf230823 -- llvm/lib/Analysis/Local.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Analysis/Local.cpp b/llvm/lib/Analysis/Local.cpp
index e81e78bc77ba..28fe8a443c97 100644
--- a/llvm/lib/Analysis/Local.cpp
+++ b/llvm/lib/Analysis/Local.cpp
@@ -66,8 +66,7 @@ Value *llvm::emitGEPOffset(IRBuilderBase *Builder, const DataLayout &DL,
       Op = Builder->CreateIntCast(Op, IntIdxTy, true, Op->getName() + ".c");
     TypeSize TSize = DL.getTypeAllocSize(GTI.getIndexedType());
     if (TSize != TypeSize::Fixed(1)) {
-      Value *Scale =
-          Builder->CreateTypeSize(IntIdxTy->getScalarType(), TSize);
+      Value *Scale = Builder->CreateTypeSize(IntIdxTy->getScalarType(), TSize);
       if (IntIdxTy->isVectorTy())
         Scale = Builder->CreateVectorSplat(
             cast<VectorType>(IntIdxTy)->getElementCount(), Scale);

``````````

</details>


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


More information about the llvm-commits mailing list