| // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 6 | |
| // RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -target-cpu future \ | |
| // RUN: -emit-llvm %s -o - | FileCheck %s | |
| // RUN: %clang_cc1 -triple powerpc64-unknown-unknown -target-cpu future \ | |
| // RUN: -emit-llvm %s -o - | FileCheck %s | |
| // CHECK-LABEL: @test_aes_encrypt_paired( | |
| // CHECK: {{.*}}call <256 x i1> @llvm.ppc.aes.encrypt.paired(<256 x i1> {{.*}}, <256 x i1> {{.*}}, i32 0) | |
| // CHECK: ret void | |
| void test_aes_encrypt_paired(__vector_pair *vpp1, __vector_pair *vpp2, __vector_pair *resp) { | |
| __vector_pair vp1 = *vpp1; | |
| __vector_pair vp2 = *vpp2; | |
| __vector_pair res = __builtin_aes_encrypt_paired(vp1, vp2, 0); | |
| *resp = res; | |
| } | |
| // CHECK-LABEL: @test_aes128_encrypt_paired( | |
| // CHECK: {{.*}}call <256 x i1> @llvm.ppc.aes.encrypt.paired(<256 x i1> {{.*}}, <256 x i1> {{.*}}, i32 0) | |
| // CHECK: ret void | |
| void test_aes128_encrypt_paired(__vector_pair *vpp1, __vector_pair *vpp2, __vector_pair *resp) { | |
| __vector_pair vp1 = *vpp1; | |
| __vector_pair vp2 = *vpp2; | |
| __vector_pair res = __builtin_aes128_encrypt_paired(vp1, vp2); | |
| *resp = res; | |
| } | |
| // CHECK-LABEL: @test_aes192_encrypt_paired( | |
| // CHECK: {{.*}}call <256 x i1> @llvm.ppc.aes.encrypt.paired(<256 x i1> {{.*}}, <256 x i1> {{.*}}, i32 1) | |
| // CHECK: ret void | |
| void test_aes192_encrypt_paired(__vector_pair *vpp1, __vector_pair *vpp2, __vector_pair *resp) { | |
| __vector_pair vp1 = *vpp1; | |
| __vector_pair vp2 = *vpp2; | |
| __vector_pair res = __builtin_aes192_encrypt_paired(vp1, vp2); | |
| *resp = res; | |
| } | |
| // CHECK-LABEL: @test_aes256_encrypt_paired( | |
| // CHECK: {{.*}}call <256 x i1> @llvm.ppc.aes.encrypt.paired(<256 x i1> {{.*}}, <256 x i1> {{.*}}, i32 2) | |
| // CHECK: ret void | |
| void test_aes256_encrypt_paired(__vector_pair *vpp1, __vector_pair *vpp2, __vector_pair *resp) { | |
| __vector_pair vp1 = *vpp1; | |
| __vector_pair vp2 = *vpp2; | |
| __vector_pair res = __builtin_aes256_encrypt_paired(vp1, vp2); | |
| *resp = res; | |
| } | |
| // CHECK-LABEL: @test_aes_decrypt_paired( | |
| // CHECK: {{.*}}call <256 x i1> @llvm.ppc.aes.decrypt.paired(<256 x i1> {{.*}}, <256 x i1> {{.*}}, i32 0) | |
| // CHECK: ret void | |
| void test_aes_decrypt_paired(__vector_pair *vpp1, __vector_pair *vpp2, __vector_pair *resp) { | |
| __vector_pair vp1 = *vpp1; | |
| __vector_pair vp2 = *vpp2; | |
| __vector_pair res = __builtin_aes_decrypt_paired(vp1, vp2, 0); | |
| *resp = res; | |
| } | |
| // CHECK-LABEL: @test_aes128_decrypt_paired( | |
| // CHECK: {{.*}}call <256 x i1> @llvm.ppc.aes.decrypt.paired(<256 x i1> {{.*}}, <256 x i1> {{.*}}, i32 0) | |
| // CHECK: ret void | |
| void test_aes128_decrypt_paired(__vector_pair *vpp1, __vector_pair *vpp2, __vector_pair *resp) { | |
| __vector_pair vp1 = *vpp1; | |
| __vector_pair vp2 = *vpp2; | |
| __vector_pair res = __builtin_aes128_decrypt_paired(vp1, vp2); | |
| *resp = res; | |
| } | |
| // CHECK-LABEL: @test_aes192_decrypt_paired( | |
| // CHECK: {{.*}}call <256 x i1> @llvm.ppc.aes.decrypt.paired(<256 x i1> {{.*}}, <256 x i1> {{.*}}, i32 1) | |
| // CHECK: ret void | |
| void test_aes192_decrypt_paired(__vector_pair *vpp1, __vector_pair *vpp2, __vector_pair *resp) { | |
| __vector_pair vp1 = *vpp1; | |
| __vector_pair vp2 = *vpp2; | |
| __vector_pair res = __builtin_aes192_decrypt_paired(vp1, vp2); | |
| *resp = res; | |
| } | |
| // CHECK-LABEL: @test_aes256_decrypt_paired( | |
| // CHECK: {{.*}}call <256 x i1> @llvm.ppc.aes.decrypt.paired(<256 x i1> {{.*}}, <256 x i1> {{.*}}, i32 2) | |
| // CHECK: ret void | |
| void test_aes256_decrypt_paired(__vector_pair *vpp1, __vector_pair *vpp2, __vector_pair *resp) { | |
| __vector_pair vp1 = *vpp1; | |
| __vector_pair vp2 = *vpp2; | |
| __vector_pair res = __builtin_aes256_decrypt_paired(vp1, vp2); | |
| *resp = res; | |
| } | |
| // CHECK-LABEL: @test_aes_genlastkey_paired( | |
| // CHECK: {{.*}}call <256 x i1> @llvm.ppc.aes.genlastkey.paired(<256 x i1> {{.*}}, i32 0) | |
| // CHECK: ret void | |
| void test_aes_genlastkey_paired(__vector_pair *vpp1, __vector_pair *resp) { | |
| __vector_pair vp1 = *vpp1; | |
| __vector_pair res = __builtin_aes_genlastkey_paired(vp1, 0); | |
| *resp = res; | |
| } | |
| // CHECK-LABEL: @test_aes128_genlastkey_paired( | |
| // CHECK: {{.*}}call <256 x i1> @llvm.ppc.aes.genlastkey.paired(<256 x i1> {{.*}}, i32 0) | |
| // CHECK: ret void | |
| void test_aes128_genlastkey_paired(__vector_pair *vpp1, __vector_pair *resp) { | |
| __vector_pair vp1 = *vpp1; | |
| __vector_pair res = __builtin_aes128_genlastkey_paired(vp1); | |
| *resp = res; | |
| } | |
| // CHECK-LABEL: @test_aes192_genlastkey_paired( | |
| // CHECK: {{.*}}call <256 x i1> @llvm.ppc.aes.genlastkey.paired(<256 x i1> {{.*}}, i32 1) | |
| // CHECK: ret void | |
| void test_aes192_genlastkey_paired(__vector_pair *vpp1, __vector_pair *resp) { | |
| __vector_pair vp1 = *vpp1; | |
| __vector_pair res = __builtin_aes192_genlastkey_paired(vp1); | |
| *resp = res; | |
| } | |
| // CHECK-LABEL: @test_aes256_genlastkey_paired( | |
| // CHECK: {{.*}}call <256 x i1> @llvm.ppc.aes.genlastkey.paired(<256 x i1> {{.*}}, i32 2) | |
| // CHECK: ret void | |
| void test_aes256_genlastkey_paired(__vector_pair *vpp1, __vector_pair *resp) { | |
| __vector_pair vp1 = *vpp1; | |
| __vector_pair res = __builtin_aes256_genlastkey_paired(vp1); | |
| *resp = res; | |
| } | |
| // CHECK-LABEL: @test_galois_field_mult( | |
| // CHECK: {{.*}}call <16 x i8> @llvm.ppc.galois.field.mult(<16 x i8> {{.*}}, <16 x i8> {{.*}}, i32 0) | |
| // CHECK: ret <16 x i8> | |
| vector unsigned char test_galois_field_mult(vector unsigned char a, vector unsigned char b) { | |
| return __builtin_galois_field_mult(a, b, 0); | |
| } | |
| // CHECK-LABEL: @test_galois_field_mult_gcm( | |
| // CHECK: {{.*}}call <16 x i8> @llvm.ppc.galois.field.mult(<16 x i8> {{.*}}, <16 x i8> {{.*}}, i32 0) | |
| // CHECK: ret <16 x i8> | |
| vector unsigned char test_galois_field_mult_gcm(vector unsigned char a, vector unsigned char b) { | |
| return __builtin_galois_field_mult_gcm(a, b); | |
| } | |
| // CHECK-LABEL: @test_galois_field_mult_xts( | |
| // CHECK: {{.*}}call <16 x i8> @llvm.ppc.galois.field.mult(<16 x i8> {{.*}}, <16 x i8> {{.*}}, i32 1) | |
| // CHECK: ret <16 x i8> | |
| vector unsigned char test_galois_field_mult_xts(vector unsigned char a, vector unsigned char b) { | |
| return __builtin_galois_field_mult_xts(a, b); | |
| } |