File tree 2 files changed +30
-1
lines changed
2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -2476,7 +2476,11 @@ mlir::Value CIRGenFunction::buildCommonNeonBuiltinExpr(
2476
2476
default :
2477
2477
llvm::errs () << getAArch64SIMDIntrinsicString (builtinID) << " " ;
2478
2478
llvm_unreachable (" NYI" );
2479
-
2479
+ case NEON::BI__builtin_neon_vaesmcq_u8: {
2480
+ intrincsName = " aarch64.crypto.aesmc" ;
2481
+ argTypes.push_back (vTy);
2482
+ break ;
2483
+ }
2480
2484
case NEON::BI__builtin_neon_vpadd_v:
2481
2485
case NEON::BI__builtin_neon_vpaddq_v: {
2482
2486
intrincsName = mlir::isa<mlir::FloatType>(vTy.getEltType ())
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
2
+ // RUN: -target-feature +sha2 -target-feature +aes \
3
+ // RUN: -disable-O0-optnone -fclangir -emit-cir -o %t.cir %s
4
+ // RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
5
+
6
+ // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
7
+ // RUN: -target-feature +sha2 -target-feature +aes \
8
+ // RUN: -disable-O0-optnone -emit-llvm -o - %s \
9
+ // RUN: | opt -S -passes=mem2reg,simplifycfg -o %t.ll
10
+ // RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
11
+
12
+ // REQUIRES: aarch64-registered-target || arm-registered-target
13
+
14
+ #include <arm_neon.h>
15
+
16
+ uint8x16_t test_vaesmcq_u8 (uint8x16_t data ) {
17
+ return vaesmcq_u8 (data );
18
+
19
+ // CIR-LABEL: vaesmcq_u8
20
+ // {{%.*}} = cir.llvm.intrinsic "aarch64.crypto.aesmc" {{%.*}} : (!cir.vector<!u8i x 16>) -> !cir.vector<!u8i x 16>
21
+
22
+ // LLVM: {{.*}}vaesmcq_u8(<16 x i8>{{.*}}[[DATA:%.*]])
23
+ // LLVM: [[RES:%.*]] = call <16 x i8> @llvm.aarch64.crypto.aesmc(<16 x i8> [[DATA]])
24
+ // LLVM: ret <16 x i8> [[RES]]
25
+ }
You can’t perform that action at this time.
0 commit comments