brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · 74e3a6d Raw
67 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=aarch64-unknown-unknown -mcpu=cyclone -mattr=+slow-misaligned-128store | FileCheck %s --check-prefixes=CHECK,SPLITTING3; RUN: llc < %s -mtriple=aarch64 -mattr=-slow-misaligned-128store | FileCheck %s --check-prefixes=CHECK,MISALIGNED4 5@g0 = external dso_local global <3 x float>, align 166@g1 = external dso_local global <3 x float>, align 47 8define void @blam() {9; SPLITTING-LABEL: blam:10; SPLITTING:       // %bb.0:11; SPLITTING-NEXT:    adrp x8, g112; SPLITTING-NEXT:    add x8, x8, :lo12:g113; SPLITTING-NEXT:    adrp x9, g014; SPLITTING-NEXT:    ldr d0, [x9, :lo12:g0]15; SPLITTING-NEXT:    str d0, [x8]16; SPLITTING-NEXT:    ret17;18; MISALIGNED-LABEL: blam:19; MISALIGNED:       // %bb.0:20; MISALIGNED-NEXT:    adrp x8, g021; MISALIGNED-NEXT:    ldr d0, [x8, :lo12:g0]22; MISALIGNED-NEXT:    adrp x8, g123; MISALIGNED-NEXT:    add x8, x8, :lo12:g124; MISALIGNED-NEXT:    str d0, [x8]25; MISALIGNED-NEXT:    ret26  %tmp4 = getelementptr inbounds <3 x float>, ptr @g1, i64 0, i64 027  %tmp5 = load <3 x float>, ptr @g0, align 1628  %tmp6 = extractelement <3 x float> %tmp5, i64 029  store float %tmp6, ptr %tmp430  %tmp7 = getelementptr inbounds float, ptr %tmp4, i64 131  %tmp8 = load <3 x float>, ptr @g0, align 1632  %tmp9 = extractelement <3 x float> %tmp8, i64 133  store float %tmp9, ptr %tmp734  ret void;35}36 37 38; PR21711 - Merge vector stores into wider vector stores.39 40; On Cyclone, the stores should not get merged into a 16-byte store because41; unaligned 16-byte stores are slow. This test would infinite loop when42; the fastness of unaligned accesses was not specified correctly.43 44define void @merge_vec_extract_stores(<4 x float> %v1, ptr %ptr) {45; SPLITTING-LABEL: merge_vec_extract_stores:46; SPLITTING:       // %bb.0:47; SPLITTING-NEXT:    ext v1.16b, v0.16b, v0.16b, #848; SPLITTING-NEXT:    stp d0, d1, [x0, #24]49; SPLITTING-NEXT:    ret50;51; MISALIGNED-LABEL: merge_vec_extract_stores:52; MISALIGNED:       // %bb.0:53; MISALIGNED-NEXT:    stur q0, [x0, #24]54; MISALIGNED-NEXT:    ret55  %idx0 = getelementptr inbounds <2 x float>, ptr %ptr, i64 356  %idx1 = getelementptr inbounds <2 x float>, ptr %ptr, i64 457 58  %shuffle0 = shufflevector <4 x float> %v1, <4 x float> undef, <2 x i32> <i32 0, i32 1>59  %shuffle1 = shufflevector <4 x float> %v1, <4 x float> undef, <2 x i32> <i32 2, i32 3>60 61  store <2 x float> %shuffle0, ptr %idx0, align 862  store <2 x float> %shuffle1, ptr %idx1, align 863  ret void64}65;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:66; CHECK: {{.*}}67