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

59 lines
4.0 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
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64"
define void @main() {
entry:
%bitcast_int2int = bitcast i32 1 to i32
%bitcast_int2int_poison = bitcast i32 poison to i32
%bitcast_int2float1 = bitcast i32 0 to float
%bitcast_int2float2 = bitcast i32 5033160 to float
%bitcast_float2float1 = bitcast float 2.0 to float
%bitcast_float2float2 = bitcast float 0x3FA9999900000000 to float
%bitcast_float2int = bitcast float 2.0 to i32
%bitcast_half2bf16 = bitcast half 1.0 to bfloat
%ptr = alloca i32
%bitcast_ptr2ptr = bitcast ptr %ptr to ptr
%bitcast_vec2scalar1 = bitcast <2 x i32> <i32 0, i32 1> to i64
%bitcast_vec2scalar2 = bitcast <4 x i4> <i4 1, i4 2, i4 3, i4 5> to i16
%bitcast_scalar2vec1 = bitcast i64 1 to <2 x i32>
%bitcast_scalar2vec2 = bitcast i16 32768 to <16 x i1>
%bitcast_vec2scalar_partial_poison = bitcast <2 x i32> <i32 poison, i32 0> to i64
%bitcast_scalar2vec_poison = bitcast i64 poison to <2 x i32>
%bitcast_vec2vec_up = bitcast <2 x i32> <i32 1, i32 poison> to <4 x i16>
%bitcast_vec2vec_down1 = bitcast <4 x i16> <i16 0, i16 poison, i16 2, i16 3> to <2 x i32>
%bitcast_vec2vec_down2 = bitcast <4 x i32> <i32 0, i32 1, i32 2, i32 3> to <2 x i64>
%bitcast_vec2vec_weird = bitcast <8 x i3> <i3 0, i3 1, i3 2, i3 3, i3 4, i3 5, i3 6, i3 7> to <3 x i8>
%bitcast_intvec2floatvec = bitcast <2 x i32> <i32 1, i32 2> to <4 x half>
%bitcast_floatvec2int = bitcast <4 x half> <half 1.0, half 2.0, half 3.0, half 4.0> to i64
ret void
}
; CHECK: Entering function: main
; CHECK-NEXT: %bitcast_int2int = bitcast i32 1 to i32 => i32 1
; CHECK-NEXT: %bitcast_int2int_poison = bitcast i32 poison to i32 => poison
; CHECK-NEXT: %bitcast_int2float1 = bitcast i32 0 to float => float 0.000000e+00
; CHECK-NEXT: %bitcast_int2float2 = bitcast i32 5033160 to float => float 0x004CCCC8
; CHECK-NEXT: %bitcast_float2float1 = bitcast float 2.000000e+00 to float => float 2.000000e+00
; CHECK-NEXT: %bitcast_float2float2 = bitcast float f0x3D4CCCC8 to float => float 0x3D4CCCC8
; CHECK-NEXT: %bitcast_float2int = bitcast float 2.000000e+00 to i32 => i32 1073741824
; CHECK-NEXT: %bitcast_half2bf16 = bitcast half 1.000000e+00 to bfloat => bfloat 7.812500e-03
; CHECK-NEXT: %ptr = alloca i32, align 4 => ptr 0x8 [ptr]
; CHECK-NEXT: %bitcast_ptr2ptr = bitcast ptr %ptr to ptr => ptr 0x8 [ptr]
; CHECK-NEXT: %bitcast_vec2scalar1 = bitcast <2 x i32> <i32 0, i32 1> to i64 => i64 1
; CHECK-NEXT: %bitcast_vec2scalar2 = bitcast <4 x i4> <i4 1, i4 2, i4 3, i4 5> to i16 => i16 4661
; CHECK-NEXT: %bitcast_scalar2vec1 = bitcast i64 1 to <2 x i32> => { i32 0, i32 1 }
; CHECK-NEXT: %bitcast_scalar2vec2 = bitcast i16 -32768 to <16 x i1> => { T, F, F, F, F, F, F, F, F, F, F, F, F, F, F, F }
; CHECK-NEXT: %bitcast_vec2scalar_partial_poison = bitcast <2 x i32> <i32 poison, i32 0> to i64 => poison
; CHECK-NEXT: %bitcast_scalar2vec_poison = bitcast i64 poison to <2 x i32> => { poison, poison }
; CHECK-NEXT: %bitcast_vec2vec_up = bitcast <2 x i32> <i32 1, i32 poison> to <4 x i16> => { i16 0, i16 1, poison, poison }
; CHECK-NEXT: %bitcast_vec2vec_down1 = bitcast <4 x i16> <i16 0, i16 poison, i16 2, i16 3> to <2 x i32> => { poison, i32 131075 }
; CHECK-NEXT: %bitcast_vec2vec_down2 = bitcast <4 x i32> <i32 0, i32 1, i32 2, i32 3> to <2 x i64> => { i64 1, i64 8589934595 }
; CHECK-NEXT: %bitcast_vec2vec_weird = bitcast <8 x i3> <i3 0, i3 1, i3 2, i3 3, i3 -4, i3 -3, i3 -2, i3 -1> to <3 x i8> => { i8 5, i8 57, i8 119 }
; CHECK-NEXT: %bitcast_intvec2floatvec = bitcast <2 x i32> <i32 1, i32 2> to <4 x half> => { half 0.000000e+00, half 5.960460e-08, half 0.000000e+00, half 1.192090e-07 }
; CHECK-NEXT: %bitcast_floatvec2int = bitcast <4 x half> <half 1.000000e+00, half 2.000000e+00, half 3.000000e+00, half 4.000000e+00> to i64 => i64 4323526012127167488
; CHECK-NEXT: ret void
; CHECK-NEXT: Exiting function: main