source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/AArch64/128bit_load_store.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 1.4 KB
Line 
1; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-none-linux-gnu -mattr=neon | FileCheck %s --check-prefix=CHECK
2
3define void @test_store_f128(fp128* %ptr, fp128 %val) #0 {
4; CHECK-LABEL: test_store_f128
5; CHECK: str     {{q[0-9]+}}, [{{x[0-9]+}}]
6entry:
7  store fp128 %val, fp128* %ptr, align 16
8  ret void
9}
10
11define fp128 @test_load_f128(fp128* readonly %ptr) #2 {
12; CHECK-LABEL: test_load_f128
13; CHECK: ldr     {{q[0-9]+}}, [{{x[0-9]+}}]
14entry:
15  %0 = load fp128, fp128* %ptr, align 16
16  ret fp128 %0
17}
18
19define void @test_vstrq_p128(i128* %ptr, i128 %val) #0 {
20; CHECK-LABEL: test_vstrq_p128
21; CHECK: stp {{x[0-9]+}}, {{x[0-9]+}}, [{{x[0-9]+}}]
22
23entry:
24  %0 = bitcast i128* %ptr to fp128*
25  %1 = bitcast i128 %val to fp128
26  store fp128 %1, fp128* %0, align 16
27  ret void
28}
29
30define i128 @test_vldrq_p128(i128* readonly %ptr) #2 {
31; CHECK-LABEL: test_vldrq_p128
32; CHECK: ldp {{x[0-9]+}}, {{x[0-9]+}}, [{{x[0-9]+}}]
33
34entry:
35  %0 = bitcast i128* %ptr to fp128*
36  %1 = load fp128, fp128* %0, align 16
37  %2 = bitcast fp128 %1 to i128
38  ret i128 %2
39}
40
41define void @test_ld_st_p128(i128* nocapture %ptr) #0 {
42; CHECK-LABEL: test_ld_st_p128
43; CHECK: ldr {{q[0-9]+}}, [{{x[0-9]+}}]
44; CHECK-NEXT: str       {{q[0-9]+}}, [{{x[0-9]+}}, #16]
45entry:
46  %0 = bitcast i128* %ptr to fp128*
47  %1 = load fp128, fp128* %0, align 16
48  %add.ptr = getelementptr inbounds i128, i128* %ptr, i64 1
49  %2 = bitcast i128* %add.ptr to fp128*
50  store fp128 %1, fp128* %2, align 16
51  ret void
52}
53
Note: See TracBrowser for help on using the repository browser.