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
71 lines
3.2 KiB
LLVM
71 lines
3.2 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
|
|
; RUN: opt < %s -data-layout="e-p:32:32:32-p1:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-n8:16:32" -passes=newgvn,dce -S | FileCheck %s
|
|
; RUN: opt < %s -data-layout="E-p:32:32:32-p1:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:64:64-n32" -passes=newgvn,dce -S | FileCheck %s
|
|
; memset -> i16 forwarding.
|
|
define signext i16 @memset_to_i16_local(ptr %A) nounwind ssp {
|
|
; CHECK-LABEL: define signext i16 @memset_to_i16_local(
|
|
; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR0:[0-9]+]] {
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: tail call void @llvm.memset.p0.i64(ptr [[A]], i8 1, i64 200, i1 false)
|
|
; CHECK-NEXT: ret i16 257
|
|
;
|
|
entry:
|
|
tail call void @llvm.memset.p0.i64(ptr %A, i8 1, i64 200, i1 false)
|
|
%arrayidx = getelementptr inbounds i16, ptr %A, i64 42
|
|
%tmp2 = load i16, ptr %arrayidx
|
|
ret i16 %tmp2
|
|
}
|
|
|
|
@GCst = constant {i32, float, i32 } { i32 42, float 14., i32 97 }
|
|
@GCst_as1 = addrspace(1) constant {i32, float, i32 } { i32 42, float 14., i32 97 }
|
|
|
|
; memset -> float forwarding.
|
|
define float @memcpy_to_float_local(ptr %A) nounwind ssp {
|
|
; CHECK-LABEL: define float @memcpy_to_float_local(
|
|
; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR0]] {
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: tail call void @llvm.memcpy.p0.p0.i64(ptr [[A]], ptr @GCst, i64 12, i1 false)
|
|
; CHECK-NEXT: ret float 1.400000e+01
|
|
;
|
|
entry:
|
|
tail call void @llvm.memcpy.p0.p0.i64(ptr %A, ptr @GCst, i64 12, i1 false)
|
|
%arrayidx = getelementptr inbounds float, ptr %A, i64 1 ; <ptr> [#uses=1]
|
|
%tmp2 = load float, ptr %arrayidx ; <float> [#uses=1]
|
|
ret float %tmp2
|
|
}
|
|
; memcpy from address space 1
|
|
define float @memcpy_to_float_local_as1(ptr %A) nounwind ssp {
|
|
; CHECK-LABEL: define float @memcpy_to_float_local_as1(
|
|
; CHECK-SAME: ptr [[A:%.*]]) #[[ATTR0]] {
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: tail call void @llvm.memcpy.p0.p1.i64(ptr [[A]], ptr addrspace(1) @GCst_as1, i64 12, i1 false)
|
|
; CHECK-NEXT: ret float 1.400000e+01
|
|
;
|
|
entry:
|
|
tail call void @llvm.memcpy.p0.p1.i64(ptr %A, ptr addrspace(1) @GCst_as1, i64 12, i1 false)
|
|
%arrayidx = getelementptr inbounds float, ptr %A, i64 1 ; <ptr> [#uses=1]
|
|
%tmp2 = load float, ptr %arrayidx ; <float> [#uses=1]
|
|
ret float %tmp2
|
|
}
|
|
|
|
; PR6642
|
|
define i32 @memset_to_load() nounwind readnone {
|
|
; CHECK-LABEL: define i32 @memset_to_load(
|
|
; CHECK-SAME: ) #[[ATTR1:[0-9]+]] {
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[X:%.*]] = alloca [256 x i32], align 4
|
|
; CHECK-NEXT: call void @llvm.memset.p0.i64(ptr align 4 [[X]], i8 0, i64 1024, i1 false)
|
|
; CHECK-NEXT: ret i32 0
|
|
;
|
|
entry:
|
|
%x = alloca [256 x i32], align 4 ; <ptr> [#uses=2]
|
|
call void @llvm.memset.p0.i64(ptr align 4 %x, i8 0, i64 1024, i1 false)
|
|
%arraydecay = getelementptr inbounds [256 x i32], ptr %x, i32 0, i32 0 ; <ptr>
|
|
%tmp1 = load i32, ptr %arraydecay ; <i32> [#uses=1]
|
|
ret i32 %tmp1
|
|
}
|
|
declare void @llvm.memset.p0.i64(ptr nocapture, i8, i64, i1) nounwind
|
|
|
|
declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1) nounwind
|
|
declare void @llvm.memcpy.p0.p1.i64(ptr nocapture, ptr addrspace(1) nocapture, i64, i1) nounwind
|