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
54 lines
2.1 KiB
LLVM
54 lines
2.1 KiB
LLVM
; RUN: opt < %s -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output \
|
|
; RUN: -mtriple=s390x-unknown-linux -mcpu=z13 | FileCheck %s
|
|
;
|
|
; Check that getInstructionCost() does not return TCC_Free for extensions of
|
|
; i1 returned from icmp.
|
|
|
|
define i64 @fun1(i64 %v) {
|
|
; CHECK-LABEL: 'fun1'
|
|
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp eq i64 %v, 0
|
|
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %z = zext i1 %cmp to i64
|
|
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %z
|
|
%cmp = icmp eq i64 %v, 0
|
|
%z = zext i1 %cmp to i64
|
|
ret i64 %z
|
|
}
|
|
|
|
define i64 @fun2(i64 %v) {
|
|
; CHECK-LABEL: 'fun2'
|
|
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp eq i64 %v, 0
|
|
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %z = sext i1 %cmp to i64
|
|
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %z
|
|
%cmp = icmp eq i64 %v, 0
|
|
%z = sext i1 %cmp to i64
|
|
ret i64 %z
|
|
}
|
|
|
|
define double @fun3(i64 %v) {
|
|
; CHECK-LABEL: 'fun3'
|
|
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp eq i64 %v, 0
|
|
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %z = uitofp i1 %cmp to double
|
|
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: ret double %z
|
|
%cmp = icmp eq i64 %v, 0
|
|
%z = uitofp i1 %cmp to double
|
|
ret double %z
|
|
}
|
|
|
|
define double @fun4(i64 %v) {
|
|
; CHECK-LABEL: 'fun4'
|
|
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %cmp = icmp eq i64 %v, 0
|
|
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %z = sitofp i1 %cmp to double
|
|
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: ret double %z
|
|
%cmp = icmp eq i64 %v, 0
|
|
%z = sitofp i1 %cmp to double
|
|
ret double %z
|
|
}
|
|
|
|
define i64 @fun5(i1 %v) {
|
|
; CHECK-LABEL: 'fun5'
|
|
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %z = zext i1 %v to i64
|
|
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %z
|
|
%z = zext i1 %v to i64
|
|
ret i64 %z
|
|
}
|