[PATCH] D73711: [AArch64][SVE] Add support for DestructiveBinary and DestructiveBinaryComm DestructiveInstTypes

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 09:38:37 PST 2020


cameron.mcinally added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp:167
+    switch(N->getOpcode()) {
+    case ISD::BUILD_VECTOR: {
+      auto Splat = cast<BuildVectorSDNode>(N)->getSplatValue();
----------------
sdesmalen wrote:
> BUILD_VECTOR only works for fixed-width vectors, so you'll need to check for SPLAT_VECTOR instead.
> 
> This also puzzles me a bit on how the tests could pass; I'd either expect the pattern not to match because the incoming value is not a BUILD_VECTOR, or I'd expect an assertion in BUILD_VECTOR to fail because it doesn't work with scalable vectors.
Hmm, that's strange. I assumed there was a separate missing lowering somewhere for zeroinitializer. 

I've definitely seen other DestructiveInstr types matching DUP/SPLAT there. Maybe I missed something subtle in this patch. 

Will check it out...


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

https://reviews.llvm.org/D73711





More information about the llvm-commits mailing list