AMDGPU: Partially fix default device for HSA
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 17 Mar 2019 21:31:35 +0000 (21:31 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 17 Mar 2019 21:31:35 +0000 (21:31 +0000)
commite0c1f9e76d595bbcbd0686d762cd8cc2eed3c7e9
treeb0f801088db9a35aed25d0e7199c2eec1e95eb6c
parent5e7b62de0560ba0f68dd395a08326d30a26f156a
AMDGPU: Partially fix default device for HSA

There are a few different issues, mostly stemming from using
generation based checks for anything instead of subtarget
features. Stop adding flat-address-space as a feature for HSA, as it
should only be a device property. This was incorrectly allowing flat
instructions to select for SI.

Increase the default generation for HSA to avoid the encoding error
when emitting objects. This has some other side effects from various
checks which probably should be separate subtarget features (in the
cost model and for dealing with the DS offset folding issue).

Partial fix for bug 41070. It should probably be an error to try using
amdhsa without flat support.

llvm-svn: 356347
llvm/lib/Support/TargetParser.cpp
llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
llvm/lib/Target/AMDGPU/GCNProcessors.td
llvm/test/Analysis/CostModel/AMDGPU/fdiv.ll
llvm/test/CodeGen/AMDGPU/flat-error-unsupported-gpu-hsa.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/lower-kernargs.ll