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
222 lines
8.0 KiB
LLVM
222 lines
8.0 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
|
|
; RUN: llc < %s -O0 --global-isel -disable-wasm-fallthrough-return-opt -wasm-keep-registers | FileCheck %s
|
|
|
|
target triple = "wasm32-unknown-unknown"
|
|
|
|
declare i8 @llvm.fshl.i8(i8, i8, i8)
|
|
declare i16 @llvm.fshl.i16(i16, i16, i16)
|
|
declare i32 @llvm.fshl.i32(i32, i32, i32)
|
|
declare i64 @llvm.fshl.i64(i64, i64, i64)
|
|
|
|
define i8 @fshl_i8(i8 %x, i8 %y) {
|
|
; CHECK-LABEL: fshl_i8:
|
|
; CHECK: .functype fshl_i8 (i32, i32) -> (i32)
|
|
; CHECK-NEXT: .local i32, i32
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: i32.const $push5=, 5
|
|
; CHECK-NEXT: local.set 2, $pop5
|
|
; CHECK-NEXT: i32.const $push6=, 3
|
|
; CHECK-NEXT: local.set 3, $pop6
|
|
; CHECK-NEXT: local.get $push8=, 0
|
|
; CHECK-NEXT: local.get $push7=, 2
|
|
; CHECK-NEXT: i32.shl $push3=, $pop8, $pop7
|
|
; CHECK-NEXT: local.get $push9=, 1
|
|
; CHECK-NEXT: i32.const $push4=, 255
|
|
; CHECK-NEXT: i32.and $push1=, $pop9, $pop4
|
|
; CHECK-NEXT: local.get $push10=, 3
|
|
; CHECK-NEXT: i32.shr_u $push2=, $pop1, $pop10
|
|
; CHECK-NEXT: i32.or $push0=, $pop3, $pop2
|
|
; CHECK-NEXT: return $pop0
|
|
%a = call i8 @llvm.fshl.i8(i8 %x, i8 %y, i8 5)
|
|
ret i8 %a
|
|
}
|
|
|
|
define i8 @fshlv_i8(i8 %x, i8 %y, i8 %z) {
|
|
; CHECK-LABEL: fshlv_i8:
|
|
; CHECK: .functype fshlv_i8 (i32, i32, i32) -> (i32)
|
|
; CHECK-NEXT: .local i32, i32, i32, i32
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: i32.const $push10=, 7
|
|
; CHECK-NEXT: local.set 3, $pop10
|
|
; CHECK-NEXT: local.get $push13=, 2
|
|
; CHECK-NEXT: local.get $push12=, 3
|
|
; CHECK-NEXT: i32.and $push11=, $pop13, $pop12
|
|
; CHECK-NEXT: local.set 4, $pop11
|
|
; CHECK-NEXT: local.get $push16=, 3
|
|
; CHECK-NEXT: local.get $push14=, 2
|
|
; CHECK-NEXT: i32.const $push7=, -1
|
|
; CHECK-NEXT: i32.xor $push6=, $pop14, $pop7
|
|
; CHECK-NEXT: i32.and $push15=, $pop16, $pop6
|
|
; CHECK-NEXT: local.set 5, $pop15
|
|
; CHECK-NEXT: i32.const $push17=, 1
|
|
; CHECK-NEXT: local.set 6, $pop17
|
|
; CHECK-NEXT: local.get $push19=, 0
|
|
; CHECK-NEXT: local.get $push18=, 4
|
|
; CHECK-NEXT: i32.shl $push5=, $pop19, $pop18
|
|
; CHECK-NEXT: local.get $push20=, 1
|
|
; CHECK-NEXT: i32.const $push8=, 255
|
|
; CHECK-NEXT: i32.and $push3=, $pop20, $pop8
|
|
; CHECK-NEXT: local.get $push21=, 6
|
|
; CHECK-NEXT: i32.shr_u $push4=, $pop3, $pop21
|
|
; CHECK-NEXT: i32.const $push9=, 255
|
|
; CHECK-NEXT: i32.and $push1=, $pop4, $pop9
|
|
; CHECK-NEXT: local.get $push22=, 5
|
|
; CHECK-NEXT: i32.shr_u $push2=, $pop1, $pop22
|
|
; CHECK-NEXT: i32.or $push0=, $pop5, $pop2
|
|
; CHECK-NEXT: return $pop0
|
|
%a = call i8 @llvm.fshl.i8(i8 %x, i8 %y, i8 %z)
|
|
ret i8 %a
|
|
}
|
|
|
|
define i16 @fshl_i16(i16 %x, i16 %y) {
|
|
; CHECK-LABEL: fshl_i16:
|
|
; CHECK: .functype fshl_i16 (i32, i32) -> (i32)
|
|
; CHECK-NEXT: .local i32, i32
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: i32.const $push5=, 13
|
|
; CHECK-NEXT: local.set 2, $pop5
|
|
; CHECK-NEXT: i32.const $push6=, 3
|
|
; CHECK-NEXT: local.set 3, $pop6
|
|
; CHECK-NEXT: local.get $push8=, 0
|
|
; CHECK-NEXT: local.get $push7=, 2
|
|
; CHECK-NEXT: i32.shl $push3=, $pop8, $pop7
|
|
; CHECK-NEXT: local.get $push9=, 1
|
|
; CHECK-NEXT: i32.const $push4=, 65535
|
|
; CHECK-NEXT: i32.and $push1=, $pop9, $pop4
|
|
; CHECK-NEXT: local.get $push10=, 3
|
|
; CHECK-NEXT: i32.shr_u $push2=, $pop1, $pop10
|
|
; CHECK-NEXT: i32.or $push0=, $pop3, $pop2
|
|
; CHECK-NEXT: return $pop0
|
|
%a = call i16 @llvm.fshl.i16(i16 %x, i16 %y, i16 13)
|
|
ret i16 %a
|
|
}
|
|
|
|
define i16 @fshlv_i16(i16 %x, i16 %y, i16 %z) {
|
|
; CHECK-LABEL: fshlv_i16:
|
|
; CHECK: .functype fshlv_i16 (i32, i32, i32) -> (i32)
|
|
; CHECK-NEXT: .local i32, i32, i32, i32
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: i32.const $push10=, 15
|
|
; CHECK-NEXT: local.set 3, $pop10
|
|
; CHECK-NEXT: local.get $push13=, 2
|
|
; CHECK-NEXT: local.get $push12=, 3
|
|
; CHECK-NEXT: i32.and $push11=, $pop13, $pop12
|
|
; CHECK-NEXT: local.set 4, $pop11
|
|
; CHECK-NEXT: local.get $push16=, 3
|
|
; CHECK-NEXT: local.get $push14=, 2
|
|
; CHECK-NEXT: i32.const $push7=, -1
|
|
; CHECK-NEXT: i32.xor $push6=, $pop14, $pop7
|
|
; CHECK-NEXT: i32.and $push15=, $pop16, $pop6
|
|
; CHECK-NEXT: local.set 5, $pop15
|
|
; CHECK-NEXT: i32.const $push17=, 1
|
|
; CHECK-NEXT: local.set 6, $pop17
|
|
; CHECK-NEXT: local.get $push19=, 0
|
|
; CHECK-NEXT: local.get $push18=, 4
|
|
; CHECK-NEXT: i32.shl $push5=, $pop19, $pop18
|
|
; CHECK-NEXT: local.get $push20=, 1
|
|
; CHECK-NEXT: i32.const $push8=, 65535
|
|
; CHECK-NEXT: i32.and $push3=, $pop20, $pop8
|
|
; CHECK-NEXT: local.get $push21=, 6
|
|
; CHECK-NEXT: i32.shr_u $push4=, $pop3, $pop21
|
|
; CHECK-NEXT: i32.const $push9=, 65535
|
|
; CHECK-NEXT: i32.and $push1=, $pop4, $pop9
|
|
; CHECK-NEXT: local.get $push22=, 5
|
|
; CHECK-NEXT: i32.shr_u $push2=, $pop1, $pop22
|
|
; CHECK-NEXT: i32.or $push0=, $pop5, $pop2
|
|
; CHECK-NEXT: return $pop0
|
|
%a = call i16 @llvm.fshl.i16(i16 %x, i16 %y, i16 %z)
|
|
ret i16 %a
|
|
}
|
|
|
|
define i32 @fshl_i32(i32 %x, i32 %y) {
|
|
; CHECK-LABEL: fshl_i32:
|
|
; CHECK: .functype fshl_i32 (i32, i32) -> (i32)
|
|
; CHECK-NEXT: .local i32, i32
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: i32.const $push3=, 21
|
|
; CHECK-NEXT: local.set 2, $pop3
|
|
; CHECK-NEXT: i32.const $push4=, 11
|
|
; CHECK-NEXT: local.set 3, $pop4
|
|
; CHECK-NEXT: local.get $push6=, 0
|
|
; CHECK-NEXT: local.get $push5=, 2
|
|
; CHECK-NEXT: i32.shl $push1=, $pop6, $pop5
|
|
; CHECK-NEXT: local.get $push8=, 1
|
|
; CHECK-NEXT: local.get $push7=, 3
|
|
; CHECK-NEXT: i32.shr_u $push2=, $pop8, $pop7
|
|
; CHECK-NEXT: i32.or $push0=, $pop1, $pop2
|
|
; CHECK-NEXT: return $pop0
|
|
%a = call i32 @llvm.fshl.i32(i32 %x, i32 %y, i32 21)
|
|
ret i32 %a
|
|
}
|
|
|
|
define i32 @fshlv_i32(i32 %x, i32 %y, i32 %z) {
|
|
; CHECK-LABEL: fshlv_i32:
|
|
; CHECK: .functype fshlv_i32 (i32, i32, i32) -> (i32)
|
|
; CHECK-NEXT: .local i32, i32
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: local.get $push6=, 2
|
|
; CHECK-NEXT: i32.const $push1=, -1
|
|
; CHECK-NEXT: i32.xor $push5=, $pop6, $pop1
|
|
; CHECK-NEXT: local.set 3, $pop5
|
|
; CHECK-NEXT: i32.const $push7=, 1
|
|
; CHECK-NEXT: local.set 4, $pop7
|
|
; CHECK-NEXT: local.get $push9=, 0
|
|
; CHECK-NEXT: local.get $push8=, 2
|
|
; CHECK-NEXT: i32.shl $push2=, $pop9, $pop8
|
|
; CHECK-NEXT: local.get $push11=, 1
|
|
; CHECK-NEXT: local.get $push10=, 4
|
|
; CHECK-NEXT: i32.shr_u $push3=, $pop11, $pop10
|
|
; CHECK-NEXT: local.get $push12=, 3
|
|
; CHECK-NEXT: i32.shr_u $push4=, $pop3, $pop12
|
|
; CHECK-NEXT: i32.or $push0=, $pop2, $pop4
|
|
; CHECK-NEXT: return $pop0
|
|
%a = call i32 @llvm.fshl.i32(i32 %x, i32 %y, i32 %z)
|
|
ret i32 %a
|
|
}
|
|
|
|
define i64 @fshl_i64(i64 %x, i64 %y) {
|
|
; CHECK-LABEL: fshl_i64:
|
|
; CHECK: .functype fshl_i64 (i64, i64) -> (i64)
|
|
; CHECK-NEXT: .local i64, i64
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: i64.const $push3=, 37
|
|
; CHECK-NEXT: local.set 2, $pop3
|
|
; CHECK-NEXT: i64.const $push4=, 27
|
|
; CHECK-NEXT: local.set 3, $pop4
|
|
; CHECK-NEXT: local.get $push6=, 0
|
|
; CHECK-NEXT: local.get $push5=, 2
|
|
; CHECK-NEXT: i64.shl $push1=, $pop6, $pop5
|
|
; CHECK-NEXT: local.get $push8=, 1
|
|
; CHECK-NEXT: local.get $push7=, 3
|
|
; CHECK-NEXT: i64.shr_u $push2=, $pop8, $pop7
|
|
; CHECK-NEXT: i64.or $push0=, $pop1, $pop2
|
|
; CHECK-NEXT: return $pop0
|
|
%a = call i64 @llvm.fshl.i64(i64 %x, i64 %y, i64 37)
|
|
ret i64 %a
|
|
}
|
|
|
|
define i64 @fshlv_i64(i64 %x, i64 %y, i64 %z) {
|
|
; CHECK-LABEL: fshlv_i64:
|
|
; CHECK: .functype fshlv_i64 (i64, i64, i64) -> (i64)
|
|
; CHECK-NEXT: .local i64, i64
|
|
; CHECK-NEXT: # %bb.0:
|
|
; CHECK-NEXT: local.get $push6=, 2
|
|
; CHECK-NEXT: i64.const $push1=, -1
|
|
; CHECK-NEXT: i64.xor $push5=, $pop6, $pop1
|
|
; CHECK-NEXT: local.set 3, $pop5
|
|
; CHECK-NEXT: i64.const $push7=, 1
|
|
; CHECK-NEXT: local.set 4, $pop7
|
|
; CHECK-NEXT: local.get $push9=, 0
|
|
; CHECK-NEXT: local.get $push8=, 2
|
|
; CHECK-NEXT: i64.shl $push2=, $pop9, $pop8
|
|
; CHECK-NEXT: local.get $push11=, 1
|
|
; CHECK-NEXT: local.get $push10=, 4
|
|
; CHECK-NEXT: i64.shr_u $push3=, $pop11, $pop10
|
|
; CHECK-NEXT: local.get $push12=, 3
|
|
; CHECK-NEXT: i64.shr_u $push4=, $pop3, $pop12
|
|
; CHECK-NEXT: i64.or $push0=, $pop2, $pop4
|
|
; CHECK-NEXT: return $pop0
|
|
%a = call i64 @llvm.fshl.i64(i64 %x, i64 %y, i64 %z)
|
|
ret i64 %a
|
|
}
|