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
88 lines
3.3 KiB
LLVM
88 lines
3.3 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: opt -S -passes=instcombine < %s | FileCheck %s
|
|
|
|
define <4 x i32> @mulByZero(<4 x i16> %x) nounwind readnone ssp {
|
|
; CHECK-LABEL: define <4 x i32> @mulByZero(
|
|
; CHECK-SAME: <4 x i16> [[X:%.*]]) #[[ATTR0:[0-9]+]] {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: ret <4 x i32> zeroinitializer
|
|
;
|
|
entry:
|
|
%a = tail call <4 x i32> @llvm.arm.neon.vmulls.v4i32(<4 x i16> %x, <4 x i16> zeroinitializer) nounwind
|
|
ret <4 x i32> %a
|
|
}
|
|
|
|
define <4 x i32> @mulByOne(<4 x i16> %x) nounwind readnone ssp {
|
|
; CHECK-LABEL: define <4 x i32> @mulByOne(
|
|
; CHECK-SAME: <4 x i16> [[X:%.*]]) #[[ATTR0]] {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: [[A:%.*]] = sext <4 x i16> [[X]] to <4 x i32>
|
|
; CHECK-NEXT: ret <4 x i32> [[A]]
|
|
;
|
|
entry:
|
|
%a = tail call <4 x i32> @llvm.arm.neon.vmulls.v4i32(<4 x i16> %x, <4 x i16> <i16 1, i16 1, i16 1, i16 1>) nounwind
|
|
ret <4 x i32> %a
|
|
}
|
|
|
|
define <4 x i32> @constantMul() nounwind readnone ssp {
|
|
; CHECK-LABEL: define <4 x i32> @constantMul(
|
|
; CHECK-SAME: ) #[[ATTR0]] {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: ret <4 x i32> splat (i32 6)
|
|
;
|
|
entry:
|
|
%a = tail call <4 x i32> @llvm.arm.neon.vmulls.v4i32(<4 x i16> <i16 3, i16 3, i16 3, i16 3>, <4 x i16> <i16 2, i16 2, i16 2, i16 2>) nounwind
|
|
ret <4 x i32> %a
|
|
}
|
|
|
|
define <4 x i32> @constantMulS() nounwind readnone ssp {
|
|
; CHECK-LABEL: define <4 x i32> @constantMulS(
|
|
; CHECK-SAME: ) #[[ATTR0]] {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: ret <4 x i32> splat (i32 -1)
|
|
;
|
|
entry:
|
|
%b = tail call <4 x i32> @llvm.arm.neon.vmulls.v4i32(<4 x i16> <i16 -1, i16 -1, i16 -1, i16 -1>, <4 x i16> <i16 1, i16 1, i16 1, i16 1>) nounwind
|
|
ret <4 x i32> %b
|
|
}
|
|
|
|
define <4 x i32> @constantMulU() nounwind readnone ssp {
|
|
; CHECK-LABEL: define <4 x i32> @constantMulU(
|
|
; CHECK-SAME: ) #[[ATTR0]] {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: ret <4 x i32> splat (i32 65535)
|
|
;
|
|
entry:
|
|
%b = tail call <4 x i32> @llvm.arm.neon.vmullu.v4i32(<4 x i16> <i16 -1, i16 -1, i16 -1, i16 -1>, <4 x i16> <i16 1, i16 1, i16 1, i16 1>) nounwind
|
|
ret <4 x i32> %b
|
|
}
|
|
|
|
define <4 x i32> @complex1(<4 x i16> %x) nounwind readnone ssp {
|
|
; CHECK-LABEL: define <4 x i32> @complex1(
|
|
; CHECK-SAME: <4 x i16> [[X:%.*]]) #[[ATTR0]] {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: [[A:%.*]] = tail call <4 x i32> @llvm.arm.neon.vmulls.v4i32(<4 x i16> splat (i16 2), <4 x i16> [[X]]) #[[ATTR2:[0-9]+]]
|
|
; CHECK-NEXT: ret <4 x i32> [[A]]
|
|
;
|
|
entry:
|
|
%a = tail call <4 x i32> @llvm.arm.neon.vmulls.v4i32(<4 x i16> <i16 2, i16 2, i16 2, i16 2>, <4 x i16> %x) nounwind
|
|
%b = add <4 x i32> zeroinitializer, %a
|
|
ret <4 x i32> %b
|
|
}
|
|
|
|
define <4 x i32> @complex2(<4 x i32> %x) nounwind readnone ssp {
|
|
; CHECK-LABEL: define <4 x i32> @complex2(
|
|
; CHECK-SAME: <4 x i32> [[X:%.*]]) #[[ATTR0]] {
|
|
; CHECK-NEXT: [[ENTRY:.*:]]
|
|
; CHECK-NEXT: [[B:%.*]] = add <4 x i32> [[X]], splat (i32 6)
|
|
; CHECK-NEXT: ret <4 x i32> [[B]]
|
|
;
|
|
entry:
|
|
%a = tail call <4 x i32> @llvm.arm.neon.vmulls.v4i32(<4 x i16> <i16 3, i16 3, i16 3, i16 3>, <4 x i16> <i16 2, i16 2, i16 2, i16 2>) nounwind
|
|
%b = add <4 x i32> %x, %a
|
|
ret <4 x i32> %b
|
|
}
|
|
|
|
declare <4 x i32> @llvm.arm.neon.vmulls.v4i32(<4 x i16>, <4 x i16>) nounwind readnone
|
|
declare <4 x i32> @llvm.arm.neon.vmullu.v4i32(<4 x i16>, <4 x i16>) nounwind readnone
|