[PATCH] D62024: [InstCombine] fold shuffles of insert_subvectors

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 13:00:10 PDT 2019


efriedma added a comment.

I tried llc with the before/after of the  `<7 x i8>` testcase from the patch on x86-64, and I'm seeing different shuffles.  I'm not sure why, though; the type v9i8 is involved for some non-obvious reason. Full testcase:

  define <7 x i8> @insert_subvector_shuffles(<3 x i8> %x, <3 x i8> %y) {
    %s1 = shufflevector <3 x i8> %x, <3 x i8> undef, <7 x i32> <i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
    %s2 = shufflevector <3 x i8> %y, <3 x i8> undef, <7 x i32> <i32 undef, i32 1, i32 2, i32 undef, i32 undef, i32 undef, i32 undef>
    %s3 = shufflevector <7 x i8> %s1, <7 x i8> %s2, <7 x i32> <i32 0, i32 8, i32 1, i32 undef, i32 8, i32 1, i32 9>
    ret <7 x i8> %s3
  }
  define <7 x i8> @insert_subvector_shuffles2(<3 x i8> %x, <3 x i8> %y) {
    %s3 = shufflevector <3 x i8> %x, <3 x i8> %y, <7 x i32> <i32 0, i32 4, i32 1, i32 undef, i32 4, i32 1, i32 5>
    ret <7 x i8> %s3
  }


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

https://reviews.llvm.org/D62024





More information about the llvm-commits mailing list