[PATCH] D91416: [VE] LVLGen sets VL before vector insts

Kazushi Marukawa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 27 16:55:24 PST 2020


kaz7 added inline comments.


================
Comment at: llvm/lib/Target/VE/LVLGen.cpp:92
+      // Old VL is overwritten, so disable HasRegForVL.
+      if (MI->findRegisterDefOperandIdx(RegForVL, false, false, TRI) != -1) {
+        LLVM_DEBUG(dbgs() << RegName(RegForVL) << " is killed: ");
----------------
craig.topper wrote:
> Does this handle the case of a call in the middle of a group of vector instructions? Such a call might modify VL. But I don't think the call will show VL as a def for findRegisterDefOperandIdx.
No, this doesn't handle such case and generates wrong instructions.  Thank you for suggestions.  I'll prepare updates.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91416



More information about the llvm-commits mailing list