diff options
| author | Tim Northover <tnorthover@apple.com> | 2017-06-30 20:27:36 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2017-06-30 20:27:36 +0000 |
| commit | ff5e7e12956705c8f523848485042835fac58eea (patch) | |
| tree | db81cfb778bad4ce4562eff98c4ebc7e0c6e04a9 /llvm/lib/Target | |
| parent | ad72256daa2d8e20334bd29e2e7364c07840f250 (diff) | |
| download | bcm5719-llvm-ff5e7e12956705c8f523848485042835fac58eea.tar.gz bcm5719-llvm-ff5e7e12956705c8f523848485042835fac58eea.zip | |
GlobalISel: add G_IMPLICIT_DEF instruction.
It looks like there are two target-independent but not GISel instructions that
need legalization, IMPLICIT_DEF and PHI. These are already anomalies since
their operands have important LLTs attached, so to make things more uniform it
seems like a good idea to add generic variants. Starting with G_IMPLICIT_DEF.
llvm-svn: 306875
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp b/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp index 25779774949..4b568f3fba2 100644 --- a/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp +++ b/llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp @@ -39,6 +39,9 @@ AArch64LegalizerInfo::AArch64LegalizerInfo() { const LLT v4s32 = LLT::vector(4, 32); const LLT v2s64 = LLT::vector(2, 64); + for (auto Ty : {p0, s1, s8, s16, s32, s64}) + setAction({G_IMPLICIT_DEF, Ty}, Legal); + for (unsigned BinOp : {G_ADD, G_SUB, G_MUL, G_AND, G_OR, G_XOR, G_SHL}) { // These operations naturally get the right answer when used on // GPR32, even if the actual type is narrower. |

