[AMDGPU][GlobalISel] Combine shift + logic + shift with constant operands
authorMirko Brkusanin <Mirko.Brkusanin@amd.com>
Fri, 30 Oct 2020 14:35:42 +0000 (15:35 +0100)
committerMirko Brkusanin <Mirko.Brkusanin@amd.com>
Tue, 10 Nov 2020 10:32:13 +0000 (11:32 +0100)
commit53ae95c946c0d3a32e402d0815cf2de6c0f8c3d8
tree87e8ae9df048c9481f8f6e8644bb286ed7a05f75
parentde719586a8fa82428bddcb714d00dfa3d0eab526
[AMDGPU][GlobalISel] Combine shift + logic + shift with constant operands

This sequence of instructions can be simplified if they are single use and
some operands are constants. Additional combines may be applied afterwards.

Differential Revision: https://reviews.llvm.org/D90223
llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
llvm/include/llvm/Target/GlobalISel/Combine.td
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-shift-of-shifted-logic-shlsat.mir [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-shift-of-shifted-logic.ll [new file with mode: 0644]