[all-commits] [llvm/llvm-project] 075141: [X86] Extend `combinei64TruncSrlAdd` to handle pat...

João Gouveia via All-commits all-commits at lists.llvm.org
Sat Mar 1 02:06:12 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0751418024442ac97b8ff484c01f9386aa5723b8
      https://github.com/llvm/llvm-project/commit/0751418024442ac97b8ff484c01f9386aa5723b8
  Author: João Gouveia <jtalonegouveia at gmail.com>
  Date:   2025-03-01 (Sat, 01 Mar 2025)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/combine-i64-trunc-srl-add.ll

  Log Message:
  -----------
  [X86] Extend `combinei64TruncSrlAdd` to handle patterns with `or` and `xor` (#128435)

As discussed in #126448, the fold implemented by #126448 / #128353 can
be extended to operations other than `add`. This patch extends the fold
performed by `combinei64TruncSrlAdd` to include `or` and `xor` (proof:
https://alive2.llvm.org/ce/z/AXuaQu). There's no need to extend it to
`sub` and `and`, as similar folds are already being performed for those
operations.

CC: @phoebewang @RKSimon



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