-
Notifications
You must be signed in to change notification settings - Fork 15.6k
[LegalizeDAG] Return after replacing ISD::POISON with ISD::UNDEF. #173173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We already replaced the node, we shouldn't run the rest of the code that still uses the old node.
|
@llvm/pr-subscribers-llvm-selectiondag Author: Craig Topper (topperc) ChangesWe already replaced the node, we shouldn't run the rest of the code that still uses the old node. Full diff: https://github.com/llvm/llvm-project/pull/173173.diff 1 Files Affected:
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index fc3e9ff0d6238..73f59b4064144 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -993,18 +993,18 @@ void SelectionDAGLegalize::LegalizeOp(SDNode *Node) {
TargetLowering::LegalizeAction Action = TargetLowering::Legal;
bool SimpleFinishLegalizing = true;
switch (Node->getOpcode()) {
- // TODO: Currently, POISON is being lowered to UNDEF here. However, there is
- // an open concern that this transformation may not be ideal, as targets
- // should ideally handle POISON directly. Changing this behavior would require
- // adding support for POISON in TableGen, which is a large change.
- // Additionally, many existing test cases rely on the current behavior (e.g.,
- // llvm/test/CodeGen/PowerPC/vec_shuffle.ll). A broader discussion and
- // incremental changes might be needed to properly
- // support POISON without breaking existing targets and tests.
case ISD::POISON: {
+ // TODO: Currently, POISON is being lowered to UNDEF here. However, there is
+ // an open concern that this transformation may not be ideal, as targets
+ // should ideally handle POISON directly. Changing this behavior would
+ // require adding support for POISON in TableGen, which is a large change.
+ // Additionally, many existing test cases rely on the current behavior
+ // (e.g., llvm/test/CodeGen/PowerPC/vec_shuffle.ll). A broader discussion
+ // and incremental changes might be needed to properly support POISON
+ // without breaking existing targets and tests.
SDValue UndefNode = DAG.getUNDEF(Node->getValueType(0));
ReplaceNode(Node, UndefNode.getNode());
- break;
+ return;
}
case ISD::INTRINSIC_W_CHAIN:
case ISD::INTRINSIC_WO_CHAIN:
|
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/141/builds/13893 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/24/builds/15885 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/157/builds/43180 Here is the relevant piece of the build log for the reference |
We already replaced the node, we shouldn't run the rest of the code that still uses the old node.