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
223 lines
7.9 KiB
LLVM
223 lines
7.9 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc < %s | FileCheck %s
|
|
; RUN: llc --fast-isel < %s | FileCheck %s
|
|
; RUN: llc --global-isel --global-isel-abort=2 < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,CHECK-GI
|
|
|
|
; CHECK-GI: warning: Instruction selection used fallback path for test_sign_ext
|
|
; CHECK-GI-NEXT: warning: Instruction selection used fallback path for test_sign_ext_store_load
|
|
; CHECK-GI-NEXT: warning: Instruction selection used fallback path for test_zero_ext
|
|
; CHECK-GI-NEXT: warning: Instruction selection used fallback path for test_zero_ext_store_load
|
|
; CHECK-GI-NEXT: warning: Instruction selection used fallback path for test_trunc
|
|
; CHECK-GI-NEXT: warning: Instruction selection used fallback path for test_noop1
|
|
; CHECK-GI-NEXT: warning: Instruction selection used fallback path for test_null_arg
|
|
; CHECK-GI-NEXT: warning: Instruction selection used fallback path for test_unrecognized
|
|
|
|
; Source to regenerate:
|
|
; struct Foo {
|
|
; int * __ptr32 p32;
|
|
; int * __ptr64 p64;
|
|
; __attribute__((address_space(9))) int *p_other;
|
|
; };
|
|
; extern "C" void use_foo(Foo *f);
|
|
; extern "C" int use_int(int i);
|
|
; extern "C" void test_sign_ext(Foo *f, int * __ptr32 __sptr i) {
|
|
; f->p64 = i;
|
|
; use_foo(f);
|
|
; }
|
|
; extern "C" void test_sign_ext_store_load(int * __ptr32 __sptr i) {
|
|
; *i = use_int(*i);
|
|
; }
|
|
; extern "C" void test_zero_ext(Foo *f, int * __ptr32 __uptr i) {
|
|
; f->p64 = i;
|
|
; use_foo(f);
|
|
; }
|
|
; extern "C" void test_zero_ext_store_load(int * __ptr32 __uptr i) {
|
|
; *i = use_int(*i);
|
|
; }
|
|
; extern "C" void test_trunc(Foo *f, int * __ptr64 i) {
|
|
; f->p32 = i;
|
|
; use_foo(f);
|
|
; }
|
|
; extern "C" void test_noop1(Foo *f, int * __ptr32 i) {
|
|
; f->p32 = i;
|
|
; use_foo(f);
|
|
; }
|
|
; extern "C" void test_noop2(Foo *f, int * __ptr64 i) {
|
|
; f->p64 = i;
|
|
; use_foo(f);
|
|
; }
|
|
; extern "C" void test_null_arg(Foo *f, int * __ptr32 i) {
|
|
; test_noop1(f, 0);
|
|
; }
|
|
; extern "C" void test_unrecognized(Foo *f, __attribute__((address_space(14))) int *i) {
|
|
; f->p32 = (int * __ptr32)i;
|
|
; use_foo(f);
|
|
; }
|
|
;
|
|
; $ clang --target=aarch64-windows-msvc -fms-extensions -O2 -S -emit-llvm t.cpp
|
|
|
|
target datalayout = "e-m:w-p:64:64-i32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32"
|
|
target triple = "aarch64-unknown-windows-msvc"
|
|
|
|
; Function Attrs: mustprogress uwtable
|
|
define dso_local void @test_sign_ext(ptr noundef %f, ptr addrspace(270) noundef %i) local_unnamed_addr #0 {
|
|
; CHECK-LABEL: test_sign_ext:
|
|
; CHECK: // %bb.0: // %entry
|
|
; CHECK-NEXT: // kill: def $w1 killed $w1 def $x1
|
|
; CHECK-NEXT: sxtw x8, w1
|
|
; CHECK-NEXT: str x8, [x0, #8]
|
|
; CHECK-NEXT: b use_foo
|
|
entry:
|
|
%0 = addrspacecast ptr addrspace(270) %i to ptr
|
|
%p64 = getelementptr inbounds nuw i8, ptr %f, i64 8
|
|
store ptr %0, ptr %p64, align 8
|
|
tail call void @use_foo(ptr noundef %f)
|
|
ret void
|
|
}
|
|
|
|
declare dso_local void @use_foo(ptr noundef) local_unnamed_addr #1
|
|
|
|
; Function Attrs: mustprogress uwtable
|
|
define dso_local void @test_sign_ext_store_load(ptr addrspace(270) nocapture noundef %i) local_unnamed_addr #0 {
|
|
; CHECK-LABEL: test_sign_ext_store_load:
|
|
; CHECK: .seh_proc test_sign_ext_store_load
|
|
; CHECK-NEXT: // %bb.0: // %entry
|
|
; CHECK-NEXT: sub sp, sp, #16
|
|
; CHECK-NEXT: .seh_stackalloc 16
|
|
; CHECK-NEXT: stp x19, x30, [sp] // 16-byte Folded Spill
|
|
; CHECK-NEXT: .seh_save_lrpair x19, 0
|
|
; CHECK-NEXT: .seh_endprologue
|
|
; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0
|
|
; CHECK-NEXT: sxtw x19, w0
|
|
; CHECK-NEXT: ldr w0, [x19]
|
|
; CHECK-NEXT: bl use_int
|
|
; CHECK-NEXT: str w0, [x19]
|
|
; CHECK-NEXT: .seh_startepilogue
|
|
; CHECK-NEXT: ldp x19, x30, [sp] // 16-byte Folded Reload
|
|
; CHECK-NEXT: .seh_save_lrpair x19, 0
|
|
; CHECK-NEXT: add sp, sp, #16
|
|
; CHECK-NEXT: .seh_stackalloc 16
|
|
; CHECK-NEXT: .seh_endepilogue
|
|
; CHECK-NEXT: ret
|
|
; CHECK-NEXT: .seh_endfunclet
|
|
; CHECK-NEXT: .seh_endproc
|
|
entry:
|
|
%0 = load i32, ptr addrspace(270) %i, align 4
|
|
%call = tail call i32 @use_int(i32 noundef %0)
|
|
store i32 %call, ptr addrspace(270) %i, align 4
|
|
ret void
|
|
}
|
|
|
|
declare dso_local i32 @use_int(i32 noundef) local_unnamed_addr #1
|
|
|
|
; Function Attrs: mustprogress uwtable
|
|
define dso_local void @test_zero_ext(ptr noundef %f, ptr addrspace(271) noundef %i) local_unnamed_addr #0 {
|
|
; CHECK-LABEL: test_zero_ext:
|
|
; CHECK: // %bb.0: // %entry
|
|
; CHECK-NEXT: mov w8, w1
|
|
; CHECK-NEXT: str x8, [x0, #8]
|
|
; CHECK-NEXT: b use_foo
|
|
entry:
|
|
%0 = addrspacecast ptr addrspace(271) %i to ptr
|
|
%p64 = getelementptr inbounds nuw i8, ptr %f, i64 8
|
|
store ptr %0, ptr %p64, align 8
|
|
tail call void @use_foo(ptr noundef %f)
|
|
ret void
|
|
}
|
|
|
|
; Function Attrs: mustprogress uwtable
|
|
define dso_local void @test_zero_ext_store_load(ptr addrspace(271) nocapture noundef %i) local_unnamed_addr #0 {
|
|
; CHECK-LABEL: test_zero_ext_store_load:
|
|
; CHECK: .seh_proc test_zero_ext_store_load
|
|
; CHECK-NEXT: // %bb.0: // %entry
|
|
; CHECK-NEXT: sub sp, sp, #16
|
|
; CHECK-NEXT: .seh_stackalloc 16
|
|
; CHECK-NEXT: stp x19, x30, [sp] // 16-byte Folded Spill
|
|
; CHECK-NEXT: .seh_save_lrpair x19, 0
|
|
; CHECK-NEXT: .seh_endprologue
|
|
; CHECK-NEXT: mov w19, w0
|
|
; CHECK-NEXT: ldr w0, [x19]
|
|
; CHECK-NEXT: bl use_int
|
|
; CHECK-NEXT: str w0, [x19]
|
|
; CHECK-NEXT: .seh_startepilogue
|
|
; CHECK-NEXT: ldp x19, x30, [sp] // 16-byte Folded Reload
|
|
; CHECK-NEXT: .seh_save_lrpair x19, 0
|
|
; CHECK-NEXT: add sp, sp, #16
|
|
; CHECK-NEXT: .seh_stackalloc 16
|
|
; CHECK-NEXT: .seh_endepilogue
|
|
; CHECK-NEXT: ret
|
|
; CHECK-NEXT: .seh_endfunclet
|
|
; CHECK-NEXT: .seh_endproc
|
|
entry:
|
|
%0 = load i32, ptr addrspace(271) %i, align 4
|
|
%call = tail call i32 @use_int(i32 noundef %0)
|
|
store i32 %call, ptr addrspace(271) %i, align 4
|
|
ret void
|
|
}
|
|
|
|
; Function Attrs: mustprogress uwtable
|
|
define dso_local void @test_trunc(ptr noundef %f, ptr noundef %i) local_unnamed_addr #0 {
|
|
; CHECK-LABEL: test_trunc:
|
|
; CHECK: // %bb.0: // %entry
|
|
; CHECK-NEXT: str w1, [x0]
|
|
; CHECK-NEXT: b use_foo
|
|
entry:
|
|
%0 = addrspacecast ptr %i to ptr addrspace(270)
|
|
store ptr addrspace(270) %0, ptr %f, align 8
|
|
tail call void @use_foo(ptr noundef nonnull %f)
|
|
ret void
|
|
}
|
|
|
|
; Function Attrs: mustprogress uwtable
|
|
define dso_local void @test_noop1(ptr noundef %f, ptr addrspace(270) noundef %i) local_unnamed_addr #0 {
|
|
; CHECK-LABEL: test_noop1:
|
|
; CHECK: // %bb.0: // %entry
|
|
; CHECK-NEXT: str w1, [x0]
|
|
; CHECK-NEXT: b use_foo
|
|
entry:
|
|
store ptr addrspace(270) %i, ptr %f, align 8
|
|
tail call void @use_foo(ptr noundef nonnull %f)
|
|
ret void
|
|
}
|
|
|
|
; Function Attrs: mustprogress uwtable
|
|
define dso_local void @test_noop2(ptr noundef %f, ptr noundef %i) local_unnamed_addr #0 {
|
|
; CHECK-LABEL: test_noop2:
|
|
; CHECK: // %bb.0: // %entry
|
|
; CHECK-NEXT: str x1, [x0, #8]
|
|
; CHECK-NEXT: b use_foo
|
|
entry:
|
|
%p64 = getelementptr inbounds nuw i8, ptr %f, i64 8
|
|
store ptr %i, ptr %p64, align 8
|
|
tail call void @use_foo(ptr noundef %f)
|
|
ret void
|
|
}
|
|
|
|
; Function Attrs: mustprogress uwtable
|
|
define dso_local void @test_null_arg(ptr noundef %f, ptr addrspace(270) nocapture noundef readnone %i) local_unnamed_addr #0 {
|
|
; CHECK-LABEL: test_null_arg:
|
|
; CHECK: // %bb.0: // %entry
|
|
; CHECK-NEXT: str wzr, [x0]
|
|
; CHECK-NEXT: b use_foo
|
|
entry:
|
|
store ptr addrspace(270) null, ptr %f, align 8
|
|
tail call void @use_foo(ptr noundef nonnull %f)
|
|
ret void
|
|
}
|
|
|
|
; Function Attrs: mustprogress uwtable
|
|
define dso_local void @test_unrecognized(ptr noundef %f, ptr addrspace(14) noundef %i) local_unnamed_addr #0 {
|
|
; CHECK-LABEL: test_unrecognized:
|
|
; CHECK: // %bb.0: // %entry
|
|
; CHECK-NEXT: str w1, [x0]
|
|
; CHECK-NEXT: b use_foo
|
|
entry:
|
|
%0 = addrspacecast ptr addrspace(14) %i to ptr addrspace(270)
|
|
store ptr addrspace(270) %0, ptr %f, align 8
|
|
tail call void @use_foo(ptr noundef nonnull %f)
|
|
ret void
|
|
}
|
|
|
|
attributes #0 = { mustprogress uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+fp-armv8,+neon,+v8a,-fmv" }
|
|
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+fp-armv8,+neon,+v8a,-fmv" }
|