CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
26 lines
1.5 KiB
Plaintext
26 lines
1.5 KiB
Plaintext
// Test lowering of prefetch directive from FIR to LLVM IR
|
|
// RUN: %flang_fc1 -emit-llvm %s -o - | FileCheck %s
|
|
|
|
func.func @_QPtest(%arg0: !fir.ref<i32>, %arg1: !fir.box<!fir.array<?xf32>>, %arg2: !fir.ref<!fir.box<!fir.heap<!fir.array<?x!fir.char<1,4>>>>>) {
|
|
// CHECK: call void @llvm.prefetch.p0(ptr %{{.*}}, i32 0, i32 3, i32 1)
|
|
fir.prefetch %arg0#0 {read, data, localityHint = 3 : i32} : !fir.ref<i32>
|
|
%c2 = arith.constant 2 : index
|
|
%4 = hlfir.designate %arg1#0 (%c2) : (!fir.box<!fir.array<?xf32>>, index) -> !fir.ref<f32>
|
|
|
|
// CHECK: call void @llvm.prefetch.p0(ptr %{{.*}}, i32 0, i32 3, i32 1)
|
|
fir.prefetch %4 {read, data, localityHint = 3 : i32} : !fir.ref<f32>
|
|
%5 = fir.load %arg2#0 : !fir.ref<!fir.box<!fir.heap<!fir.array<?x!fir.char<1,4>>>>>
|
|
%6 = fir.box_addr %5 : (!fir.box<!fir.heap<!fir.array<?x!fir.char<1,4>>>>) -> !fir.heap<!fir.array<?x!fir.char<1,4>>>
|
|
|
|
// CHECK: call void @llvm.prefetch.p0(ptr %{{.*}}, i32 0, i32 3, i32 1)
|
|
fir.prefetch %6 {read, data, localityHint = 3 : i32} : !fir.heap<!fir.array<?x!fir.char<1,4>>>
|
|
%7 = fir.load %arg2#0 : !fir.ref<!fir.box<!fir.heap<!fir.array<?x!fir.char<1,4>>>>>
|
|
%c3 = arith.constant 3 : index
|
|
%c4 = arith.constant 4 : index
|
|
%8 = hlfir.designate %7 (%c3) typeparams %c4 : (!fir.box<!fir.heap<!fir.array<?x!fir.char<1,4>>>>, index, index) -> !fir.ref<!fir.char<1,4>>
|
|
|
|
// CHECK: call void @llvm.prefetch.p0(ptr %{{.*}}, i32 0, i32 3, i32 1)
|
|
fir.prefetch %8 {read, data, localityHint = 3 : i32} : !fir.ref<!fir.char<1,4>>
|
|
return
|
|
}
|