brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 18057ac Raw
68 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc --mtriple=loongarch32 < %s | FileCheck %s --check-prefix=LA323; RUN: llc --mtriple=loongarch64 < %s | FileCheck %s --check-prefix=LA644 5declare void @llvm.prefetch(ptr, i32, i32, i32)6 7define void @load_prefetch_no_offset(ptr %a) {8; LA32-LABEL: load_prefetch_no_offset:9; LA32:       # %bb.0: # %entry10; LA32-NEXT:    preld 0, $a0, 011; LA32-NEXT:    ret12;13; LA64-LABEL: load_prefetch_no_offset:14; LA64:       # %bb.0: # %entry15; LA64-NEXT:    preld 0, $a0, 016; LA64-NEXT:    ret17entry:18  call void @llvm.prefetch(ptr %a, i32 0, i32 3, i32 1)19  ret void20}21 22define void @store_prefetch_no_offset(ptr %a) {23; LA32-LABEL: store_prefetch_no_offset:24; LA32:       # %bb.0: # %entry25; LA32-NEXT:    preld 8, $a0, 026; LA32-NEXT:    ret27;28; LA64-LABEL: store_prefetch_no_offset:29; LA64:       # %bb.0: # %entry30; LA64-NEXT:    preld 8, $a0, 031; LA64-NEXT:    ret32entry:33  call void @llvm.prefetch(ptr %a, i32 1, i32 3, i32 1)34  ret void35}36 37define void @load_prefetch_with_offset(ptr %a) {38; LA32-LABEL: load_prefetch_with_offset:39; LA32:       # %bb.0: # %entry40; LA32-NEXT:    preld 0, $a0, 20041; LA32-NEXT:    ret42;43; LA64-LABEL: load_prefetch_with_offset:44; LA64:       # %bb.0: # %entry45; LA64-NEXT:    preld 0, $a0, 20046; LA64-NEXT:    ret47entry:48  %addr = getelementptr i8, ptr %a, i64 20049  call void @llvm.prefetch(ptr %addr, i32 0, i32 3, i32 1)50  ret void51}52 53define void @store_prefetch_with_offset(ptr %a) {54; LA32-LABEL: store_prefetch_with_offset:55; LA32:       # %bb.0: # %entry56; LA32-NEXT:    preld 8, $a0, 20057; LA32-NEXT:    ret58;59; LA64-LABEL: store_prefetch_with_offset:60; LA64:       # %bb.0: # %entry61; LA64-NEXT:    preld 8, $a0, 20062; LA64-NEXT:    ret63entry:64  %addr = getelementptr i8, ptr %a, i64 20065  call void @llvm.prefetch(ptr %addr, i32 1, i32 3, i32 1)66  ret void67}68