Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/SpeculativeExecution/spec-casts.ll
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

237 lines
5.5 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
; RUN: opt < %s -S -passes=speculative-execution \
; RUN: -spec-exec-max-speculation-cost 4 -spec-exec-max-not-hoisted 3 \
; RUN: | FileCheck %s
define void @ifThen_bitcast(i32 %arg) {
; CHECK-LABEL: define void @ifThen_bitcast(
; CHECK-SAME: i32 [[ARG:%.*]]) {
; CHECK-NEXT: [[X:%.*]] = bitcast i32 [[ARG]] to float
; CHECK-NEXT: br i1 true, label %[[A:.*]], label %[[B:.*]]
; CHECK: [[A]]:
; CHECK-NEXT: br label %[[B]]
; CHECK: [[B]]:
; CHECK-NEXT: ret void
;
br i1 true, label %a, label %b
a:
%x = bitcast i32 %arg to float
br label %b
b:
ret void
}
define void @ifThen_ptrtoint(ptr %arg) {
; CHECK-LABEL: define void @ifThen_ptrtoint(
; CHECK-SAME: ptr [[ARG:%.*]]) {
; CHECK-NEXT: [[X:%.*]] = ptrtoint ptr [[ARG]] to i64
; CHECK-NEXT: br i1 true, label %[[A:.*]], label %[[B:.*]]
; CHECK: [[A]]:
; CHECK-NEXT: br label %[[B]]
; CHECK: [[B]]:
; CHECK-NEXT: ret void
;
br i1 true, label %a, label %b
a:
%x = ptrtoint ptr %arg to i64
br label %b
b:
ret void
}
define void @ifThen_ptrtoaddr(ptr %arg) {
; CHECK-LABEL: define void @ifThen_ptrtoaddr(
; CHECK-SAME: ptr [[ARG:%.*]]) {
; CHECK-NEXT: [[X:%.*]] = ptrtoaddr ptr [[ARG]] to i64
; CHECK-NEXT: br i1 true, label %[[A:.*]], label %[[B:.*]]
; CHECK: [[A]]:
; CHECK-NEXT: br label %[[B]]
; CHECK: [[B]]:
; CHECK-NEXT: ret void
;
br i1 true, label %a, label %b
a:
%x = ptrtoaddr ptr %arg to i64
br label %b
b:
ret void
}
define void @ifThen_inttoptr(i64 %arg) {
; CHECK-LABEL: define void @ifThen_inttoptr(
; CHECK-SAME: i64 [[ARG:%.*]]) {
; CHECK-NEXT: [[X:%.*]] = inttoptr i64 [[ARG]] to ptr
; CHECK-NEXT: br i1 true, label %[[A:.*]], label %[[B:.*]]
; CHECK: [[A]]:
; CHECK-NEXT: br label %[[B]]
; CHECK: [[B]]:
; CHECK-NEXT: ret void
;
br i1 true, label %a, label %b
a:
%x = inttoptr i64 %arg to ptr
br label %b
b:
ret void
}
define void @ifThen_addrspacecast(ptr %arg) {
; CHECK-LABEL: define void @ifThen_addrspacecast(
; CHECK-SAME: ptr [[ARG:%.*]]) {
; CHECK-NEXT: [[X:%.*]] = addrspacecast ptr [[ARG]] to ptr addrspace(1)
; CHECK-NEXT: br i1 true, label %[[A:.*]], label %[[B:.*]]
; CHECK: [[A]]:
; CHECK-NEXT: br label %[[B]]
; CHECK: [[B]]:
; CHECK-NEXT: ret void
;
br i1 true, label %a, label %b
a:
%x = addrspacecast ptr %arg to ptr addrspace(1)
br label %b
b:
ret void
}
define void @ifThen_fptoui(float %arg) {
; CHECK-LABEL: define void @ifThen_fptoui(
; CHECK-SAME: float [[ARG:%.*]]) {
; CHECK-NEXT: [[X:%.*]] = fptoui float [[ARG]] to i32
; CHECK-NEXT: br i1 true, label %[[A:.*]], label %[[B:.*]]
; CHECK: [[A]]:
; CHECK-NEXT: br label %[[B]]
; CHECK: [[B]]:
; CHECK-NEXT: ret void
;
br i1 true, label %a, label %b
a:
%x = fptoui float %arg to i32
br label %b
b:
ret void
}
define void @ifThen_fptosi(float %arg) {
; CHECK-LABEL: define void @ifThen_fptosi(
; CHECK-SAME: float [[ARG:%.*]]) {
; CHECK-NEXT: [[X:%.*]] = fptosi float [[ARG]] to i32
; CHECK-NEXT: br i1 true, label %[[A:.*]], label %[[B:.*]]
; CHECK: [[A]]:
; CHECK-NEXT: br label %[[B]]
; CHECK: [[B]]:
; CHECK-NEXT: ret void
;
br i1 true, label %a, label %b
a:
%x = fptosi float %arg to i32
br label %b
b:
ret void
}
define void @ifThen_uitofp(i32 %arg) {
; CHECK-LABEL: define void @ifThen_uitofp(
; CHECK-SAME: i32 [[ARG:%.*]]) {
; CHECK-NEXT: [[X:%.*]] = uitofp i32 [[ARG]] to float
; CHECK-NEXT: br i1 true, label %[[A:.*]], label %[[B:.*]]
; CHECK: [[A]]:
; CHECK-NEXT: br label %[[B]]
; CHECK: [[B]]:
; CHECK-NEXT: ret void
;
br i1 true, label %a, label %b
a:
%x = uitofp i32 %arg to float
br label %b
b:
ret void
}
define void @ifThen_sitofp(i32 %arg) {
; CHECK-LABEL: define void @ifThen_sitofp(
; CHECK-SAME: i32 [[ARG:%.*]]) {
; CHECK-NEXT: [[X:%.*]] = sitofp i32 [[ARG]] to float
; CHECK-NEXT: br i1 true, label %[[A:.*]], label %[[B:.*]]
; CHECK: [[A]]:
; CHECK-NEXT: br label %[[B]]
; CHECK: [[B]]:
; CHECK-NEXT: ret void
;
br i1 true, label %a, label %b
a:
%x = sitofp i32 %arg to float
br label %b
b:
ret void
}
define void @ifThen_fpext(float %arg) {
; CHECK-LABEL: define void @ifThen_fpext(
; CHECK-SAME: float [[ARG:%.*]]) {
; CHECK-NEXT: [[X:%.*]] = fpext float [[ARG]] to double
; CHECK-NEXT: br i1 true, label %[[A:.*]], label %[[B:.*]]
; CHECK: [[A]]:
; CHECK-NEXT: br label %[[B]]
; CHECK: [[B]]:
; CHECK-NEXT: ret void
;
br i1 true, label %a, label %b
a:
%x = fpext float %arg to double
br label %b
b:
ret void
}
define void @ifThen_fptrunc(double %arg) {
; CHECK-LABEL: define void @ifThen_fptrunc(
; CHECK-SAME: double [[ARG:%.*]]) {
; CHECK-NEXT: [[X:%.*]] = fptrunc double [[ARG]] to float
; CHECK-NEXT: br i1 true, label %[[A:.*]], label %[[B:.*]]
; CHECK: [[A]]:
; CHECK-NEXT: br label %[[B]]
; CHECK: [[B]]:
; CHECK-NEXT: ret void
;
br i1 true, label %a, label %b
a:
%x = fptrunc double %arg to float
br label %b
b:
ret void
}
define void @ifThen_trunc(i32 %arg) {
; CHECK-LABEL: define void @ifThen_trunc(
; CHECK-SAME: i32 [[ARG:%.*]]) {
; CHECK-NEXT: [[X:%.*]] = trunc i32 [[ARG]] to i16
; CHECK-NEXT: br i1 true, label %[[A:.*]], label %[[B:.*]]
; CHECK: [[A]]:
; CHECK-NEXT: br label %[[B]]
; CHECK: [[B]]:
; CHECK-NEXT: ret void
;
br i1 true, label %a, label %b
a:
%x = trunc i32 %arg to i16
br label %b
b:
ret void
}