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
82 lines
4.1 KiB
LLVM
82 lines
4.1 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: opt -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple thumbv8.1-m.main -mattr=+dsp < %s | FileCheck %s
|
|
; RUN: opt -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple thumbv8.1-m.main < %s | FileCheck %s --check-prefix=CHECK-NO-DSP
|
|
|
|
define i64 @test(i16 %a, i16 %b) {
|
|
; CHECK-LABEL: 'test'
|
|
; CHECK-NEXT: Cost Model: Found costs of 1 for: %as = zext i16 %a to i32
|
|
; CHECK-NEXT: Cost Model: Found costs of 1 for: %bs = zext i16 %b to i32
|
|
; CHECK-NEXT: Cost Model: Found costs of 0 for: %m = mul i32 %as, %bs
|
|
; CHECK-NEXT: Cost Model: Found costs of 1 for: %ms = zext i32 %m to i64
|
|
; CHECK-NEXT: Cost Model: Found costs of 1 for: ret i64 %ms
|
|
;
|
|
; CHECK-NO-DSP-LABEL: 'test'
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 1 for: %as = zext i16 %a to i32
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 1 for: %bs = zext i16 %b to i32
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 1 for: %m = mul i32 %as, %bs
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 1 for: %ms = zext i32 %m to i64
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 1 for: ret i64 %ms
|
|
;
|
|
%as = zext i16 %a to i32
|
|
%bs = zext i16 %b to i32
|
|
%m = mul i32 %as, %bs
|
|
%ms = zext i32 %m to i64
|
|
ret i64 %ms
|
|
}
|
|
|
|
define i64 @withadd(i16 %a, i16 %b, i64 %c) {
|
|
; CHECK-LABEL: 'withadd'
|
|
; CHECK-NEXT: Cost Model: Found costs of 1 for: %as = zext i16 %a to i32
|
|
; CHECK-NEXT: Cost Model: Found costs of 1 for: %bs = zext i16 %b to i32
|
|
; CHECK-NEXT: Cost Model: Found costs of 0 for: %m = mul i32 %as, %bs
|
|
; CHECK-NEXT: Cost Model: Found costs of 1 for: %ms = zext i32 %m to i64
|
|
; CHECK-NEXT: Cost Model: Found costs of 2 for: %r = add i64 %c, %ms
|
|
; CHECK-NEXT: Cost Model: Found costs of 1 for: ret i64 %r
|
|
;
|
|
; CHECK-NO-DSP-LABEL: 'withadd'
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 1 for: %as = zext i16 %a to i32
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 1 for: %bs = zext i16 %b to i32
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 1 for: %m = mul i32 %as, %bs
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 1 for: %ms = zext i32 %m to i64
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 2 for: %r = add i64 %c, %ms
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 1 for: ret i64 %r
|
|
;
|
|
%as = zext i16 %a to i32
|
|
%bs = zext i16 %b to i32
|
|
%m = mul i32 %as, %bs
|
|
%ms = zext i32 %m to i64
|
|
%r = add i64 %c, %ms
|
|
ret i64 %r
|
|
}
|
|
|
|
define i64 @withloads(ptr %pa, ptr %pb, i64 %c) {
|
|
; CHECK-LABEL: 'withloads'
|
|
; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:4 SizeLat:1 for: %a = load i16, ptr %pa, align 2
|
|
; CHECK-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:4 SizeLat:1 for: %b = load i16, ptr %pb, align 2
|
|
; CHECK-NEXT: Cost Model: Found costs of 0 for: %as = zext i16 %a to i32
|
|
; CHECK-NEXT: Cost Model: Found costs of 0 for: %bs = zext i16 %b to i32
|
|
; CHECK-NEXT: Cost Model: Found costs of 0 for: %m = mul i32 %as, %bs
|
|
; CHECK-NEXT: Cost Model: Found costs of 1 for: %ms = zext i32 %m to i64
|
|
; CHECK-NEXT: Cost Model: Found costs of 2 for: %r = add i64 %c, %ms
|
|
; CHECK-NEXT: Cost Model: Found costs of 1 for: ret i64 %r
|
|
;
|
|
; CHECK-NO-DSP-LABEL: 'withloads'
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:4 SizeLat:1 for: %a = load i16, ptr %pa, align 2
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of RThru:1 CodeSize:1 Lat:4 SizeLat:1 for: %b = load i16, ptr %pb, align 2
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 0 for: %as = zext i16 %a to i32
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 0 for: %bs = zext i16 %b to i32
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 1 for: %m = mul i32 %as, %bs
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 1 for: %ms = zext i32 %m to i64
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 2 for: %r = add i64 %c, %ms
|
|
; CHECK-NO-DSP-NEXT: Cost Model: Found costs of 1 for: ret i64 %r
|
|
;
|
|
%a = load i16, ptr %pa
|
|
%b = load i16, ptr %pb
|
|
%as = zext i16 %a to i32
|
|
%bs = zext i16 %b to i32
|
|
%m = mul i32 %as, %bs
|
|
%ms = zext i32 %m to i64
|
|
%r = add i64 %c, %ms
|
|
ret i64 %r
|
|
}
|