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
91 lines
2.3 KiB
LLVM
91 lines
2.3 KiB
LLVM
; Test zE12 conditional traps
|
|
;
|
|
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=zEC12 | FileCheck %s
|
|
|
|
declare void @llvm.trap()
|
|
|
|
; Check conditional compare logical and trap
|
|
define i32 @f1(i32 zeroext %a, ptr %ptr) {
|
|
; CHECK-LABEL: f1:
|
|
; CHECK: clth %r2, 0(%r3)
|
|
; CHECK: lhi %r2, 0
|
|
; CHECK: br %r14
|
|
entry:
|
|
%b = load i32, ptr %ptr
|
|
%cmp = icmp ugt i32 %a, %b
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
if.then: ; preds = %entry
|
|
tail call void @llvm.trap()
|
|
unreachable
|
|
|
|
if.end: ; preds = %entry
|
|
ret i32 0
|
|
}
|
|
|
|
; Check conditional compare logical grande and trap
|
|
define i64 @f2(i64 zeroext %a, ptr %ptr) {
|
|
; CHECK-LABEL: f2:
|
|
; CHECK: clgtl %r2, 0(%r3)
|
|
; CHECK: lghi %r2, 0
|
|
; CHECK: br %r14
|
|
entry:
|
|
%b = load i64, ptr %ptr
|
|
%cmp = icmp ult i64 %a, %b
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
if.then: ; preds = %entry
|
|
tail call void @llvm.trap()
|
|
unreachable
|
|
|
|
if.end: ; preds = %entry
|
|
ret i64 0
|
|
}
|
|
|
|
; Verify that we don't attempt to use the compare and trap
|
|
; instruction with an index operand.
|
|
define i32 @f3(i32 zeroext %a, ptr %base, i64 %offset) {
|
|
; CHECK-LABEL: f3:
|
|
; CHECK: cl %r2, 0(%r{{[0-5]}},%r3)
|
|
; CHECK: lhi %r2, 0
|
|
; CHECK-LABEL: .Ltmp0
|
|
; CHECK: jh .Ltmp0+2
|
|
; CHECK: br %r14
|
|
entry:
|
|
%ptr = getelementptr i32, ptr %base, i64 %offset
|
|
%b = load i32, ptr %ptr
|
|
%cmp = icmp ugt i32 %a, %b
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
if.then: ; preds = %entry
|
|
tail call void @llvm.trap()
|
|
unreachable
|
|
|
|
if.end: ; preds = %entry
|
|
ret i32 0
|
|
}
|
|
|
|
; Verify that we don't attempt to use the compare and trap grande
|
|
; instruction with an index operand.
|
|
define i64 @f4(i64 %a, ptr %base, i64 %offset) {
|
|
; CHECK-LABEL: f4:
|
|
; CHECK: clg %r2, 0(%r{{[0-5]}},%r3)
|
|
; CHECK: lghi %r2, 0
|
|
; CHECK-LABEL: .Ltmp1
|
|
; CHECK: jh .Ltmp1+2
|
|
; CHECK: br %r14
|
|
entry:
|
|
%ptr = getelementptr i64, ptr %base, i64 %offset
|
|
%b = load i64, ptr %ptr
|
|
%cmp = icmp ugt i64 %a, %b
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
if.then: ; preds = %entry
|
|
tail call void @llvm.trap()
|
|
unreachable
|
|
|
|
if.end: ; preds = %entry
|
|
ret i64 0
|
|
}
|
|
|