[all-commits] [llvm/llvm-project] 25a97c: [InstCombine] visitCallInst - retain undefs in vec...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Oct 14 06:41:38 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 25a97c3a43d7bc469ec67dd4e901a507b9b11116
      https://github.com/llvm/llvm-project/commit/25a97c3a43d7bc469ec67dd4e901a507b9b11116
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-10-14 (Wed, 14 Oct 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/funnel.ll
    M llvm/test/Transforms/InstCombine/rotate.ll

  Log Message:
  -----------
  [InstCombine] visitCallInst - retain undefs in vector funnel shift amounts

By always performing a modulo on the shift amount constants this was causing undef amounts being replaced with zero, meaning we were losing funnel shift by splat (with undef) patterns.

Tweaked the shift amount bounds check to support (passthrough) undefs, and use Constant::mergeUndefsWith to preserve the undefs after folding.




More information about the All-commits mailing list