R600/SI: Initialize M0 and emit S_WQM_B64 whenever DS instructions are used
authorTom Stellard <thomas.stellard@amd.com>
Mon, 10 Feb 2014 16:58:30 +0000 (16:58 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 10 Feb 2014 16:58:30 +0000 (16:58 +0000)
commit42faffddb903cfa91084b1ea362a0163bc2a2ae9
tree0c448d9baf87293071da699d0d30d6af7bd4efe3
parent835f1c01bf28454955b74b3869025a0082122cea
R600/SI: Initialize M0 and emit S_WQM_B64 whenever DS instructions are used

DS instructions that access local memory can only uses addresses that
are less than or equal to the value of M0.  When M0 is uninitialized,
then we experience undefined behavior.

This patch also changes the behavior to emit S_WQM_B64 on pixel shaders
no matter what kind of DS instruction is used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201097 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/R600/SIInstrInfo.cpp
lib/Target/R600/SIInstrInfo.h
lib/Target/R600/SIInstrInfo.td
lib/Target/R600/SILowerControlFlow.cpp
test/CodeGen/R600/load.ll