OSDN Git Service

AMDGPU: Avoid selecting ds_{read,write}2_b32 on SI
authorNicolai Haehnle <nhaehnle@gmail.com>
Wed, 17 Oct 2018 15:37:48 +0000 (15:37 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Wed, 17 Oct 2018 15:37:48 +0000 (15:37 +0000)
commit1db6c096861a48b487395f69a6857248a9a58a06
treebc2de302a9db4ac98f40ce980a4f953c92f5ce1f
parent2026bfdfbd1d01f3835abfb597169dd8241b78c2
AMDGPU: Avoid selecting ds_{read,write}2_b32 on SI

Summary:
To workaround a hardware issue in the (base + offset) calculation
when base is negative. The impact on code quality should be limited
since SILoadStoreOptimizer still runs afterwards and is able to
combine loads/stores based on known sign information.

This fixes visible corruption in Hitman on SI (easily reproducible
by running benchmark mode).

Change-Id: Ia178d207a5e2ac38ae7cd98b532ea2ae74704e5f
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99923

Reviewers: arsenm, mareko

Subscribers: jholewinski, kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344698 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
lib/Target/AMDGPU/DSInstructions.td
lib/Target/AMDGPU/SIISelLowering.cpp
test/CodeGen/AMDGPU/lds-bounds.ll [new file with mode: 0644]