[llvm] [MSan] Separated PPC32 va_arg helper from PPC64 (PR #131827)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 9 09:44:08 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 -- llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
index c4594652a..506a880e3 100644
--- a/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -6655,13 +6655,12 @@ struct VarArgPowerPC32Helper : public VarArgHelperBase {
for (CallInst *OrigInst : VAStartInstrumentationList) {
NextNodeIRBuilder IRB(OrigInst);
Value *VAListTag = OrigInst->getArgOperand(0);
- Value *RegSaveAreaPtrPtr =
- IRB.CreatePtrToInt(VAListTag, MS.IntptrTy);
+ Value *RegSaveAreaPtrPtr = IRB.CreatePtrToInt(VAListTag, MS.IntptrTy);
Value *RegSaveAreaSize = CopySize;
// In PPC32 va_list_tag is a struct
- RegSaveAreaPtrPtr = IRB.CreateAdd(RegSaveAreaPtrPtr,
- ConstantInt::get(MS.IntptrTy, 8));
+ RegSaveAreaPtrPtr =
+ IRB.CreateAdd(RegSaveAreaPtrPtr, ConstantInt::get(MS.IntptrTy, 8));
// On PPC 32 reg_save_area can only hold 32 bytes of data
RegSaveAreaSize = IRB.CreateBinaryIntrinsic(
@@ -6684,8 +6683,8 @@ struct VarArgPowerPC32Helper : public VarArgHelperBase {
RegSaveAreaShadowPtr =
IRB.CreatePtrToInt(RegSaveAreaShadowPtr, MS.IntptrTy);
- Value *FPSaveArea = IRB.CreateAdd(
- RegSaveAreaShadowPtr, ConstantInt::get(MS.IntptrTy, 32));
+ Value *FPSaveArea = IRB.CreateAdd(RegSaveAreaShadowPtr,
+ ConstantInt::get(MS.IntptrTy, 32));
FPSaveArea = IRB.CreateIntToPtr(FPSaveArea, MS.PtrTy);
// We fill fp shadow with zeroes as uninitialized fp args should have
// been found during call base check
@@ -6697,10 +6696,9 @@ struct VarArgPowerPC32Helper : public VarArgHelperBase {
// RegSaveAreaSize is min(CopySize, 32) -> no overflow can occur
Value *OverflowAreaSize = IRB.CreateSub(CopySize, RegSaveAreaSize);
- Value *OverflowAreaPtrPtr =
- IRB.CreatePtrToInt(VAListTag, MS.IntptrTy);
- OverflowAreaPtrPtr = IRB.CreateAdd(
- OverflowAreaPtrPtr, ConstantInt::get(MS.IntptrTy, 4));
+ Value *OverflowAreaPtrPtr = IRB.CreatePtrToInt(VAListTag, MS.IntptrTy);
+ OverflowAreaPtrPtr =
+ IRB.CreateAdd(OverflowAreaPtrPtr, ConstantInt::get(MS.IntptrTy, 4));
OverflowAreaPtrPtr = IRB.CreateIntToPtr(OverflowAreaPtrPtr, MS.PtrTy);
Value *OverflowAreaPtr = IRB.CreateLoad(MS.PtrTy, OverflowAreaPtrPtr);
``````````
</details>
https://github.com/llvm/llvm-project/pull/131827
More information about the llvm-commits
mailing list