summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2016-09-16 22:20:24 +0000
committerTom Stellard <thomas.stellard@amd.com>2016-09-16 22:20:24 +0000
commit7998db634cc8532fe7f00f4bc587611e926f463a (patch)
treeac744873bf4c601f875f4b9820857d488bf96c58 /llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
parent6ee60bcf9b8048e7cdbf7caf99c5340e7e72091f (diff)
downloadbcm5719-llvm-7998db634cc8532fe7f00f4bc587611e926f463a.tar.gz
bcm5719-llvm-7998db634cc8532fe7f00f4bc587611e926f463a.zip
AMDGPU/SI: Fix kernel argument ABI for HSA
Summary: i8, i16, and f16 values are not extended to 32-bit in the HSA kernel ABI. Reviewers: arsenm Subscribers: arsenm, kzhuravl, wdng, nhaehnle, llvm-commits, yaxunl Differential Revision: https://reviews.llvm.org/D24621 llvm-svn: 281789
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
index 030166539c7..22871e64a3e 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
@@ -660,7 +660,8 @@ void AMDGPUTargetLowering::analyzeFormalArgumentsCompute(CCState &State,
unsigned NumRegs = getNumRegisters(State.getContext(), In.ArgVT);
- if (In.ArgVT == MVT::i16 || In.ArgVT == MVT::i8 || In.ArgVT == MVT::f16) {
+ if (!Subtarget->isAmdHsaOS() &&
+ (In.ArgVT == MVT::i16 || In.ArgVT == MVT::i8 || In.ArgVT == MVT::f16)) {
// The ABI says the caller will extend these values to 32-bits.
MemVT = In.ArgVT.isInteger() ? MVT::i32 : MVT::f32;
} else if (NumRegs == 1) {
OpenPOWER on IntegriCloud