[all-commits] [llvm/llvm-project] 3c9385: [InstSimplify] add tests for ctlz of shifted const...

RotateRight via All-commits all-commits at lists.llvm.org
Mon Mar 15 09:10:25 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3c93852a78e4165080678c5ede2973ad2729de6d
      https://github.com/llvm/llvm-project/commit/3c93852a78e4165080678c5ede2973ad2729de6d
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M llvm/test/Transforms/InstSimplify/call.ll

  Log Message:
  -----------
  [InstSimplify] add tests for ctlz of shifted constant; NFC


  Commit: 660728acd4f09294d18b9a0b51b8e94a68efd1a5
      https://github.com/llvm/llvm-project/commit/660728acd4f09294d18b9a0b51b8e94a68efd1a5
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/call.ll

  Log Message:
  -----------
  [InstSimplify] ctlz({signbit} >>u x) --> x

The motivating pattern was handled in 0a2d69480d ,
but we should have this for symmetry.

But this really highlights that we could generalize for
any shifted constant if we match this in instcombine.

https://alive2.llvm.org/ce/z/MrmVNt


Compare: https://github.com/llvm/llvm-project/compare/b136a74efc54...660728acd4f0


More information about the All-commits mailing list