<div dir="ltr">Thanks for letting me know - I suspect I failed to account for a build vector whose elements are not the same size as the build vector type. Taking a look now.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 21, 2019 at 9:04 AM Sjoerd Meijer via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">SjoerdMeijer added a comment.<br>
<br>
Hello. I am investigating a crash and this assertion failure on AArch64:<br>
<br>
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1548: llvm::SDValue llvm::SelectionDAG::getVectorShuffle(llvm::EVT, const llvm::SDLoc&, llvm::SDValue, llvm::SDValue, llvm::ArrayRef<int>): Assertion `VT.getVectorNumElements() == Mask.size() && "Must have the same number of vector elements as mask elements!"' failed.<br>
<br>
Bisecting is blaming this commit. I've only just started debugging this (and it is hitting this new function), but just wanted to share this in case you have some ideas and thoughts on this. This is my reproducer:<br>
<br>
  target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"<br>
  target triple = "aarch64-unknown-linux-gnu"<br>
<br>
  @a = common dso_local local_unnamed_addr global <4 x i16> zeroinitializer, align 8<br>
  @b = common dso_local local_unnamed_addr global i32 0, align 4<br>
<br>
  ; Function Attrs: nounwind<br>
  define dso_local i32 @vqmovns_s32() local_unnamed_addr {<br>
  entry:<br>
    %0 = load <4 x i16>, <4 x i16>* @a, align 8<br>
    %1 = extractelement <4 x i16> %0, i32 2<br>
    %vgetq_lane = zext i16 %1 to i32<br>
    %2 = insertelement <4 x i32> undef, i32 %vgetq_lane, i64 0<br>
    %vqmovns_s32 = tail call <4 x i16> @llvm.aarch64.neon.sqxtn.v4i16(<4 x i32> %2)<br>
    %3 = extractelement <4 x i16> %vqmovns_s32, i64 0<br>
    %conv = sext i16 %3 to i32<br>
    store i32 %conv, i32* @b, align 4<br>
    ret i32 undef<br>
  }<br>
<br>
  ; Function Attrs: nounwind readnone<br>
  declare <4 x i16> @llvm.aarch64.neon.sqxtn.v4i16(<4 x i32>)<br>
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D56281/new/" rel="noreferrer" target="_blank">https://reviews.llvm.org/D56281/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D56281" rel="noreferrer" target="_blank">https://reviews.llvm.org/D56281</a><br>
<br>
<br>
<br>
</blockquote></div>