[all-commits] [llvm/llvm-project] 8eaa1e: [InstCombine] add casts from splat-a-bit pattern i...

ZCBing via All-commits all-commits at lists.llvm.org
Sat May 7 00:38:02 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8eaa1ef0d88c36dbf90e191c8852ea46bf4841c9
  Author: Chenbing Zheng <Chenbing.Zheng at streamcomputing.com>
  Date:   2022-05-07 (Sat, 07 May 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
    M llvm/test/Transforms/InstCombine/sext.ll

  Log Message:
  [InstCombine] add casts from splat-a-bit pattern if necessary

Splatting a bit of constant-index across a value:
sext (ashr (trunc iN X to iM), M-1) to iN --> ashr (shl X, N-M), N-1
If the dest type is different, use a cast (adjust use check).


Reviewed By: spatel

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

More information about the All-commits mailing list