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
53 lines
2.4 KiB
LLVM
53 lines
2.4 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt < %s -passes=slp-vectorizer -S -mtriple=riscv64-unknown-linux -mattr=+v -slp-threshold=-100 | FileCheck %s --check-prefix=RISCV
|
|
; RUN: opt < %s -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux -slp-threshold=-100 | FileCheck %s
|
|
; RUN: opt < %s -passes=slp-vectorizer -S -mtriple=aarch64-unknown-linux -slp-threshold=-100 | FileCheck %s
|
|
; REQUIRES: aarch64-registered-target, x86-registered-target, riscv-registered-target
|
|
|
|
define i64 @test(ptr %p) {
|
|
; RISCV-LABEL: @test(
|
|
; RISCV-NEXT: entry:
|
|
; RISCV-NEXT: [[TMP0:%.*]] = load <6 x i64>, ptr [[P:%.*]], align 4
|
|
; RISCV-NEXT: [[TMP4:%.*]] = shufflevector <6 x i64> [[TMP0]], <6 x i64> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 0, i32 0>
|
|
; RISCV-NEXT: [[TMP5:%.*]] = mul <8 x i64> [[TMP4]], splat (i64 42)
|
|
; RISCV-NEXT: [[TMP6:%.*]] = call i64 @llvm.vector.reduce.add.v8i64(<8 x i64> [[TMP5]])
|
|
; RISCV-NEXT: ret i64 [[TMP6]]
|
|
;
|
|
; CHECK-LABEL: @test(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[TMP0:%.*]] = load <6 x i64>, ptr [[P:%.*]], align 4
|
|
; CHECK-NEXT: [[TMP1:%.*]] = shufflevector <6 x i64> [[TMP0]], <6 x i64> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 0, i32 0>
|
|
; CHECK-NEXT: [[TMP2:%.*]] = mul <8 x i64> [[TMP1]], splat (i64 42)
|
|
; CHECK-NEXT: [[TMP3:%.*]] = call i64 @llvm.vector.reduce.add.v8i64(<8 x i64> [[TMP2]])
|
|
; CHECK-NEXT: ret i64 [[TMP3]]
|
|
;
|
|
entry:
|
|
%arrayidx.1 = getelementptr inbounds i64, ptr %p, i64 1
|
|
%arrayidx.2 = getelementptr inbounds i64, ptr %p, i64 2
|
|
%arrayidx.3 = getelementptr inbounds i64, ptr %p, i64 3
|
|
%arrayidx.4 = getelementptr inbounds i64, ptr %p, i64 4
|
|
%arrayidx.5 = getelementptr inbounds i64, ptr %p, i64 5
|
|
%tmp = load i64, ptr %p, align 4
|
|
%mul = mul i64 %tmp, 42
|
|
%tmp1 = load i64, ptr %arrayidx.1, align 4
|
|
%mul1 = mul i64 %tmp1, 42
|
|
%add = add i64 %mul, %mul1
|
|
%tmp2 = load i64, ptr %arrayidx.2, align 4
|
|
%mul2 = mul i64 %tmp2, 42
|
|
%add1 = add i64 %add, %mul2
|
|
%tmp3 = load i64, ptr %arrayidx.3, align 4
|
|
%mul3 = mul i64 %tmp3, 42
|
|
%add2 = add i64 %add1, %mul3
|
|
%tmp4 = load i64, ptr %arrayidx.4, align 4
|
|
%mul4 = mul i64 %tmp4, 42
|
|
%add3 = add i64 %add2, %mul4
|
|
%tmp5 = load i64, ptr %arrayidx.5, align 4
|
|
%mul5 = mul i64 %tmp5, 42
|
|
%add4 = add i64 %add3, %mul5
|
|
%mul6 = mul i64 %tmp, 42
|
|
%add5 = add i64 %add4, %mul6
|
|
%mul7 = mul i64 %tmp, 42
|
|
%add6 = add i64 %add5, %mul7
|
|
ret i64 %add6
|
|
}
|