Files
TheRock/compiler/amd-llvm/llvm/test/tools/llubi/intr_arith_overflow.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

61 lines
5.1 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llubi_test_checks.py UTC_ARGS: --version 6
; RUN: llubi --verbose < %s 2>&1 | FileCheck %s
define void @main() {
call {i32, i1} @llvm.sadd.with.overflow.i32(i32 poison, i32 20)
call {i32, i1} @llvm.sadd.with.overflow.i32(i32 10, i32 20)
call {i32, i1} @llvm.sadd.with.overflow.i32(i32 -2147483647, i32 -20)
call {<2 x i32>, <2 x i1>} @llvm.sadd.with.overflow.v2i32(<2 x i32> <i32 10, i32 poison>, <2 x i32> <i32 20, i32 1>)
call {i32, i1} @llvm.uadd.with.overflow.i32(i32 10, i32 poison)
call {i32, i1} @llvm.uadd.with.overflow.i32(i32 10, i32 20)
call {i32, i1} @llvm.uadd.with.overflow.i32(i32 4294967295, i32 20)
call {<2 x i32>, <2 x i1>} @llvm.uadd.with.overflow.v2i32(<2 x i32> <i32 10, i32 poison>, <2 x i32> <i32 20, i32 1>)
call {i32, i1} @llvm.ssub.with.overflow.i32(i32 poison, i32 20)
call {i32, i1} @llvm.ssub.with.overflow.i32(i32 10, i32 20)
call {i32, i1} @llvm.ssub.with.overflow.i32(i32 -2147483647, i32 20)
call {<2 x i32>, <2 x i1>} @llvm.ssub.with.overflow.v2i32(<2 x i32> <i32 10, i32 poison>, <2 x i32> <i32 20, i32 1>)
call {i32, i1} @llvm.usub.with.overflow.i32(i32 20, i32 poison)
call {i32, i1} @llvm.usub.with.overflow.i32(i32 20, i32 10)
call {i32, i1} @llvm.usub.with.overflow.i32(i32 0, i32 20)
call {<2 x i32>, <2 x i1>} @llvm.usub.with.overflow.v2i32(<2 x i32> <i32 20, i32 poison>, <2 x i32> <i32 10, i32 1>)
call {i32, i1} @llvm.smul.with.overflow.i32(i32 poison, i32 20)
call {i32, i1} @llvm.smul.with.overflow.i32(i32 10, i32 20)
call {i32, i1} @llvm.smul.with.overflow.i32(i32 -4000000, i32 4000000)
call {<2 x i32>, <2 x i1>} @llvm.smul.with.overflow.v2i32(<2 x i32> <i32 10, i32 poison>, <2 x i32> <i32 20, i32 1>)
call {i32, i1} @llvm.umul.with.overflow.i32(i32 20, i32 poison)
call {i32, i1} @llvm.umul.with.overflow.i32(i32 20, i32 10)
call {i32, i1} @llvm.umul.with.overflow.i32(i32 4000000, i32 4000000)
call {<2 x i32>, <2 x i1>} @llvm.umul.with.overflow.v2i32(<2 x i32> <i32 20, i32 poison>, <2 x i32> <i32 10, i32 1>)
ret void
}
; CHECK: Entering function: main
; CHECK-NEXT: %1 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 poison, i32 20) => { poison, poison }
; CHECK-NEXT: %2 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 10, i32 20) => { i32 30, F }
; CHECK-NEXT: %3 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 -2147483647, i32 -20) => { i32 2147483629, T }
; CHECK-NEXT: %4 = call { <2 x i32>, <2 x i1> } @llvm.sadd.with.overflow.v2i32(<2 x i32> <i32 10, i32 poison>, <2 x i32> <i32 20, i32 1>) => { { i32 30, poison }, { F, poison } }
; CHECK-NEXT: %5 = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 10, i32 poison) => { poison, poison }
; CHECK-NEXT: %6 = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 10, i32 20) => { i32 30, F }
; CHECK-NEXT: %7 = call { i32, i1 } @llvm.uadd.with.overflow.i32(i32 -1, i32 20) => { i32 19, T }
; CHECK-NEXT: %8 = call { <2 x i32>, <2 x i1> } @llvm.uadd.with.overflow.v2i32(<2 x i32> <i32 10, i32 poison>, <2 x i32> <i32 20, i32 1>) => { { i32 30, poison }, { F, poison } }
; CHECK-NEXT: %9 = call { i32, i1 } @llvm.ssub.with.overflow.i32(i32 poison, i32 20) => { poison, poison }
; CHECK-NEXT: %10 = call { i32, i1 } @llvm.ssub.with.overflow.i32(i32 10, i32 20) => { i32 -10, F }
; CHECK-NEXT: %11 = call { i32, i1 } @llvm.ssub.with.overflow.i32(i32 -2147483647, i32 20) => { i32 2147483629, T }
; CHECK-NEXT: %12 = call { <2 x i32>, <2 x i1> } @llvm.ssub.with.overflow.v2i32(<2 x i32> <i32 10, i32 poison>, <2 x i32> <i32 20, i32 1>) => { { i32 -10, poison }, { F, poison } }
; CHECK-NEXT: %13 = call { i32, i1 } @llvm.usub.with.overflow.i32(i32 20, i32 poison) => { poison, poison }
; CHECK-NEXT: %14 = call { i32, i1 } @llvm.usub.with.overflow.i32(i32 20, i32 10) => { i32 10, F }
; CHECK-NEXT: %15 = call { i32, i1 } @llvm.usub.with.overflow.i32(i32 0, i32 20) => { i32 -20, T }
; CHECK-NEXT: %16 = call { <2 x i32>, <2 x i1> } @llvm.usub.with.overflow.v2i32(<2 x i32> <i32 20, i32 poison>, <2 x i32> <i32 10, i32 1>) => { { i32 10, poison }, { F, poison } }
; CHECK-NEXT: %17 = call { i32, i1 } @llvm.smul.with.overflow.i32(i32 poison, i32 20) => { poison, poison }
; CHECK-NEXT: %18 = call { i32, i1 } @llvm.smul.with.overflow.i32(i32 10, i32 20) => { i32 200, F }
; CHECK-NEXT: %19 = call { i32, i1 } @llvm.smul.with.overflow.i32(i32 -4000000, i32 4000000) => { i32 -1246822400, T }
; CHECK-NEXT: %20 = call { <2 x i32>, <2 x i1> } @llvm.smul.with.overflow.v2i32(<2 x i32> <i32 10, i32 poison>, <2 x i32> <i32 20, i32 1>) => { { i32 200, poison }, { F, poison } }
; CHECK-NEXT: %21 = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 20, i32 poison) => { poison, poison }
; CHECK-NEXT: %22 = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 20, i32 10) => { i32 200, F }
; CHECK-NEXT: %23 = call { i32, i1 } @llvm.umul.with.overflow.i32(i32 4000000, i32 4000000) => { i32 1246822400, T }
; CHECK-NEXT: %24 = call { <2 x i32>, <2 x i1> } @llvm.umul.with.overflow.v2i32(<2 x i32> <i32 20, i32 poison>, <2 x i32> <i32 10, i32 1>) => { { i32 200, poison }, { F, poison } }
; CHECK-NEXT: ret void
; CHECK-NEXT: Exiting function: main