diff options
author | Michael Kruse <llvm-project@meinersbur.de> | 2022-05-06 02:43:49 -0500 |
---|---|---|
committer | Michael Kruse <llvm-project@meinersbur.de> | 2022-05-06 02:43:49 -0500 |
commit | d3460d2a890ccb4ee84ffd05d4a722ff82b5170d (patch) | |
tree | 19c511c63d14da385bc907b4aa99276b8636dc1a /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
parent | fdb6ddcfeb62be7dbc502a4a4ed7c5be11c1c9b6 (diff) | |
parent | 9c1085c7e20bdd7c4a487f50313ebeeb2b6683b8 (diff) | |
download | llvm-users/meinersbur/irbuilder-ompregion.zip llvm-users/meinersbur/irbuilder-ompregion.tar.gz llvm-users/meinersbur/irbuilder-ompregion.tar.bz2 |
Merge branch 'main' into irbuilder-ompregionusers/meinersbur/irbuilder-ompregion
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index e139cf6..e483c3a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -519,7 +519,9 @@ namespace { SDValue XformToShuffleWithZero(SDNode *N); bool reassociationCanBreakAddressingModePattern(unsigned Opc, - const SDLoc &DL, SDValue N0, + const SDLoc &DL, + SDNode *N, + SDValue N0, SDValue N1); SDValue reassociateOpsCommutative(unsigned Opc, const SDLoc &DL, SDValue N0, SDValue N1); @@ -996,6 +998,7 @@ static bool canSplitIdx(LoadSDNode *LD) { bool DAGCombiner::reassociationCanBreakAddressingModePattern(unsigned Opc, const SDLoc &DL, + SDNode *N, SDValue N0, SDValue N1) { // Currently this only tries to ensure we don't undo the GEP splits done by @@ -1025,7 +1028,7 @@ bool DAGCombiner::reassociationCanBreakAddressingModePattern(unsigned Opc, return false; const int64_t CombinedValue = CombinedValueIntVal.getSExtValue(); - for (SDNode *Node : N0->uses()) { + for (SDNode *Node : N->uses()) { auto LoadStore = dyn_cast<MemSDNode>(Node); if (LoadStore) { // Is x[offset2] already not a legal addressing mode? If so then @@ -2447,7 +2450,7 @@ SDValue DAGCombiner::visitADDLike(SDNode *N) { return NewSel; // reassociate add - if (!reassociationCanBreakAddressingModePattern(ISD::ADD, DL, N0, N1)) { + if (!reassociationCanBreakAddressingModePattern(ISD::ADD, DL, N, N0, N1)) { if (SDValue RADD = reassociateOps(ISD::ADD, DL, N0, N1, N->getFlags())) return RADD; @@ -15527,7 +15530,7 @@ static SDValue FoldIntToFPToInt(SDNode *N, SelectionDAG &DAG) { // This means this is also safe for a signed input and unsigned output, since // a negative input would lead to undefined behavior. unsigned InputSize = (int)SrcVT.getScalarSizeInBits() - IsInputSigned; - unsigned OutputSize = (int)VT.getScalarSizeInBits() - IsOutputSigned; + unsigned OutputSize = (int)VT.getScalarSizeInBits(); unsigned ActualSize = std::min(InputSize, OutputSize); const fltSemantics &sem = DAG.EVTToAPFloatSemantics(N0.getValueType()); |