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
76 lines
3.0 KiB
LLVM
76 lines
3.0 KiB
LLVM
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
|
|
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
|
|
|
|
; CHECK-SPIRV: OpName %[[#FuncNameInt16:]] "spirv.llvm_bswap_i16"
|
|
; CHECK-SPIRV: OpName %[[#FuncNameInt32:]] "spirv.llvm_bswap_i32"
|
|
; CHECK-SPIRV: OpName %[[#FuncNameInt64:]] "spirv.llvm_bswap_i64"
|
|
|
|
; CHECK-SPIRV: %[[#TypeInt32:]] = OpTypeInt 32 0
|
|
; CHECK-SPIRV: %[[#TypeInt16:]] = OpTypeInt 16 0
|
|
; CHECK-SPIRV: %[[#TypeInt64:]] = OpTypeInt 64 0
|
|
|
|
; CHECK-SPIRV: %[[#FuncNameInt16]] = OpFunction %[[#TypeInt16]]
|
|
; CHECK-SPIRV: %[[#FuncParameter:]] = OpFunctionParameter %[[#TypeInt16]]
|
|
; CHECK-SPIRV: %[[#]] = OpShiftLeftLogical %[[#TypeInt16]] %[[#FuncParameter]]
|
|
; CHECK-SPIRV: %[[#]] = OpShiftRightLogical %[[#TypeInt16]] %[[#FuncParameter]]
|
|
; CHECK-SPIRV: %[[#RetVal:]] = OpBitwiseOr %[[#TypeInt16]]
|
|
; CHECK-SPIRV: OpReturnValue %[[#RetVal]]
|
|
; CHECK-SPIRV: OpFunctionEnd
|
|
|
|
; CHECK-SPIRV: %[[#FuncNameInt32]] = OpFunction %[[#TypeInt32]]
|
|
; CHECK-SPIRV: %[[#FuncParameter:]] = OpFunctionParameter %[[#TypeInt32]]
|
|
; CHECK-SPIRV-COUNT-2: %[[#]] = OpShiftLeftLogical %[[#TypeInt32]] %[[#FuncParameter]]
|
|
; CHECK-SPIRV-COUNT-2: %[[#]] = OpShiftRightLogical %[[#TypeInt32]] %[[#FuncParameter]]
|
|
; CHECK-SPIRV-COUNT-2: OpBitwiseAnd %[[#TypeInt32]]
|
|
; CHECK-SPIRV-COUNT-2: OpBitwiseOr %[[#TypeInt32]]
|
|
; CHECK-SPIRV: %[[#RetVal:]] = OpBitwiseOr %[[#TypeInt32]]
|
|
; CHECK-SPIRV: OpReturnValue %[[#RetVal:]]
|
|
; CHECK-SPIRV: OpFunctionEnd
|
|
|
|
; CHECK-SPIRV: %[[#FuncNameInt64]] = OpFunction %[[#TypeInt64]]
|
|
; CHECK-SPIRV: %[[#FuncParameter:]] = OpFunctionParameter %[[#TypeInt64]]
|
|
; CHECK-SPIRV-COUNT-4: %[[#]] = OpShiftLeftLogical %[[#TypeInt64]] %[[#FuncParameter]] %[[#]]
|
|
; CHECK-SPIRV-COUNT-4: %[[#]] = OpShiftRightLogical %[[#TypeInt64]] %[[#FuncParameter]] %[[#]]
|
|
; CHECK-SPIRV-COUNT-6: OpBitwiseAnd %[[#TypeInt64]]
|
|
; CHECK-SPIRV-COUNT-6: OpBitwiseOr %[[#TypeInt64]]
|
|
; CHECK-SPIRV: %[[#RetVal:]] = OpBitwiseOr %[[#TypeInt64]]
|
|
; CHECK-SPIRV: OpReturnValue %[[#RetVal]]
|
|
; CHECK-SPIRV: OpFunctionEnd
|
|
|
|
define dso_local i32 @main() {
|
|
entry:
|
|
%retval = alloca i32, align 4
|
|
%a = alloca i16, align 2
|
|
%b = alloca i16, align 2
|
|
%h = alloca i16, align 2
|
|
%i = alloca i16, align 2
|
|
%c = alloca i32, align 4
|
|
%d = alloca i32, align 4
|
|
%e = alloca i64, align 8
|
|
%f = alloca i64, align 8
|
|
store i32 0, ptr %retval, align 4
|
|
store i16 258, ptr %a, align 2
|
|
%0 = load i16, ptr %a, align 2
|
|
%1 = call i16 @llvm.bswap.i16(i16 %0)
|
|
store i16 %1, ptr %b, align 2
|
|
store i16 234, ptr %h, align 2
|
|
%2 = load i16, ptr %h, align 2
|
|
%3 = call i16 @llvm.bswap.i16(i16 %2)
|
|
store i16 %3, ptr %i, align 2
|
|
store i32 566, ptr %c, align 4
|
|
%4 = load i32, ptr %c, align 4
|
|
%5 = call i32 @llvm.bswap.i32(i32 %4)
|
|
store i32 %5, ptr %d, align 4
|
|
store i64 12587, ptr %e, align 8
|
|
%6 = load i64, ptr %e, align 8
|
|
%7 = call i64 @llvm.bswap.i64(i64 %6)
|
|
store i64 %7, ptr %f, align 8
|
|
ret i32 0
|
|
}
|
|
|
|
declare i16 @llvm.bswap.i16(i16)
|
|
|
|
declare i32 @llvm.bswap.i32(i32)
|
|
|
|
declare i64 @llvm.bswap.i64(i64)
|