[llvm] feat: add GlobalISel combine (PR #181486)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 14 08:18:51 PST 2026
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 origin/main HEAD --extensions h -- llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h b/llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h
index 05a312a0c..72271ef41 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/GIMatchTableExecutorImpl.h
@@ -50,7 +50,7 @@ bool GIMatchTableExecutor::executeMatchTable(
const TargetRegisterInfo &TRI, const RegisterBankInfo &RBI,
const PredicateBitset &AvailableFeatures,
CodeGenCoverage *CoverageInfo) const {
-
+
printf("\nHALO\n");
uint64_t CurrentIdx = 0;
@@ -218,7 +218,7 @@ bool GIMatchTableExecutor::executeMatchTable(
assert(State.MIs[InsnID] != nullptr && "Used insn before defined");
unsigned Opcode = State.MIs[InsnID]->getOpcode();
-
+
DEBUG_WITH_TYPE(TgtExecutor::getName(), {
dbgs() << CurrentIdx << ": GIM_CheckOpcode(MIs[" << InsnID
<< "], ExpectedOpcode=" << Expected0;
@@ -233,7 +233,7 @@ bool GIMatchTableExecutor::executeMatchTable(
}
break;
}
-
+
case GIM_SwitchOpcode: {
uint64_t InsnID = readULEB();
uint16_t LowerBound = readU16();
@@ -464,7 +464,7 @@ bool GIMatchTableExecutor::executeMatchTable(
// Note: we don't check for invalid here because this is purely a hook to
// allow some executors (such as the combiner) to check arbitrary,
// contextless predicates, such as whether a rule is enabled or not.
-
+
uint16_t Predicate = readU16();
DEBUG_WITH_TYPE(TgtExecutor::getName(),
dbgs() << CurrentIdx
@@ -1156,9 +1156,9 @@ bool GIMatchTableExecutor::executeMatchTable(
}
case GIR_CopySubReg: {
-
+
printf("\nGIR_CopySubReg\n");
-
+
uint64_t NewInsnID = readULEB();
uint64_t OldInsnID = readULEB();
uint64_t OpIdx = readULEB();
@@ -1267,9 +1267,9 @@ bool GIMatchTableExecutor::executeMatchTable(
case GIR_AddSimpleTempRegister:
case GIR_AddTempRegister:
case GIR_AddTempSubRegister: {
-
+
printf("\nGIR_AddTempSubRegister\n");
-
+
uint64_t InsnID = readULEB();
uint64_t TempRegID = readULEB();
RegState TempRegFlags = {};
@@ -1334,9 +1334,9 @@ bool GIMatchTableExecutor::executeMatchTable(
break;
}
case GIR_ComplexSubOperandRenderer: {
-
+
printf("\nGIR_ComplexSubOperandRenderer\n");
-
+
uint64_t InsnID = readULEB();
uint16_t RendererID = readU16();
uint64_t RenderOpID = readULEB();
@@ -1350,9 +1350,9 @@ bool GIMatchTableExecutor::executeMatchTable(
break;
}
case GIR_ComplexSubOperandSubRegRenderer: {
-
+
printf("\nGIR_ComplexSubOperandSubRegRenderer\n");
-
+
uint64_t InsnID = readULEB();
uint16_t RendererID = readU16();
uint64_t RenderOpID = readULEB();
@@ -1472,9 +1472,9 @@ bool GIMatchTableExecutor::executeMatchTable(
case GIR_RootConstrainSelectedInstOperands:
case GIR_ConstrainSelectedInstOperands: {
-
+
printf("GIR_ConstrainSelectedInstOperands at index %lu\n", CurrentIdx);
-
+
uint64_t InsnID = (MatcherOpcode == GIR_RootConstrainSelectedInstOperands)
? 0
: readULEB();
``````````
</details>
https://github.com/llvm/llvm-project/pull/181486
More information about the llvm-commits
mailing list