[llvm] [LegalizeTypes] Preserve disjoint flag when expanding OR. (PR #147640)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 8 21:34:51 PDT 2025
================
@@ -4380,8 +4380,13 @@ void DAGTypeLegalizer::ExpandIntRes_Logical(SDNode *N,
SDValue LL, LH, RL, RH;
GetExpandedInteger(N->getOperand(0), LL, LH);
GetExpandedInteger(N->getOperand(1), RL, RH);
- Lo = DAG.getNode(N->getOpcode(), dl, LL.getValueType(), LL, RL);
- Hi = DAG.getNode(N->getOpcode(), dl, LL.getValueType(), LH, RH);
+
+ SDNodeFlags Flags;
+ if (N->getOpcode() == ISD::OR)
+ Flags.setDisjoint(N->getFlags().hasDisjoint());
----------------
arsenm wrote:
Isn't this the same as just directly using the original value of N->getFlags
https://github.com/llvm/llvm-project/pull/147640
More information about the llvm-commits
mailing list