[AMDGPU][GlobalISel] Fold a chain of two shift instructions with constant operands
authorMirko Brkusanin <Mirko.Brkusanin@amd.com>
Thu, 29 Oct 2020 17:12:21 +0000 (18:12 +0100)
committerMirko Brkusanin <Mirko.Brkusanin@amd.com>
Tue, 10 Nov 2020 10:32:12 +0000 (11:32 +0100)
commitde719586a8fa82428bddcb714d00dfa3d0eab526
tree9db4186dc12bd2a7f9006fab2aa6048168b06b21
parentd2f7f775cac5df24bafa158c3cc7a86c2593f03c
[AMDGPU][GlobalISel] Fold a chain of two shift instructions with constant operands

Sequence of same shift instructions with constant operands can be combined into
a single shift instruction.

Differential Revision: https://reviews.llvm.org/D90217
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/ashr.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-shift-imm-chain-illegal-types.mir [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-shift-imm-chain-shlsat.mir [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-shift-imm-chain.ll [new file with mode: 0644]