[llvm] [GlobalISel][ARM] Legalization of G_CONSTANT using constant pool (PR #98308)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 05:22:50 PDT 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 5523a473ef3bcb611f2efc6d18f1ca7d9d023591 eebd42fce658177202184851dd869412e85439cc -- llvm/lib/Target/ARM/ARMInstructionSelector.cpp llvm/lib/Target/ARM/ARMLegalizerInfo.cpp llvm/lib/Target/ARM/ARMLegalizerInfo.h llvm/lib/Target/ARM/ARMRegisterBankInfo.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
index b41c6183f2..820dd9271f 100644
--- a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
@@ -440,8 +440,7 @@ bool ARMLegalizerInfo::legalizeCustom(LegalizerHelper &Helper, MachineInstr &MI,
   case G_CONSTANT: {
     const ConstantInt *ConstVal = MI.getOperand(1).getCImm();
     uint64_t ImmVal = ConstVal->getZExtValue();
-    if (ConstantMaterializationCost(ImmVal, ST) > 2 &&
-        !ST->genExecuteOnly())
+    if (ConstantMaterializationCost(ImmVal, ST) > 2 && !ST->genExecuteOnly())
       return Helper.lowerConstant(MI) == LegalizerHelper::Legalized;
     return true;
   }

``````````

</details>


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


More information about the llvm-commits mailing list