[PATCH] D57377: [CGP] Add support for sinking operands to their users, if they are free.

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 31 06:27:28 PST 2019


samparker accepted this revision.
samparker added a comment.
This revision is now accepted and ready to land.

LGTM with one comment.



================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:5984
+
+  // OpsToSink can contain multiple uses in a use chain (e.g.
+  // (%u1 with %u1 = shufflevector), (%u2 with %u2 = zext %u1)). The dominating
----------------
fhahn wrote:
> samparker wrote:
> > Is this order of ops enforced?
> Do you mean enforced as in by an assertion? Not at the moment. I think we would could check it with OrderedInstructions, if you think it would be beneficial.
It's okay, I hadn't noticed that you've added this requirement in the documentation.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:8292
+  auto areTypesHalfed = [](Value *FullV, Value *HalfV) {
+    auto *FullVT = dyn_cast<VectorType>(FullV->getType());
+    auto *HalfVT = dyn_cast<VectorType>(HalfV->getType());
----------------
samparker wrote:
> I'm assuming cast is all you need, otherwise you're missing a nullptr check.
the same for below.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57377/new/

https://reviews.llvm.org/D57377





More information about the llvm-commits mailing list