[PATCH] D46946: [X86] Lowering shift intrinsics to native IR

Tomasz Krupa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 21 02:11:42 PDT 2018


tkrupa added a comment.

Can you provide an example of such behavior? I tried various (rather simple) tests like this one:

__m128i foo(__m128i a, __m128i b, int x, int y) {

  __m128i tmp;
  for (int i = 0; i < y; i++) {
    x *= 20;
    tmp = _mm_sll_epi64(a, b);
  }
  return _mm_slli_epi64(tmp, x);

}

and for all of them the whole pattern get hoisted out of the loop and folds without a problem.


Repository:
  rL LLVM

https://reviews.llvm.org/D46946





More information about the llvm-commits mailing list