[all-commits] [llvm/llvm-project] 9df836: [GlobalISelMatchTable] Don't hoist C++ predicates ...
Fabian Ritter via All-commits
all-commits at lists.llvm.org
Thu Sep 18 00:52:32 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9df83619fbfe5b079c50e88df304d27d3fbf4846
https://github.com/llvm/llvm-project/commit/9df83619fbfe5b079c50e88df304d27d3fbf4846
Author: Fabian Ritter <fabian.ritter at amd.com>
Date: 2025-09-18 (Thu, 18 Sep 2025)
Changed paths:
A llvm/test/TableGen/GlobalISelEmitter/MatchTableOptimizerInvalidHoisting.td
M llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp
M llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.h
Log Message:
-----------
[GlobalISelMatchTable] Don't hoist C++ predicates over operand recorders (#159329)
The pattern optimizations in GlobalISelMatchTable.cpp can extract common
predicates out of pattern alternatives by putting the pattern alternatives into
a GroupMatcher and moving common predicates into the GroupMatcher's predicate
list. This patch adds checks to avoid hoisting a common predicate before
matchers that record named operands that the predicate uses, which would lead
to segfaults when the imported patterns are matched.
See the added test for a concrete example inspired by the AMDGPU backend.
This fixes a bug encountered in #143881.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list