[PATCH] D122279: [SelectionDAG] Add AssertAlign to AddNodeIDCustom so that it will CSE properly.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 22 19:44:32 PDT 2022
craig.topper created this revision.
craig.topper added reviewers: arsenm, RKSimon, spatel, efriedma.
Herald added subscribers: StephenFan, ecnelises, hiraditya.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
The alignment needs to be part of the folding set hash. This is
handled by getAssertAlign when nodes are created, but needs to repeated here.
No test case as I found it as part of a very early experimental patch.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D122279
Files:
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -844,6 +844,9 @@
ID.AddInteger(BA->getTargetFlags());
break;
}
+ case ISD::AssertAlign:
+ ID.AddInteger(cast<AssertAlignSDNode>(N)->getAlign().value());
+ break;
} // end switch (N->getOpcode())
// Target specific memory nodes could also have address spaces and flags
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122279.417472.patch
Type: text/x-patch
Size: 523 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220323/b87f1510/attachment.bin>
More information about the llvm-commits
mailing list