[PATCH] D58466: [AArch64][GlobalISel] Implement partial support for G_SHUFFLE_VECTOR

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 20 14:01:23 PST 2019


aemerson marked an inline comment as done.
aemerson added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp:1940
+    while (ScalarDef->getOpcode() == TargetOpcode::COPY) {
+      ScalarDef = MRI.getVRegDef(ScalarDef->getOperand(1).getReg());
+    }
----------------
paquette wrote:
> `MRI.getVRegDef` isn't guaranteed to return a value. Could this possibly be null here?
We assume that getVRegDef always gives us a def if the MIR is valid, so I made this an assert. If we don't have a def then there's no way to recover and something's gone badly wrong.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D58466





More information about the llvm-commits mailing list