]> granicus.if.org Git - llvm/commit
[AMDGPU] Narrow lshl from 64 to 32 bit if possible
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Mon, 22 May 2017 16:58:10 +0000 (16:58 +0000)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Mon, 22 May 2017 16:58:10 +0000 (16:58 +0000)
commit69edad7913056272bf0157f50dc51eb5596c8fcd
tree40a252d8195badaba5150465683413a0e3bf1478
parentb9e0915b58bb80bf0f15ceea672aa71395dc6e64
[AMDGPU] Narrow lshl from 64 to 32 bit if possible

Turn expensive 64 bit shift into 32 bit if shift does not overflow int:
shl (ext x) => zext (shl x)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303569 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
lib/Target/AMDGPU/AMDGPUISelLowering.cpp
test/CodeGen/AMDGPU/add.i16.ll
test/CodeGen/AMDGPU/add.v2i16.ll
test/CodeGen/AMDGPU/bfe-patterns.ll
test/CodeGen/AMDGPU/ctlz.ll
test/CodeGen/AMDGPU/ctlz_zero_undef.ll
test/CodeGen/AMDGPU/ds_write2.ll
test/CodeGen/AMDGPU/fmed3.ll
test/CodeGen/AMDGPU/llvm.amdgcn.atomic.dec.ll
test/CodeGen/AMDGPU/llvm.amdgcn.atomic.inc.ll
test/CodeGen/AMDGPU/lshl64-to-32.ll [new file with mode: 0644]
test/CodeGen/AMDGPU/shift-and-i64-ubfe.ll
test/CodeGen/AMDGPU/srl.ll
test/CodeGen/AMDGPU/sub.i16.ll