[all-commits] [llvm/llvm-project] b85de2: [InstCombine] Add bswap(trunc(bswap(x))) -> trunc(...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Sep 30 08:01:34 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b85de2c69cf3d6fbc2ad3439a6224667a58f704c
      https://github.com/llvm/llvm-project/commit/b85de2c69cf3d6fbc2ad3439a6224667a58f704c
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-09-30 (Wed, 30 Sep 2020)

  Changed paths:
    M llvm/test/Transforms/InstCombine/bswap-fold.ll

  Log Message:
  -----------
  [InstCombine] Add bswap(trunc(bswap(x))) -> trunc(lshr(x, c)) vector tests

Add tests showing failure to correctly fold vector bswap(trunc(bswap(x))) intrinsic patterns


  Commit: 323d08e50a7bb80786dc00a8ade6ae49e1358393
      https://github.com/llvm/llvm-project/commit/323d08e50a7bb80786dc00a8ade6ae49e1358393
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-09-30 (Wed, 30 Sep 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/bswap-fold.ll

  Log Message:
  -----------
  [InstCombine] Fix bswap(trunc(bswap(x))) -> trunc(lshr(x, c)) vector support

Use getScalarSizeInBits not getPrimitiveSizeInBits to determine the shift value at the element level.


Compare: https://github.com/llvm/llvm-project/compare/892fdc923f06...323d08e50a7b


More information about the All-commits mailing list