diff options
| author | Diana Picus <diana.picus@linaro.org> | 2018-01-10 09:32:01 +0000 |
|---|---|---|
| committer | Diana Picus <diana.picus@linaro.org> | 2018-01-10 09:32:01 +0000 |
| commit | 734a5e8912b885c81d480afa3d33acb2636519a9 (patch) | |
| tree | 8e9fdf21fdf2c0ed168bcccef59b836175da6b46 /llvm/lib | |
| parent | d9dde1ac56ceb00c1b1d74707a710871b4c2be32 (diff) | |
| download | bcm5719-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.cpp | 7 |
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, |

