summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86LegalizerInfo.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2017-06-26 20:34:13 +0000
committerTim Northover <tnorthover@apple.com>2017-06-26 20:34:13 +0000
commitc2d5e6d63774c5d015c7b5e1b6822d854e1ac465 (patch)
treeb620d740100fbf0d9da4e3ffa5c00383466f167e /llvm/lib/Target/X86/X86LegalizerInfo.cpp
parentf6766bd2464bd5e405c5450cfa9daad7035d0ddb (diff)
downloadbcm5719-llvm-c2d5e6d63774c5d015c7b5e1b6822d854e1ac465.tar.gz
bcm5719-llvm-c2d5e6d63774c5d015c7b5e1b6822d854e1ac465.zip
AArch64: legalize G_EXTRACT operations.
This is the dual problem to legalizing G_INSERTs so most of the code and testing was cribbed from there. llvm-svn: 306328
Diffstat (limited to 'llvm/lib/Target/X86/X86LegalizerInfo.cpp')
-rw-r--r--llvm/lib/Target/X86/X86LegalizerInfo.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86LegalizerInfo.cpp b/llvm/lib/Target/X86/X86LegalizerInfo.cpp
index a584eabcc1b..53215296ce6 100644
--- a/llvm/lib/Target/X86/X86LegalizerInfo.cpp
+++ b/llvm/lib/Target/X86/X86LegalizerInfo.cpp
@@ -228,10 +228,14 @@ void X86LegalizerInfo::setLegalizerInfoAVX() {
for (auto Ty : {v8s32, v4s64})
setAction({MemOp, Ty}, Legal);
- for (auto Ty : {v32s8, v16s16, v8s32, v4s64})
+ for (auto Ty : {v32s8, v16s16, v8s32, v4s64}) {
setAction({G_INSERT, Ty}, Legal);
- for (auto Ty : {v16s8, v8s16, v4s32, v2s64})
+ setAction({G_EXTRACT, 1, Ty}, Legal);
+ }
+ for (auto Ty : {v16s8, v8s16, v4s32, v2s64}) {
setAction({G_INSERT, 1, Ty}, Legal);
+ setAction({G_EXTRACT, Ty}, Legal);
+ }
}
void X86LegalizerInfo::setLegalizerInfoAVX2() {
@@ -280,10 +284,14 @@ void X86LegalizerInfo::setLegalizerInfoAVX512() {
for (auto Ty : {v16s32, v8s64})
setAction({MemOp, Ty}, Legal);
- for (auto Ty : {v64s8, v32s16, v16s32, v8s64})
+ for (auto Ty : {v64s8, v32s16, v16s32, v8s64}) {
setAction({G_INSERT, Ty}, Legal);
- for (auto Ty : {v32s8, v16s16, v8s32, v4s64, v16s8, v8s16, v4s32, v2s64})
+ setAction({G_EXTRACT, 1, Ty}, Legal);
+ }
+ for (auto Ty : {v32s8, v16s16, v8s32, v4s64, v16s8, v8s16, v4s32, v2s64}) {
setAction({G_INSERT, 1, Ty}, Legal);
+ setAction({G_EXTRACT, Ty}, Legal);
+ }
/************ VLX *******************/
if (!Subtarget.hasVLX())
OpenPOWER on IntegriCloud