[PATCH] D46957: [x86] Lower some trunc + shuffle patterns to vpmovd[b|w]

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 16 12:44:38 PDT 2018


craig.topper added a comment.

What about this. This is the most obvious representation for this.

  define <8 x i16> @trunc_v4i64_to_v4i16_return_v8i16(<4 x i64> %vec) nounwind {
    %truncated = trunc <4 x i64> %vec to <4 x i16>
    %result = shufflevector <4 x i16> %truncated, <4 x i16> zeroinitializer, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
    ret <8 x i16> %result
  }


https://reviews.llvm.org/D46957





More information about the llvm-commits mailing list