diff options
| author | Nirav Dave <niravd@google.com> | 2017-06-21 20:50:07 +0000 |
|---|---|---|
| committer | Nirav Dave <niravd@google.com> | 2017-06-21 20:50:07 +0000 |
| commit | 6919b9e9f0109dbc70bd0ea2e2aa0bece6d7a0c1 (patch) | |
| tree | 9c86342df74d94cfbdd997a11a94dd2a2bd148ef /llvm/test | |
| parent | cae62546acdecd3d1abb68652b4ce214224788f9 (diff) | |
| download | bcm5719-llvm-6919b9e9f0109dbc70bd0ea2e2aa0bece6d7a0c1.tar.gz bcm5719-llvm-6919b9e9f0109dbc70bd0ea2e2aa0bece6d7a0c1.zip | |
Add Aarch64 ldst-opt test.
llvm-svn: 305951
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/AArch64/ldst-opt.ll | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/ldst-opt.ll b/llvm/test/CodeGen/AArch64/ldst-opt.ll index b09fab8d8b4..975e5ae8b95 100644 --- a/llvm/test/CodeGen/AArch64/ldst-opt.ll +++ b/llvm/test/CodeGen/AArch64/ldst-opt.ll @@ -1608,3 +1608,63 @@ entry: store <4 x double> zeroinitializer, <4 x double>* %p ret void } + +; Verify that non-consecutive merges do not generate q0 +define void @merge_multiple_128bit_stores(i64* %p) { +; CHECK-LABEL: merge_multiple_128bit_stores +; CHECK: // %entry +; NOSTRICTALIGN-NEXT: movi v[[REG:[0-9]]].2d, #0000000000000000 +; NOSTRICTALIGN-NEXT: str q0, [x0] +; NOSTRICTALIGN-NEXT: stur q0, [x0, #24] +; NOSTRICTALIGN-NEXT: str q0, [x0, #48] +; STRICTALIGN-NEXT: stp xzr, xzr, [x0] +; STRICTALIGN-NEXT: stp xzr, xzr, [x0, #24] +; STRICTALIGN-NEXT: stp xzr, xzr, [x0, #48] +; CHECK-NEXT: ret +entry: + store i64 0, i64* %p + %p1 = getelementptr i64, i64* %p, i64 1 + store i64 0, i64* %p1 + %p3 = getelementptr i64, i64* %p, i64 3 + store i64 0, i64* %p3 + %p4 = getelementptr i64, i64* %p, i64 4 + store i64 0, i64* %p4 + %p6 = getelementptr i64, i64* %p, i64 6 + store i64 0, i64* %p6 + %p7 = getelementptr i64, i64* %p, i64 7 + store i64 0, i64* %p7 + ret void +} + +; Verify that large stores generate stp q +define void @merge_multiple_128bit_stores_consec(i64* %p) { +; CHECK-LABEL: merge_multiple_128bit_stores_consec +; CHECK: // %entry +; NOSTRICTALIGN-NEXT: movi v[[REG:[0-9]]].2d, #0000000000000000 +; NOSTRICTALIGN-NEXT: stp q[[REG]], q[[REG]], [x{{[0-9]+}}] +; NOSTRICTALIGN-NEXT: stp q[[REG]], q[[REG]], [x{{[0-9]+}}, #32] +; STRICTALIGN-NEXT: stp xzr, xzr, [x0] +; STRICTALIGN-NEXT: stp xzr, xzr, [x0, #16] +; STRICTALIGN-NEXT: stp xzr, xzr, [x0, #32] +; STRICTALIGN-NEXT: stp xzr, xzr, [x0, #48] +; CHECK-NEXT: ret +entry: + store i64 0, i64* %p + %p1 = getelementptr i64, i64* %p, i64 1 + store i64 0, i64* %p1 + %p2 = getelementptr i64, i64* %p, i64 2 + store i64 0, i64* %p2 + %p3 = getelementptr i64, i64* %p, i64 3 + store i64 0, i64* %p3 + %p4 = getelementptr i64, i64* %p, i64 4 + store i64 0, i64* %p4 + %p5 = getelementptr i64, i64* %p, i64 5 + store i64 0, i64* %p5 + %p6 = getelementptr i64, i64* %p, i64 6 + store i64 0, i64* %p6 + %p7 = getelementptr i64, i64* %p, i64 7 + store i64 0, i64* %p7 + ret void +} + + |

