summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86LegalizerInfo.cpp
diff options
context:
space:
mode:
authorIgor Breger <igor.breger@intel.com>2017-05-08 09:40:43 +0000
committerIgor Breger <igor.breger@intel.com>2017-05-08 09:40:43 +0000
commit810c6257f112e582624a70e9523d94275f66d004 (patch)
treea10c70345615fae36111096f68cd3df75ccc9ce0 /llvm/lib/Target/X86/X86LegalizerInfo.cpp
parent511f0b8d02ae14d243aeb81cb9e3621ba25076d4 (diff)
downloadbcm5719-llvm-810c6257f112e582624a70e9523d94275f66d004.tar.gz
bcm5719-llvm-810c6257f112e582624a70e9523d94275f66d004.zip
[GlobalISel][X86] G_GEP selection support.
Summary: [GlobalISel][X86] G_GEP selection support. Reviewers: zvi, guyblank Reviewed By: guyblank Subscribers: dberris, rovka, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D32396 llvm-svn: 302412
Diffstat (limited to 'llvm/lib/Target/X86/X86LegalizerInfo.cpp')
-rw-r--r--llvm/lib/Target/X86/X86LegalizerInfo.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86LegalizerInfo.cpp b/llvm/lib/Target/X86/X86LegalizerInfo.cpp
index ae123c6349a..4f5e70414aa 100644
--- a/llvm/lib/Target/X86/X86LegalizerInfo.cpp
+++ b/llvm/lib/Target/X86/X86LegalizerInfo.cpp
@@ -70,6 +70,12 @@ void X86LegalizerInfo::setLegalizerInfo32bit() {
// Pointer-handling
setAction({G_FRAME_INDEX, p0}, Legal);
+ setAction({G_GEP, p0}, Legal);
+ setAction({G_GEP, 1, s32}, Legal);
+
+ for (auto Ty : {s1, s8, s16})
+ setAction({G_GEP, 1, Ty}, WidenScalar);
+
// Constants
for (auto Ty : {s8, s16, s32, p0})
setAction({TargetOpcode::G_CONSTANT, Ty}, Legal);
@@ -114,6 +120,13 @@ void X86LegalizerInfo::setLegalizerInfo64bit() {
// Pointer-handling
setAction({G_FRAME_INDEX, p0}, Legal);
+ setAction({G_GEP, p0}, Legal);
+ setAction({G_GEP, 1, s32}, Legal);
+ setAction({G_GEP, 1, s64}, Legal);
+
+ for (auto Ty : {s1, s8, s16})
+ setAction({G_GEP, 1, Ty}, WidenScalar);
+
// Constants
for (auto Ty : {s8, s16, s32, s64, p0})
setAction({TargetOpcode::G_CONSTANT, Ty}, Legal);
OpenPOWER on IntegriCloud