summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorPetar Avramovic <Petar.Avramovic@rt-rk.com>2019-07-17 12:08:01 +0000
committerPetar Avramovic <Petar.Avramovic@rt-rk.com>2019-07-17 12:08:01 +0000
commit1e62635d0551578bf3899d2a1f4c835e30f2eed8 (patch)
treee3420a3dc1aa0c061946c800ee3027aa1525bdd4 /llvm/lib/Target
parent60bd7a9c13bdb6da854c4a7b595407c0ce18b55d (diff)
downloadbcm5719-llvm-1e62635d0551578bf3899d2a1f4c835e30f2eed8.tar.gz
bcm5719-llvm-1e62635d0551578bf3899d2a1f4c835e30f2eed8.zip
[MIPS GlobalISel] ClampScalar and select pointer G_ICMP
Add narrowScalar to half of original size for G_ICMP. ClampScalar G_ICMP's operands 2 and 3 to to s32. Select G_ICMP for pointers for MIPS32. Pointer compare is same as for integers, it is enough to declare them as legal type. Differential Revision: https://reviews.llvm.org/D64856 llvm-svn: 366317
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/Mips/MipsLegalizerInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/Mips/MipsLegalizerInfo.cpp b/llvm/lib/Target/Mips/MipsLegalizerInfo.cpp
index 621f3e54a04..e442a81837e 100644
--- a/llvm/lib/Target/Mips/MipsLegalizerInfo.cpp
+++ b/llvm/lib/Target/Mips/MipsLegalizerInfo.cpp
@@ -81,7 +81,8 @@ MipsLegalizerInfo::MipsLegalizerInfo(const MipsSubtarget &ST) {
.minScalar(1, s32);
getActionDefinitionsBuilder(G_ICMP)
- .legalFor({{s32, s32}})
+ .legalForCartesianProduct({s32}, {s32, p0})
+ .clampScalar(1, s32, s32)
.minScalar(0, s32);
getActionDefinitionsBuilder(G_CONSTANT)
OpenPOWER on IntegriCloud