diff options
| author | Tim Northover <tnorthover@apple.com> | 2017-03-03 23:05:47 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2017-03-03 23:05:47 +0000 |
| commit | 3e6a7afd8195d5d8ac28fb1b7e1c28f763d73a2e (patch) | |
| tree | 3f7fa9ab5b9610ab6d07e28d1f2477c11f6ed53f /llvm/lib/Target | |
| parent | 5ba962706f6ccd36fce7660314f34809685eee9c (diff) | |
| download | bcm5719-llvm-3e6a7afd8195d5d8ac28fb1b7e1c28f763d73a2e.tar.gz bcm5719-llvm-3e6a7afd8195d5d8ac28fb1b7e1c28f763d73a2e.zip | |
GlobalISel: constrain G_INSERT to inserting just one value per instruction.
It's much easier to reason about single-value inserts and no-one was actually
using the variadic variants before.
llvm-svn: 296923
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp b/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp index 651925e616f..6e6daf81229 100644 --- a/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp +++ b/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp @@ -88,14 +88,13 @@ AArch64LegalizerInfo::AArch64LegalizerInfo() { setAction({BinOp, s64}, Libcall); } - // FIXME: what should we do about G_INSERTs with more than one source value? - // For now the default of not specifying means we'll fall back. - for (auto Ty : {s32, s64}) { + for (auto Ty : {s32, s64, p0}) { setAction({G_INSERT, Ty}, Legal); setAction({G_INSERT, 1, Ty}, Legal); } for (auto Ty : {s1, s8, s16}) { setAction({G_INSERT, Ty}, WidenScalar); + setAction({G_INSERT, 1, Ty}, Legal); // FIXME: Can't widen the sources because that violates the constraints on // G_INSERT (It seems entirely reasonable that inputs shouldn't overlap). } |

