[PATCH] D63517: [x86] avoid vector load narrowing with extracted store uses (PR42305)

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 18 23:11:28 PDT 2019


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:4819
+  if ((VT.is256BitVector() || VT.is512BitVector()) && !Load->hasOneUse()) {
+    for (SDNode *U : Load->uses()) {
+      // Skip uses of the chain value. Result 0 of the node is the load value.
----------------
I wonder if it would be better to use use_begin()/use_end() for the loop. Then you can use getUse().getResNo() to check if its the chain or not. That would be more efficient than scanning the operands of the user.


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

https://reviews.llvm.org/D63517





More information about the llvm-commits mailing list