[PATCH] D58911: DAG: Don't try to cluster loads with tied inputs
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 7 15:27:11 PST 2019
arsenm marked an inline comment as done.
arsenm added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp:251
+ const SDNode *B = O2SMap[OffsetB];
+ if (A->isOperandOf(B))
+ return true;
----------------
rampitec wrote:
> There is unlikely but possible case neither is operand of another but depend through a third instruction.
> Also what would happen if:
>
> A: load i16 [base]
> B: load i16 [base + 2]
> C: load i8 [base + 1]
>
> I guess normal sorting will tell A < C < B. With your change: B < A, A < C, C < B. That creates an impossible sort order.
It turns out this is already broken even if clustering is disabled. Fixing this requires another patch to rewrite the patterns
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58911/new/
https://reviews.llvm.org/D58911
More information about the llvm-commits
mailing list