[all-commits] [llvm/llvm-project] 608038: [InstSimplify] fold splat of inserted constant to ...

RotateRight via All-commits all-commits at lists.llvm.org
Sun Dec 15 06:33:38 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6080387f136af5a51bbc310abb08c7158d7cd9d2
      https://github.com/llvm/llvm-project/commit/6080387f136af5a51bbc310abb08c7158d7cd9d2
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2019-12-15 (Sun, 15 Dec 2019)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstCombine/insert-extract-shuffle.ll
    M llvm/test/Transforms/InstSimplify/shufflevector.ll

  Log Message:
  -----------
  [InstSimplify] fold splat of inserted constant to vector constant

shuf (inselt ?, C, IndexC), undef, <IndexC, IndexC...> --> <C, C...>

This is another missing shuffle fold pattern uncovered by the
shuffle correctness fix from D70246.

The problem was visible in the post-commit thread example, but
we managed to overcome the limitation for that particular case
with D71220.

This is something like the inverse of the previous fix - there
we didn't demand the inserted scalar, and here we are only
demanding an inserted scalar.

Differential Revision: https://reviews.llvm.org/D71488




More information about the All-commits mailing list