diff options
| author | Volkan Keles <vkeles@apple.com> | 2018-10-25 17:23:25 +0000 |
|---|---|---|
| committer | Volkan Keles <vkeles@apple.com> | 2018-10-25 17:23:25 +0000 |
| commit | 3a103b1d2575483e50b974c1f5a41102f264d62f (patch) | |
| tree | aad680ef0ee96aa20878ccf2f654fd2e50220b3e /llvm/test/CodeGen/AArch64 | |
| parent | f25b75b91b2d5906609bb609d39cf0ee3dcc746b (diff) | |
| download | bcm5719-llvm-3a103b1d2575483e50b974c1f5a41102f264d62f.tar.gz bcm5719-llvm-3a103b1d2575483e50b974c1f5a41102f264d62f.zip | |
[AArch64][GlobalISel] Fix the LegalityPredicate for lowerIf for G_LOAD/G_STORE
Summary:
Currently, Legalizer is trying to lower G_LOAD with a vector type
that has more than two elements due to the incorrect LegalityPredicate.
This patch fixes the issue by removing the multiplication by 8
as `MemDesc.Size` already contains the size in bits.
Reviewers: dsanders, aemerson
Reviewed By: dsanders
Subscribers: rovka, javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D53679
llvm-svn: 345282
Diffstat (limited to 'llvm/test/CodeGen/AArch64')
| -rw-r--r-- | llvm/test/CodeGen/AArch64/GlobalISel/legalize-load-v4s32.mir | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-load-v4s32.mir b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-load-v4s32.mir new file mode 100644 index 00000000000..8493bd8292c --- /dev/null +++ b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-load-v4s32.mir @@ -0,0 +1,21 @@ +# RUN: not llc -march=aarch64 -o - -run-pass=legalizer -debug-only=legalizer 2>&1 %s | FileCheck %s +# REQUIRES: asserts + +# CHECK: Legalize Machine IR for: load_v4s32 +# CHECK-NEXT: %{{[0-9]+}}:_(<4 x s32>) = G_LOAD %{{[0-9]+}}:_(p0) +# CHECK-NOT: Lower +# CHECK: unable to legalize instruction +--- +name: load_v4s32 +legalized: false +tracksRegLiveness: true +body: | + bb.1: + liveins: $x0 + + %0:_(p0) = COPY $x0 + %1:_(<4 x s32>) = G_LOAD %0(p0) :: (load 16, align 4) + %2:_(s32), %3:_(s32), %4:_(s32), %5:_(s32) = G_UNMERGE_VALUES %1(<4 x s32>) + $w0 = COPY %5(s32) + +... |

