[all-commits] [llvm/llvm-project] 60d901: AMDGPU: Fix issue in shl(or) combine

Ruiling, Song via All-commits all-commits at lists.llvm.org
Fri May 12 04:51:30 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 60d9010aaf0f09c6ccc4ae130be10f360f93612b
  Author: Ruiling Song <ruiling.song at amd.com>
  Date:   2023-05-12 (Fri, 12 May 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    M llvm/test/CodeGen/AMDGPU/shl_add_ptr.ll

  Log Message:
  AMDGPU: Fix issue in shl(or) combine

The code is doing the optimization:
`((a | c1) << c2)` ==> `(a << c2) + (c1 << c2)`
But this is only valid if `a` and `c1` have no common bits being set.

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

More information about the All-commits mailing list