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
85 lines
4.6 KiB
C
85 lines
4.6 KiB
C
// REQUIRES: powerpc-registered-target
|
|
// RUN: %clang_cc1 -flax-vector-conversions=none -O2 -target-feature +power8-vector -target-feature +isa-v207-instructions \
|
|
// RUN: -triple powerpc64-unknown-linux -emit-llvm %s -o - | FileCheck %s
|
|
//
|
|
// RUN: %clang_cc1 -flax-vector-conversions=none -O2 -target-feature +power8-vector -target-feature +isa-v207-instructions \
|
|
// RUN: -triple powerpc64le-unknown-linux -emit-llvm %s -o - | FileCheck %s
|
|
|
|
// RUN: %clang_cc1 -flax-vector-conversions=none -O2 -target-feature +power8-vector -target-feature +isa-v207-instructions \
|
|
// RUN: -triple powerpc64-unknown-aix -emit-llvm %s -o - | FileCheck %s
|
|
#include <altivec.h>
|
|
|
|
// CHECK-LABEL: @test_vaddeuqm_c(
|
|
// CHECK: entry:
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <16 x i8> [[A:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <16 x i8> [[B:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[C:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP3:%.*]] = tail call <1 x i128> @llvm.ppc.altivec.vaddeuqm(<1 x i128> [[TMP0]], <1 x i128> [[TMP1]], <1 x i128> [[TMP2]])
|
|
// CHECK-NEXT: [[TMP4:%.*]] = bitcast <1 x i128> [[TMP3]] to <16 x i8>
|
|
// CHECK-NEXT: ret <16 x i8> [[TMP4]]
|
|
vector unsigned char test_vaddeuqm_c(vector unsigned char a, vector unsigned char b,
|
|
vector unsigned char c) {
|
|
return __builtin_altivec_vaddeuqm_c(a, b, c);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_vaddcuq_c(
|
|
// CHECK: entry:
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <16 x i8> [[A:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <16 x i8> [[B:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP2:%.*]] = tail call <1 x i128> @llvm.ppc.altivec.vaddcuq(<1 x i128> [[TMP0]], <1 x i128> [[TMP1]])
|
|
// CHECK-NEXT: [[TMP3:%.*]] = bitcast <1 x i128> [[TMP2]] to <16 x i8>
|
|
// CHECK-NEXT: ret <16 x i8> [[TMP3]]
|
|
vector unsigned char test_vaddcuq_c(vector unsigned char a, vector unsigned char b) {
|
|
return __builtin_altivec_vaddcuq_c(a, b);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_vaddecuq_c(
|
|
// CHECK: entry:
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <16 x i8> [[A:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <16 x i8> [[B:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[C:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP3:%.*]] = tail call <1 x i128> @llvm.ppc.altivec.vaddecuq(<1 x i128> [[TMP0]], <1 x i128> [[TMP1]], <1 x i128> [[TMP2]])
|
|
// CHECK-NEXT: [[TMP4:%.*]] = bitcast <1 x i128> [[TMP3]] to <16 x i8>
|
|
// CHECK-NEXT: ret <16 x i8> [[TMP4]]
|
|
vector unsigned char test_vaddecuq_c(vector unsigned char a, vector unsigned char b,
|
|
vector unsigned char c) {
|
|
return __builtin_altivec_vaddecuq_c(a, b, c);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_vsubeuqm_c(
|
|
// CHECK: entry:
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <16 x i8> [[A:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <16 x i8> [[B:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[C:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP3:%.*]] = tail call <1 x i128> @llvm.ppc.altivec.vsubeuqm(<1 x i128> [[TMP0]], <1 x i128> [[TMP1]], <1 x i128> [[TMP2]])
|
|
// CHECK-NEXT: [[TMP4:%.*]] = bitcast <1 x i128> [[TMP3]] to <16 x i8>
|
|
// CHECK-NEXT: ret <16 x i8> [[TMP4]]
|
|
vector unsigned char test_vsubeuqm_c(vector unsigned char a, vector unsigned char b,
|
|
vector unsigned char c) {
|
|
return __builtin_altivec_vsubeuqm_c(a, b, c);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_vsubcuq_c(
|
|
// CHECK: entry:
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <16 x i8> [[A:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <16 x i8> [[B:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP2:%.*]] = tail call <1 x i128> @llvm.ppc.altivec.vsubcuq(<1 x i128> [[TMP0]], <1 x i128> [[TMP1]])
|
|
// CHECK-NEXT: [[TMP3:%.*]] = bitcast <1 x i128> [[TMP2]] to <16 x i8>
|
|
// CHECK-NEXT: ret <16 x i8> [[TMP3]]
|
|
vector unsigned char test_vsubcuq_c(vector unsigned char a, vector unsigned char b) {
|
|
return __builtin_altivec_vsubcuq_c(a, b);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_vsubecuq_c(
|
|
// CHECK: entry:
|
|
// CHECK-NEXT: [[TMP0:%.*]] = bitcast <16 x i8> [[A:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP1:%.*]] = bitcast <16 x i8> [[B:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP2:%.*]] = bitcast <16 x i8> [[C:%.*]] to <1 x i128>
|
|
// CHECK-NEXT: [[TMP3:%.*]] = tail call <1 x i128> @llvm.ppc.altivec.vsubecuq(<1 x i128> [[TMP0]], <1 x i128> [[TMP1]], <1 x i128> [[TMP2]])
|
|
// CHECK-NEXT: [[TMP4:%.*]] = bitcast <1 x i128> [[TMP3]] to <16 x i8>
|
|
// CHECK-NEXT: ret <16 x i8> [[TMP4]]
|
|
vector unsigned char test_vsubecuq_c(vector unsigned char a, vector unsigned char b,
|
|
vector unsigned char c) {
|
|
return __builtin_altivec_vsubecuq_c(a, b, c);
|
|
}
|