summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2017-06-19 13:15:45 +0000
committerTom Stellard <tstellar@redhat.com>2017-06-19 13:15:45 +0000
commitff63ee0db5eb2b6d19d13ed1ffe5e5b57df4b618 (patch)
treeea64089befacc46fe76f948ad24a4f83632c8a59 /llvm/lib/Target
parentbd2dedaa38b13325fe8b2b0e1536fcf5dbe37036 (diff)
downloadbcm5719-llvm-ff63ee0db5eb2b6d19d13ed1ffe5e5b57df4b618.tar.gz
bcm5719-llvm-ff63ee0db5eb2b6d19d13ed1ffe5e5b57df4b618.zip
AMDGPU/GlobalISel: Mark G_BITCAST s32 <--> <2 x s16> legal
Reviewers: arsenm Reviewed By: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D34129 llvm-svn: 305692
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
index 790a69b8439..58c025faffc 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
@@ -29,6 +29,7 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo() {
using namespace TargetOpcode;
const LLT S1= LLT::scalar(1);
+ const LLT V2S16 = LLT::vector(2, 16);
const LLT S32 = LLT::scalar(32);
const LLT S64 = LLT::scalar(64);
const LLT P1 = LLT::pointer(1, 64);
@@ -36,6 +37,12 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo() {
setAction({G_ADD, S32}, Legal);
+ setAction({G_BITCAST, V2S16}, Legal);
+ setAction({G_BITCAST, 1, S32}, Legal);
+
+ setAction({G_BITCAST, S32}, Legal);
+ setAction({G_BITCAST, 1, V2S16}, Legal);
+
// FIXME: i1 operands to intrinsics should always be legal, but other i1
// values may not be legal. We need to figure out how to distinguish
// between these two scenarios.
OpenPOWER on IntegriCloud