// REQUIRES: powerpc-registered-target
// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu \
// RUN: -emit-llvm %s -o - -target-cpu pwr8 | FileCheck %s
// RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu \
// RUN: -emit-llvm %s -o - -target-cpu pwr8 | FileCheck %s
// RUN: %clang_cc1 -triple powerpc64-unknown-aix \
// RUN: -emit-llvm %s -o - -target-cpu pwr8 | FileCheck %s
// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu \
// RUN: -emit-llvm %s -o - -target-cpu pwr8 | FileCheck %s
// RUN: %clang_cc1 -triple powerpcle-unknown-linux-gnu \
// RUN: -emit-llvm %s -o - -target-cpu pwr8 | FileCheck %s
// RUN: %clang_cc1 -triple powerpc-unknown-aix \
// RUN: -emit-llvm %s -o - -target-cpu pwr8 | FileCheck %s
// All of these cipher builtins are only for Power 8 and up.
// CHECK-LABEL: @testvcipher(
// CHECK: [[TMP4:%.*]] = call <2 x i64> @llvm.ppc.altivec.crypto.vcipher
// CHECK-NEXT: [[TMP5:%.*]] = bitcast <2 x i64> [[TMP4]] to <16 x i8>
// CHECK-NEXT: ret <16 x i8> [[TMP5]]
//
vector unsigned char
// CHECK-LABEL: @testvcipherlast(
// CHECK: [[TMP4:%.*]] = call <2 x i64> @llvm.ppc.altivec.crypto.vcipherlast
// CHECK-NEXT: [[TMP5:%.*]] = bitcast <2 x i64> [[TMP4]] to <16 x i8>
// CHECK-NEXT: ret <16 x i8> [[TMP5]]
//
vector unsigned char
// CHECK-LABEL: @testvncipher(
// CHECK: [[TMP4:%.*]] = call <2 x i64> @llvm.ppc.altivec.crypto.vncipher
// CHECK-NEXT: [[TMP5:%.*]] = bitcast <2 x i64> [[TMP4]] to <16 x i8>
// CHECK-NEXT: ret <16 x i8> [[TMP5]]
//
vector unsigned char
// CHECK-LABEL: @testvncipherlast(
// CHECK: [[TMP4:%.*]] = call <2 x i64> @llvm.ppc.altivec.crypto.vncipherlast
// CHECK-NEXT: [[TMP5:%.*]] = bitcast <2 x i64> [[TMP4]] to <16 x i8>
// CHECK-NEXT: ret <16 x i8> [[TMP5]]
//
vector unsigned char
// CHECK-LABEL: @testvpermxor(
// CHECK: [[TMP3:%.*]] = call <16 x i8> @llvm.ppc.altivec.crypto.vpermxor
// CHECK-NEXT: ret <16 x i8> [[TMP3]]
//
vector unsigned char
// CHECK-LABEL: @testvpmsumb(
// CHECK: [[TMP2:%.*]] = call <16 x i8> @llvm.ppc.altivec.crypto.vpmsumb
// CHECK-NEXT: ret <16 x i8> [[TMP2]]
//
vector unsigned char
// CHECK-LABEL: @testvpmsumd(
// CHECK: [[TMP2:%.*]] = call <2 x i64> @llvm.ppc.altivec.crypto.vpmsumd
// CHECK-NEXT: ret <2 x i64> [[TMP2]]
//
vector unsigned long long
// CHECK-LABEL: @testvpmsumh(
// CHECK: [[TMP2:%.*]] = call <8 x i16> @llvm.ppc.altivec.crypto.vpmsumh
// CHECK-NEXT: ret <8 x i16> [[TMP2]]
//
vector unsigned short
// CHECK-LABEL: @testvpmsumw(
// CHECK: [[TMP2:%.*]] = call <4 x i32> @llvm.ppc.altivec.crypto.vpmsumw
// CHECK-NEXT: ret <4 x i32> [[TMP2]]
//
vector unsigned int