summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2018-01-10 09:32:01 +0000
committerDiana Picus <diana.picus@linaro.org>2018-01-10 09:32:01 +0000
commit734a5e8912b885c81d480afa3d33acb2636519a9 (patch)
tree8e9fdf21fdf2c0ed168bcccef59b836175da6b46 /llvm/lib
parentd9dde1ac56ceb00c1b1d74707a710871b4c2be32 (diff)
downloadbcm5719-llvm-734a5e8912b885c81d480afa3d33acb2636519a9.tar.gz
bcm5719-llvm-734a5e8912b885c81d480afa3d33acb2636519a9.zip
[ARM GlobalISel] Legalize G_CONSTANT for scalars > 32 bits
Make G_CONSTANT narrow for any scalars larger than 32 bits. llvm-svn: 322162
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/ARMLegalizerInfo.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
index 569e61aae29..fe526fef97e 100644
--- a/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMLegalizerInfo.cpp
@@ -59,7 +59,7 @@ widen_8_16(const LegalizerInfo::SizeAndActionsVec &v) {
}
static LegalizerInfo::SizeAndActionsVec
-widen_1_8_16(const LegalizerInfo::SizeAndActionsVec &v) {
+widen_1_8_16_narrowToLargest(const LegalizerInfo::SizeAndActionsVec &v) {
assert(v.size() >= 1);
assert(v[0].first > 17);
LegalizerInfo::SizeAndActionsVec result = {
@@ -68,7 +68,7 @@ widen_1_8_16(const LegalizerInfo::SizeAndActionsVec &v) {
{16, LegalizerInfo::WidenScalar}, {17, LegalizerInfo::Unsupported}};
addAndInterleaveWithUnsupported(result, v);
auto Largest = result.back().first;
- result.push_back({Largest + 1, LegalizerInfo::Unsupported});
+ result.push_back({Largest + 1, LegalizerInfo::NarrowScalar});
return result;
}
@@ -151,7 +151,8 @@ ARMLegalizerInfo::ARMLegalizerInfo(const ARMSubtarget &ST) {
setAction({G_CONSTANT, s32}, Legal);
setAction({G_CONSTANT, p0}, Legal);
- setLegalizeScalarToDifferentSizeStrategy(G_CONSTANT, 0, widen_1_8_16);
+ setLegalizeScalarToDifferentSizeStrategy(G_CONSTANT, 0,
+ widen_1_8_16_narrowToLargest);
setAction({G_ICMP, s1}, Legal);
setLegalizeScalarToDifferentSizeStrategy(G_ICMP, 1,
OpenPOWER on IntegriCloud