Skip to content

Conversation

@makslevental
Copy link
Contributor

No description provided.

@github-actions
Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff 1188b1ff7b956cb65d8ddda5f1e56c432f1a57c7 f6b92e0257eb0938de69c3ec5806b080aa3320b4 --extensions h,cpp -- llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
View the diff from clang-format here.
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h b/llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
index c88bf44c9b..b81e958ac2 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
@@ -1382,9 +1382,9 @@ public:
   }
 
   MachineInstrBuilder buildInsertVectorElementConstant(const DstOp &Res,
-                                                        const SrcOp &Val,
-                                                        const SrcOp &Elt,
-                                                        const int Idx) {
+                                                       const SrcOp &Val,
+                                                       const SrcOp &Elt,
+                                                       const int Idx) {
     auto TLI = getMF().getSubtarget().getTargetLowering();
     unsigned VecIdxWidth = TLI->getVectorIdxTy(getDataLayout()).getSizeInBits();
     return buildInsertVectorElement(
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
index 107bb4f63f..5ace75f6c4 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
@@ -126,7 +126,7 @@ LegalizerHelper::legalizeInstrStep(MachineInstr &MI,
     return LI.legalizeIntrinsic(*this, MI) ? Legalized : UnableToLegalize;
   if (isa<GInsertSubvector>(MI))
     return LI.legalizeCustom(*this, MI, LocObserver) ? Legalized
-                                                 : UnableToLegalize;
+                                                     : UnableToLegalize;
   auto Step = LI.getAction(MI, MRI);
   switch (Step.Action) {
   case Legal:
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
index 18747b43ac..db36d55103 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
@@ -2872,7 +2872,8 @@ bool AMDGPULegalizerInfo::legalizeInsertSubVector(MachineInstr &MI,
       } else {
         Elt = B.buildExtractVectorElementConstant(S32, InsB, I);
       }
-      VecB = B.buildInsertVectorElementConstant(NewVecVT, VecB, Elt, IdxVal / 2 + I);
+      VecB = B.buildInsertVectorElementConstant(NewVecVT, VecB, Elt,
+                                                IdxVal / 2 + I);
     }
     auto R = B.buildBitcast(VecVT, VecB);
     MI.eraseFromParent();
@@ -2881,7 +2882,8 @@ bool AMDGPULegalizerInfo::legalizeInsertSubVector(MachineInstr &MI,
 
   for (unsigned I = 0; I != InsNumElts; ++I) {
     auto Elt = B.buildExtractVectorElementConstant(EltVT, Ins, I);
-    Vec = B.buildInsertVectorElementConstant(VecVT, Vec, Elt, IdxVal + I).getReg(0);
+    Vec = B.buildInsertVectorElementConstant(VecVT, Vec, Elt, IdxVal + I)
+              .getReg(0);
   }
 
   MI.eraseFromParent();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant