Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/InstCombine/2012-02-13-FCmp.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

57 lines
2.4 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -passes=instcombine -S < %s | FileCheck %s
; Radar 10803727
@.str = private unnamed_addr constant [35 x i8] c"\0Ain_range input (should be 0): %f\0A\00", align 1
@.str1 = external hidden unnamed_addr constant [35 x i8], align 1
declare i32 @printf(ptr, ...)
define i64 @_Z8tempCastj(i32 %val) uwtable ssp {
; CHECK-LABEL: @_Z8tempCastj(
; CHECK-NEXT: entry:
; CHECK-NEXT: [[CALL:%.*]] = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str1, i32 [[VAL:%.*]])
; CHECK-NEXT: [[CONV:%.*]] = uitofp i32 [[VAL]] to double
; CHECK-NEXT: [[CALL_I:%.*]] = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, double [[CONV]])
; CHECK-NEXT: br i1 true, label [[LAND_RHS_I:%.*]], label [[IF_END_CRITEDGE:%.*]]
; CHECK: land.rhs.i:
; CHECK-NEXT: [[CMP1_I:%.*]] = icmp eq i32 [[VAL]], 0
; CHECK-NEXT: br i1 [[CMP1_I]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
; CHECK: if.then:
; CHECK-NEXT: [[ADD:%.*]] = fadd double [[CONV]], 5.000000e-01
; CHECK-NEXT: [[CONV3:%.*]] = fptosi double [[ADD]] to i64
; CHECK-NEXT: br label [[RETURN:%.*]]
; CHECK: if.end.critedge:
; CHECK-NEXT: br label [[IF_END]]
; CHECK: if.end:
; CHECK-NEXT: br label [[RETURN]]
; CHECK: return:
; CHECK-NEXT: [[RETVAL_0:%.*]] = phi i64 [ [[CONV3]], [[IF_THEN]] ], [ -1, [[IF_END]] ]
; CHECK-NEXT: ret i64 [[RETVAL_0]]
;
entry:
%call = call i32 (ptr, ...) @printf(ptr @.str1, i32 %val)
%conv = uitofp i32 %val to double
%call.i = call i32 (ptr, ...) @printf(ptr @.str, double %conv)
%cmp.i = fcmp oge double %conv, -1.000000e+00
br i1 %cmp.i, label %land.rhs.i, label %if.end.critedge
land.rhs.i: ; preds = %entry
%cmp1.i = fcmp olt double %conv, 1.000000e+00
br i1 %cmp1.i, label %if.then, label %if.end
if.then: ; preds = %land.rhs.i
%add = fadd double %conv, 5.000000e-01
%conv3 = fptosi double %add to i64
br label %return
if.end.critedge: ; preds = %entry
br label %if.end
if.end: ; preds = %if.end.critedge, %land.rhs.i
br label %return
return: ; preds = %if.end, %if.then
%retval.0 = phi i64 [ %conv3, %if.then ], [ -1, %if.end ]
ret i64 %retval.0
}