|
1 |
| -; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --filter-out "\b(sp)\b" --filter "^\s*(ld|st[^r]|swp|cas|bl|add|and|eor|orn|orr|sub|mvn|sxt|cmp|ccmp|csel|dmb)" |
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --filter-out "(?!^\s*lda.*\bsp\b)^\s*.*\bsp\b" --filter "^\s*(ld|st[^r]|swp|cas|bl|add|and|eor|orn|orr|sub|mvn|sxt|cmp|ccmp|csel|dmb)" |
2 | 2 | ; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+v8.4a -mattr=+rcpc-immo -global-isel=true -global-isel-abort=2 -O0 | FileCheck %s --check-prefixes=CHECK,GISEL
|
3 | 3 | ; RUN: llc %s -o - -verify-machineinstrs -mtriple=aarch64 -mattr=+v8.4a -mattr=+rcpc-immo -global-isel=false -O1 | FileCheck %s --check-prefixes=CHECK,SDAG
|
4 | 4 |
|
@@ -815,3 +815,82 @@ define i128 @load_atomic_i128_unaligned_seq_cst_const(ptr readonly %ptr) {
|
815 | 815 | %r = load atomic i128, ptr %gep seq_cst, align 1
|
816 | 816 | ret i128 %r
|
817 | 817 | }
|
| 818 | + |
| 819 | +define i8 @load_atomic_i8_from_gep() { |
| 820 | +; GISEL-LABEL: load_atomic_i8_from_gep: |
| 821 | +; GISEL: bl init |
| 822 | +; GISEL: ldapurb w0, [x8, #1] |
| 823 | +; |
| 824 | +; SDAG-LABEL: load_atomic_i8_from_gep: |
| 825 | +; SDAG: bl init |
| 826 | +; SDAG: ldapurb w0, [sp, #13] |
| 827 | + %a = alloca [3 x i8] |
| 828 | + call void @init(ptr %a) |
| 829 | + %arrayidx = getelementptr [3 x i8], ptr %a, i64 0, i64 1 |
| 830 | + %l = load atomic i8, ptr %arrayidx acquire, align 8 |
| 831 | + ret i8 %l |
| 832 | +} |
| 833 | + |
| 834 | +define i16 @load_atomic_i16_from_gep() { |
| 835 | +; GISEL-LABEL: load_atomic_i16_from_gep: |
| 836 | +; GISEL: bl init |
| 837 | +; GISEL: ldapurh w0, [x8, #2] |
| 838 | +; |
| 839 | +; SDAG-LABEL: load_atomic_i16_from_gep: |
| 840 | +; SDAG: bl init |
| 841 | +; SDAG: ldapurh w0, [sp, #10] |
| 842 | + %a = alloca [3 x i16] |
| 843 | + call void @init(ptr %a) |
| 844 | + %arrayidx = getelementptr [3 x i16], ptr %a, i64 0, i64 1 |
| 845 | + %l = load atomic i16, ptr %arrayidx acquire, align 8 |
| 846 | + ret i16 %l |
| 847 | +} |
| 848 | + |
| 849 | +define i32 @load_atomic_i32_from_gep() { |
| 850 | +; GISEL-LABEL: load_atomic_i32_from_gep: |
| 851 | +; GISEL: bl init |
| 852 | +; GISEL: ldapur w0, [x8, #4] |
| 853 | +; |
| 854 | +; SDAG-LABEL: load_atomic_i32_from_gep: |
| 855 | +; SDAG: bl init |
| 856 | +; SDAG: ldapur w0, [sp, #8] |
| 857 | + %a = alloca [3 x i32] |
| 858 | + call void @init(ptr %a) |
| 859 | + %arrayidx = getelementptr [3 x i32], ptr %a, i64 0, i64 1 |
| 860 | + %l = load atomic i32, ptr %arrayidx acquire, align 8 |
| 861 | + ret i32 %l |
| 862 | +} |
| 863 | + |
| 864 | +define i64 @load_atomic_i64_from_gep() { |
| 865 | +; GISEL-LABEL: load_atomic_i64_from_gep: |
| 866 | +; GISEL: bl init |
| 867 | +; GISEL: ldapur x0, [x8, #8] |
| 868 | +; |
| 869 | +; SDAG-LABEL: load_atomic_i64_from_gep: |
| 870 | +; SDAG: bl init |
| 871 | +; SDAG: ldapur x0, [sp, #16] |
| 872 | + %a = alloca [3 x i64] |
| 873 | + call void @init(ptr %a) |
| 874 | + %arrayidx = getelementptr [3 x i64], ptr %a, i64 0, i64 1 |
| 875 | + %l = load atomic i64, ptr %arrayidx acquire, align 8 |
| 876 | + ret i64 %l |
| 877 | +} |
| 878 | + |
| 879 | +define i128 @load_atomic_i128_from_gep() { |
| 880 | +; GISEL-LABEL: load_atomic_i128_from_gep: |
| 881 | +; GISEL: bl init |
| 882 | +; GISEL: ldp x0, x1, [x8, #16] |
| 883 | +; GISEL: dmb ishld |
| 884 | +; |
| 885 | +; SDAG-LABEL: load_atomic_i128_from_gep: |
| 886 | +; SDAG: bl init |
| 887 | +; SDAG: ldp x0, x1, [sp, #16] |
| 888 | +; SDAG: dmb ishld |
| 889 | + %a = alloca [3 x i128] |
| 890 | + call void @init(ptr %a) |
| 891 | + %arrayidx = getelementptr [3 x i128], ptr %a, i64 0, i64 1 |
| 892 | + %l = load atomic i128, ptr %arrayidx acquire, align 16 |
| 893 | + ret i128 %l |
| 894 | +} |
| 895 | + |
| 896 | +declare void @init(ptr) |
0 commit comments