[llvm] [SDAG] Merge multiple-result libcall expansion into DAG.expandMultipleResultFPLibCall() (PR #114792)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 4 11:56:43 PST 2024
================
@@ -270,6 +271,15 @@ SDValue VectorLegalizer::LegalizeOp(SDValue Op) {
DenseMap<SDValue, SDValue>::iterator I = LegalizedNodes.find(Op);
if (I != LegalizedNodes.end()) return I->second;
+ // Handle legalizing the root if it changes.
+ auto FixupRoot = make_scope_exit([&, OldRoot = DAG.getRoot()] {
+ SDValue Root = DAG.getRoot();
+ if (Root != OldRoot) {
+ if (SDValue LegalRoot = LegalizeOp(Root))
+ DAG.setRoot(LegalRoot);
+ }
+ });
----------------
arsenm wrote:
Um what? Any weird chain management effects should be local to an individual transform, and not in this general always-fixup
https://github.com/llvm/llvm-project/pull/114792
More information about the llvm-commits
mailing list