[all-commits] [llvm/llvm-project] 8a9e33: s390x: optimize 128-bit fshl and fshr by high valu...

Folkert de Vries via All-commits all-commits at lists.llvm.org
Wed Aug 27 00:32:12 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8a9e3333ddcf6b13d6a944b1380a828df6f08a6d
      https://github.com/llvm/llvm-project/commit/8a9e3333ddcf6b13d6a944b1380a828df6f08a6d
  Author: Folkert de Vries <folkert at folkertdev.nl>
  Date:   2025-08-27 (Wed, 27 Aug 2025)

  Changed paths:
    M llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
    M llvm/test/CodeGen/SystemZ/shift-17.ll

  Log Message:
  -----------
  s390x: optimize 128-bit fshl and fshr by high values (#154919)

Turn a funnel shift by N in the range `121..128` into a funnel shift in
the opposite direction by `128 - N`. Because there are dedicated
instructions for funnel shifts by values smaller than 8, this emits
fewer instructions.

This additional rule is useful because LLVM appears to canonicalize
`fshr` into `fshl`, meaning that the rules for `fshr` on values less
than 8 would not match on organic input.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list