// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
// RUN: %clang_cc1 -triple riscv32 -target-feature +zkne -emit-llvm %s -o - \
// RUN: -disable-O0-optnone | opt -S -passes=mem2reg \
// RUN: | FileCheck %s -check-prefix=RV32ZKNE
#include <riscv_crypto.h>
// RV32ZKNE-LABEL: @aes32esi(
// RV32ZKNE-NEXT: entry:
// RV32ZKNE-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.aes32esi(i32 [[RS1:%.*]], i32 [[RS2:%.*]], i32 3)
// RV32ZKNE-NEXT: ret i32 [[TMP0]]
//
uint32_t aes32esi(uint32_t rs1, uint32_t rs2) {
return __riscv_aes32esi(rs1, rs2, 3);
}
// RV32ZKNE-LABEL: @aes32esmi(
// RV32ZKNE-NEXT: entry:
// RV32ZKNE-NEXT: [[TMP0:%.*]] = call i32 @llvm.riscv.aes32esmi(i32 [[RS1:%.*]], i32 [[RS2:%.*]], i32 3)
// RV32ZKNE-NEXT: ret i32 [[TMP0]]
//
uint32_t aes32esmi(uint32_t rs1, uint32_t rs2) {
return __riscv_aes32esmi(rs1, rs2, 3);
}