Skip to content

Commit

Permalink
[AArch64][MachineLegalizer] Mark v2s32 G_LOAD as legal.
Browse files Browse the repository at this point in the history
Actually every 64-bit loads are legal, but right now the API does not
offer a simple way to express that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283829 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Quentin Colombet committed Oct 11, 2016
1 parent 51c08b7 commit 589c5da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Target/AArch64/AArch64MachineLegalizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ AArch64MachineLegalizer::AArch64MachineLegalizer() {
setAction({G_FREM, s64}, Libcall);

for (auto MemOp : {G_LOAD, G_STORE}) {
for (auto Ty : {s8, s16, s32, s64, p0})
for (auto Ty : {s8, s16, s32, s64, p0, v2s32})
setAction({MemOp, Ty}, Legal);

setAction({MemOp, s1}, WidenScalar);
Expand Down
4 changes: 4 additions & 0 deletions test/CodeGen/AArch64/GlobalISel/legalize-load-store.mir
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ registers:
- { id: 4, class: _ }
- { id: 5, class: _ }
- { id: 6, class: _ }
- { id: 7, class: _ }
body: |
bb.0.entry:
liveins: %x0, %x1, %x2, %x3
Expand All @@ -47,6 +48,9 @@ body: |
; CHECK: %6(p0) = G_LOAD %0(p0) :: (load 8 from %ir.addr)
%6(p0) = G_LOAD %0(p0) :: (load 8 from %ir.addr)
; CHECK: %7(<2 x s32>) = G_LOAD %0(p0) :: (load 8 from %ir.addr)
%7(<2 x s32>) = G_LOAD %0(p0) :: (load 8 from %ir.addr)
...

---
Expand Down

0 comments on commit 589c5da

Please sign in to comment.