[llvm] [InstCombine] Canonicalise SextADD + GEP (PR #69581)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 29 03:52:09 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 47793481a4dac8b23fbdface9679835ea551a86c 90690ad61412a335f77adc9a60745da35e120bcc -- llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 4b15e6fd1..6bf2abc40 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -2344,11 +2344,9 @@ Instruction *InstCombinerImpl::visitGetElementPtrInst(GetElementPtrInst &GEP) {
// as :
// %newptr = getelementptr i32, i32* %ptr, i32 %idx1
// %newgep = getelementptr i32, i32* %newptr, i32 idx2
- auto *NewPtr =
- Builder.CreateGEP(GEP.getResultElementType(), GEP.getPointerOperand(),
- Idx1);
- return GetElementPtrInst::Create(GEP.getResultElementType(), NewPtr,
- C);
+ auto *NewPtr = Builder.CreateGEP(GEP.getResultElementType(),
+ GEP.getPointerOperand(), Idx1);
+ return GetElementPtrInst::Create(GEP.getResultElementType(), NewPtr, C);
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/69581
More information about the llvm-commits
mailing list