mirror of https://github.com/llvm/circt.git
Bump LLVM (#4845)
* LLHDToLLVM: make void pointers consistent --------- Co-authored-by: Martin Erhart <maerhart@outlook.com>
This commit is contained in:
parent
c2a011645a
commit
126ba049a0
|
@ -42,8 +42,7 @@ using namespace circt::llhd;
|
|||
static Value getGlobalString(Location loc, OpBuilder &builder,
|
||||
TypeConverter *typeConverter,
|
||||
LLVM::GlobalOp &str) {
|
||||
auto i8PtrTy =
|
||||
LLVM::LLVMPointerType::get(IntegerType::get(builder.getContext(), 8));
|
||||
auto voidPtrTy = LLVM::LLVMPointerType::get(builder.getContext());
|
||||
auto i32Ty = IntegerType::get(builder.getContext(), 32);
|
||||
|
||||
auto addr = builder.create<LLVM::AddressOfOp>(
|
||||
|
@ -51,7 +50,7 @@ static Value getGlobalString(Location loc, OpBuilder &builder,
|
|||
auto idx = builder.create<LLVM::ConstantOp>(loc, i32Ty,
|
||||
builder.getI32IntegerAttr(0));
|
||||
std::array<Value, 2> idxs({idx, idx});
|
||||
return builder.create<LLVM::GEPOp>(loc, i8PtrTy, addr, idxs);
|
||||
return builder.create<LLVM::GEPOp>(loc, voidPtrTy, addr, idxs);
|
||||
}
|
||||
|
||||
/// Looks up a symbol and inserts a new functino at the beginning of the
|
||||
|
@ -78,11 +77,10 @@ getOrInsertFunction(ModuleOp &module, ConversionPatternRewriter &rewriter,
|
|||
/// Return the LLVM type used to represent a signal. It corresponds to a struct
|
||||
/// with the format: {valuePtr, bitOffset, instanceIndex, globalIndex}.
|
||||
static Type getLLVMSigType(LLVM::LLVMDialect *dialect) {
|
||||
auto i8PtrTy =
|
||||
LLVM::LLVMPointerType::get(IntegerType::get(dialect->getContext(), 8));
|
||||
auto voidPtrTy = LLVM::LLVMPointerType::get(dialect->getContext());
|
||||
auto i64Ty = IntegerType::get(dialect->getContext(), 64);
|
||||
return LLVM::LLVMStructType::getLiteral(dialect->getContext(),
|
||||
{i8PtrTy, i64Ty, i64Ty, i64Ty});
|
||||
{voidPtrTy, i64Ty, i64Ty, i64Ty});
|
||||
}
|
||||
|
||||
/// Extract the details from the given signal struct. The details are returned
|
||||
|
@ -92,8 +90,7 @@ static std::vector<Value> getSignalDetail(ConversionPatternRewriter &rewriter,
|
|||
Location loc, Value signal,
|
||||
bool extractIndices = false) {
|
||||
|
||||
auto i8PtrTy =
|
||||
LLVM::LLVMPointerType::get(IntegerType::get(dialect->getContext(), 8));
|
||||
auto voidPtrTy = LLVM::LLVMPointerType::get(dialect->getContext());
|
||||
auto i32Ty = IntegerType::get(dialect->getContext(), 32);
|
||||
auto i64Ty = IntegerType::get(dialect->getContext(), 64);
|
||||
|
||||
|
@ -106,9 +103,9 @@ static std::vector<Value> getSignalDetail(ConversionPatternRewriter &rewriter,
|
|||
rewriter.getI32IntegerAttr(1));
|
||||
|
||||
auto sigPtrPtr =
|
||||
rewriter.create<LLVM::GEPOp>(loc, LLVM::LLVMPointerType::get(i8PtrTy),
|
||||
rewriter.create<LLVM::GEPOp>(loc, LLVM::LLVMPointerType::get(voidPtrTy),
|
||||
signal, ArrayRef<Value>({zeroC, zeroC}));
|
||||
result.push_back(rewriter.create<LLVM::LoadOp>(loc, i8PtrTy, sigPtrPtr));
|
||||
result.push_back(rewriter.create<LLVM::LoadOp>(loc, voidPtrTy, sigPtrPtr));
|
||||
|
||||
auto offsetPtr =
|
||||
rewriter.create<LLVM::GEPOp>(loc, LLVM::LLVMPointerType::get(i64Ty),
|
||||
|
@ -555,8 +552,7 @@ static std::pair<Value, Value>
|
|||
shiftIntegerSigPointer(Location loc, LLVM::LLVMDialect *dialect,
|
||||
ConversionPatternRewriter &rewriter, Value pointer,
|
||||
Value index) {
|
||||
auto i8PtrTy =
|
||||
LLVM::LLVMPointerType::get(IntegerType::get(dialect->getContext(), 8));
|
||||
auto voidPtrTy = LLVM::LLVMPointerType::get(dialect->getContext());
|
||||
auto i64Ty = IntegerType::get(dialect->getContext(), 64);
|
||||
|
||||
auto ptrToInt = rewriter.create<LLVM::PtrToIntOp>(loc, i64Ty, pointer);
|
||||
|
@ -564,7 +560,7 @@ shiftIntegerSigPointer(Location loc, LLVM::LLVMDialect *dialect,
|
|||
loc, index.getType(), rewriter.getI64IntegerAttr(8));
|
||||
auto ptrOffset = rewriter.create<LLVM::UDivOp>(loc, index, const8);
|
||||
auto shiftedPtr = rewriter.create<LLVM::AddOp>(loc, ptrToInt, ptrOffset);
|
||||
auto newPtr = rewriter.create<LLVM::IntToPtrOp>(loc, i8PtrTy, shiftedPtr);
|
||||
auto newPtr = rewriter.create<LLVM::IntToPtrOp>(loc, voidPtrTy, shiftedPtr);
|
||||
|
||||
// Compute the new offset into the first byte.
|
||||
auto bitOffset = rewriter.create<LLVM::URemOp>(loc, index, const8);
|
||||
|
@ -579,8 +575,7 @@ static Value shiftStructuredSigPointer(Location loc,
|
|||
Type structTy, Type elemPtrTy,
|
||||
Value pointer, Value index) {
|
||||
auto dialect = &structTy.getDialect();
|
||||
auto i8PtrTy =
|
||||
LLVM::LLVMPointerType::get(IntegerType::get(dialect->getContext(), 8));
|
||||
auto voidPtrTy = LLVM::LLVMPointerType::get(dialect->getContext());
|
||||
auto i32Ty = IntegerType::get(dialect->getContext(), 32);
|
||||
|
||||
auto zeroC = rewriter.create<LLVM::ConstantOp>(loc, i32Ty,
|
||||
|
@ -589,7 +584,7 @@ static Value shiftStructuredSigPointer(Location loc,
|
|||
loc, LLVM::LLVMPointerType::get(structTy), pointer);
|
||||
auto gep = rewriter.create<LLVM::GEPOp>(loc, elemPtrTy, bitcastToArr,
|
||||
ArrayRef<Value>({zeroC, index}));
|
||||
return rewriter.create<LLVM::BitcastOp>(loc, i8PtrTy, gep);
|
||||
return rewriter.create<LLVM::BitcastOp>(loc, voidPtrTy, gep);
|
||||
}
|
||||
|
||||
/// Shift the pointer of an array-typed signal, to change its view as if the
|
||||
|
@ -611,9 +606,9 @@ static Value shiftArraySigPointer(Location loc,
|
|||
static Type convertSigType(SigType type, LLVMTypeConverter &converter) {
|
||||
auto &context = converter.getContext();
|
||||
auto i64Ty = IntegerType::get(&context, 64);
|
||||
auto i8PtrTy = LLVM::LLVMPointerType::get(IntegerType::get(&context, 8));
|
||||
auto voidPtrTy = LLVM::LLVMPointerType::get(&context);
|
||||
return LLVM::LLVMPointerType::get(LLVM::LLVMStructType::getLiteral(
|
||||
&context, {i8PtrTy, i64Ty, i64Ty, i64Ty}));
|
||||
&context, {voidPtrTy, i64Ty, i64Ty, i64Ty}));
|
||||
}
|
||||
|
||||
static Type convertTimeType(TimeType type, LLVMTypeConverter &converter) {
|
||||
|
@ -653,7 +648,7 @@ struct EntityOpConversion : public ConvertToLLVMPattern {
|
|||
|
||||
// Collect used llvm types.
|
||||
auto voidTy = getVoidType();
|
||||
auto i8PtrTy = getVoidPtrType();
|
||||
auto voidPtrTy = getVoidPtrType();
|
||||
auto i32Ty = IntegerType::get(rewriter.getContext(), 32);
|
||||
auto sigTy = getLLVMSigType(&getDialect());
|
||||
auto entityStatePtrTy =
|
||||
|
@ -667,7 +662,7 @@ struct EntityOpConversion : public ConvertToLLVMPattern {
|
|||
entityOp.getNumArguments());
|
||||
// Add state and signal table arguments.
|
||||
intermediate.addInputs(std::array<Type, 3>(
|
||||
{i8PtrTy, entityStatePtrTy, LLVM::LLVMPointerType::get(sigTy)}));
|
||||
{voidPtrTy, entityStatePtrTy, LLVM::LLVMPointerType::get(sigTy)}));
|
||||
for (size_t i = 0, e = entityOp.getNumArguments(); i < e; ++i)
|
||||
intermediate.addInputs(i, voidTy);
|
||||
rewriter.applySignatureConversion(&entityOp.getBody(), intermediate,
|
||||
|
@ -677,7 +672,7 @@ struct EntityOpConversion : public ConvertToLLVMPattern {
|
|||
OpBuilder::atBlockBegin(&entityOp.getBlocks().front());
|
||||
LLVMTypeConverter::SignatureConversion final(
|
||||
intermediate.getConvertedTypes().size());
|
||||
final.addInputs(0, i8PtrTy);
|
||||
final.addInputs(0, voidPtrTy);
|
||||
final.addInputs(1, entityStatePtrTy);
|
||||
final.addInputs(2, LLVM::LLVMPointerType::get(sigTy));
|
||||
|
||||
|
@ -700,7 +695,8 @@ struct EntityOpConversion : public ConvertToLLVMPattern {
|
|||
|
||||
// Get the converted entity signature.
|
||||
auto funcTy = LLVM::LLVMFunctionType::get(
|
||||
voidTy, {i8PtrTy, entityStatePtrTy, LLVM::LLVMPointerType::get(sigTy)});
|
||||
voidTy,
|
||||
{voidPtrTy, entityStatePtrTy, LLVM::LLVMPointerType::get(sigTy)});
|
||||
|
||||
// Create the a new llvm function to house the lowered entity.
|
||||
auto llvmFunc = rewriter.create<LLVM::LLVMFuncOp>(
|
||||
|
@ -744,7 +740,7 @@ struct ProcOpConversion : public ConvertToLLVMPattern {
|
|||
|
||||
// Collect used llvm types.
|
||||
auto voidTy = getVoidType();
|
||||
auto i8PtrTy = getVoidPtrType();
|
||||
auto voidPtrTy = getVoidPtrType();
|
||||
auto i1Ty = IntegerType::get(rewriter.getContext(), 1);
|
||||
auto i32Ty = IntegerType::get(rewriter.getContext(), 32);
|
||||
auto senseTableTy = LLVM::LLVMPointerType::get(
|
||||
|
@ -765,7 +761,7 @@ struct ProcOpConversion : public ConvertToLLVMPattern {
|
|||
LLVMTypeConverter::SignatureConversion intermediate(
|
||||
procOp.getNumArguments());
|
||||
// Add state, process state table and signal table arguments.
|
||||
std::array<Type, 3> procArgTys({i8PtrTy,
|
||||
std::array<Type, 3> procArgTys({voidPtrTy,
|
||||
LLVM::LLVMPointerType::get(stateTy),
|
||||
LLVM::LLVMPointerType::get(sigTy)});
|
||||
intermediate.addInputs(procArgTys);
|
||||
|
@ -779,7 +775,7 @@ struct ProcOpConversion : public ConvertToLLVMPattern {
|
|||
OpBuilder::atBlockBegin(&procOp.getBlocks().front());
|
||||
LLVMTypeConverter::SignatureConversion final(
|
||||
intermediate.getConvertedTypes().size());
|
||||
final.addInputs(0, i8PtrTy);
|
||||
final.addInputs(0, voidPtrTy);
|
||||
final.addInputs(1, LLVM::LLVMPointerType::get(stateTy));
|
||||
final.addInputs(2, LLVM::LLVMPointerType::get(sigTy));
|
||||
|
||||
|
@ -797,7 +793,7 @@ struct ProcOpConversion : public ConvertToLLVMPattern {
|
|||
|
||||
// Get the converted process signature.
|
||||
auto funcTy = LLVM::LLVMFunctionType::get(
|
||||
voidTy, {i8PtrTy, LLVM::LLVMPointerType::get(stateTy),
|
||||
voidTy, {voidPtrTy, LLVM::LLVMPointerType::get(stateTy),
|
||||
LLVM::LLVMPointerType::get(sigTy)});
|
||||
// Create a new llvm function to house the lowered process.
|
||||
auto llvmFunc = rewriter.create<LLVM::LLVMFuncOp>(op->getLoc(),
|
||||
|
@ -895,14 +891,14 @@ struct WaitOpConversion : public ConvertToLLVMPattern {
|
|||
auto llvmFunc = op->getParentOfType<LLVM::LLVMFuncOp>();
|
||||
|
||||
auto voidTy = getVoidType();
|
||||
auto i8PtrTy = getVoidPtrType();
|
||||
auto voidPtrTy = getVoidPtrType();
|
||||
auto i1Ty = IntegerType::get(rewriter.getContext(), 1);
|
||||
auto i32Ty = IntegerType::get(rewriter.getContext(), 32);
|
||||
auto i64Ty = IntegerType::get(rewriter.getContext(), 64);
|
||||
|
||||
// Get the llhdSuspend runtime function.
|
||||
auto llhdSuspendTy = LLVM::LLVMFunctionType::get(
|
||||
voidTy, {i8PtrTy, i8PtrTy, i64Ty, i64Ty, i64Ty});
|
||||
voidTy, {voidPtrTy, voidPtrTy, i64Ty, i64Ty, i64Ty});
|
||||
auto module = op->getParentOfType<ModuleOp>();
|
||||
auto llhdSuspendFunc = getOrInsertFunction(module, rewriter, op->getLoc(),
|
||||
"llhdSuspend", llhdSuspendTy);
|
||||
|
@ -963,7 +959,7 @@ struct WaitOpConversion : public ConvertToLLVMPattern {
|
|||
|
||||
// Update and store the new resume index in the process state.
|
||||
auto procStateBC =
|
||||
rewriter.create<LLVM::BitcastOp>(op->getLoc(), i8PtrTy, procState);
|
||||
rewriter.create<LLVM::BitcastOp>(op->getLoc(), voidPtrTy, procState);
|
||||
|
||||
// Spawn scheduled event, if present.
|
||||
if (waitOp.getTime()) {
|
||||
|
@ -1003,20 +999,20 @@ struct InstOpConversion : public ConvertToLLVMPattern {
|
|||
auto entity = op->getParentOfType<EntityOp>();
|
||||
|
||||
auto voidTy = getVoidType();
|
||||
auto i8PtrTy = getVoidPtrType();
|
||||
auto voidPtrTy = getVoidPtrType();
|
||||
auto i1Ty = IntegerType::get(rewriter.getContext(), 1);
|
||||
auto i32Ty = IntegerType::get(rewriter.getContext(), 32);
|
||||
auto i64Ty = IntegerType::get(rewriter.getContext(), 64);
|
||||
|
||||
// Init function signature: (i8* %state) -> void.
|
||||
auto initFuncTy = LLVM::LLVMFunctionType::get(voidTy, {i8PtrTy});
|
||||
auto initFuncTy = LLVM::LLVMFunctionType::get(voidTy, {voidPtrTy});
|
||||
auto initFunc =
|
||||
getOrInsertFunction(module, rewriter, op->getLoc(), "llhd_init",
|
||||
initFuncTy, /*insertBodyAndTerminator=*/true);
|
||||
|
||||
// Get or insert the malloc function definition.
|
||||
// Malloc function signature: (i64 %size) -> i8* %pointer.
|
||||
auto mallocSigFuncTy = LLVM::LLVMFunctionType::get(i8PtrTy, {i64Ty});
|
||||
auto mallocSigFuncTy = LLVM::LLVMFunctionType::get(voidPtrTy, {i64Ty});
|
||||
auto mallFunc = getOrInsertFunction(module, rewriter, op->getLoc(),
|
||||
"malloc", mallocSigFuncTy);
|
||||
|
||||
|
@ -1024,7 +1020,7 @@ struct InstOpConversion : public ConvertToLLVMPattern {
|
|||
// allocSignal function signature: (i8* %state, i8* %sig_name, i8*
|
||||
// %sig_owner, i32 %value) -> i32 %sig_index.
|
||||
auto allocSigFuncTy = LLVM::LLVMFunctionType::get(
|
||||
i32Ty, {i8PtrTy, i32Ty, i8PtrTy, i8PtrTy, i64Ty});
|
||||
i32Ty, {voidPtrTy, i32Ty, voidPtrTy, voidPtrTy, i64Ty});
|
||||
auto sigFunc = getOrInsertFunction(module, rewriter, op->getLoc(),
|
||||
"allocSignal", allocSigFuncTy);
|
||||
|
||||
|
@ -1032,7 +1028,7 @@ struct InstOpConversion : public ConvertToLLVMPattern {
|
|||
// Signature: (i8* state, i32 signalIndex, i32 size, i32 numElements) ->
|
||||
// void
|
||||
auto addSigArrElemFuncTy =
|
||||
LLVM::LLVMFunctionType::get(voidTy, {i8PtrTy, i32Ty, i32Ty, i32Ty});
|
||||
LLVM::LLVMFunctionType::get(voidTy, {voidPtrTy, i32Ty, i32Ty, i32Ty});
|
||||
auto addSigElemFunc =
|
||||
getOrInsertFunction(module, rewriter, op->getLoc(),
|
||||
"addSigArrayElements", addSigArrElemFuncTy);
|
||||
|
@ -1040,20 +1036,20 @@ struct InstOpConversion : public ConvertToLLVMPattern {
|
|||
// Add information about one element of a struct signal to the state.
|
||||
// Signature: (i8* state, i32 signalIndex, i32 offset, i32 size) -> void
|
||||
auto addSigStructElemFuncTy =
|
||||
LLVM::LLVMFunctionType::get(voidTy, {i8PtrTy, i32Ty, i32Ty, i32Ty});
|
||||
LLVM::LLVMFunctionType::get(voidTy, {voidPtrTy, i32Ty, i32Ty, i32Ty});
|
||||
auto addSigStructFunc =
|
||||
getOrInsertFunction(module, rewriter, op->getLoc(),
|
||||
"addSigStructElement", addSigStructElemFuncTy);
|
||||
|
||||
// Get or insert allocProc library call definition.
|
||||
auto allocProcFuncTy =
|
||||
LLVM::LLVMFunctionType::get(voidTy, {i8PtrTy, i8PtrTy, i8PtrTy});
|
||||
LLVM::LLVMFunctionType::get(voidTy, {voidPtrTy, voidPtrTy, voidPtrTy});
|
||||
auto allocProcFunc = getOrInsertFunction(module, rewriter, op->getLoc(),
|
||||
"allocProc", allocProcFuncTy);
|
||||
|
||||
// Get or insert allocEntity library call definition.
|
||||
auto allocEntityFuncTy =
|
||||
LLVM::LLVMFunctionType::get(voidTy, {i8PtrTy, i8PtrTy, i8PtrTy});
|
||||
LLVM::LLVMFunctionType::get(voidTy, {voidPtrTy, voidPtrTy, voidPtrTy});
|
||||
auto allocEntityFunc = getOrInsertFunction(
|
||||
module, rewriter, op->getLoc(), "allocEntity", allocEntityFuncTy);
|
||||
|
||||
|
@ -1073,7 +1069,7 @@ struct InstOpConversion : public ConvertToLLVMPattern {
|
|||
if (!parentSym) {
|
||||
owner = LLVM::createGlobalString(
|
||||
op->getLoc(), initBuilder, "instance." + ownerName, ownerName + '\0',
|
||||
LLVM::Linkage::Internal, /*useOpaquePointers=*/false);
|
||||
LLVM::Linkage::Internal, /*useOpaquePointers=*/true);
|
||||
parentSym = module.lookupSymbol<LLVM::GlobalOp>("instance." + ownerName);
|
||||
} else {
|
||||
owner =
|
||||
|
@ -1097,7 +1093,7 @@ struct InstOpConversion : public ConvertToLLVMPattern {
|
|||
|
||||
// Malloc reg state.
|
||||
auto regMall = initBuilder
|
||||
.create<LLVM::CallOp>(op->getLoc(), i8PtrTy,
|
||||
.create<LLVM::CallOp>(op->getLoc(), voidPtrTy,
|
||||
SymbolRefAttr::get(mallFunc),
|
||||
ArrayRef<Value>({regSize}))
|
||||
.getResult();
|
||||
|
@ -1173,7 +1169,7 @@ struct InstOpConversion : public ConvertToLLVMPattern {
|
|||
std::array<Value, 1> margs({mallocSize});
|
||||
auto mall =
|
||||
initBuilder
|
||||
.create<LLVM::CallOp>(op.getLoc(), i8PtrTy,
|
||||
.create<LLVM::CallOp>(op.getLoc(), voidPtrTy,
|
||||
SymbolRefAttr::get(mallFunc), margs)
|
||||
.getResult();
|
||||
|
||||
|
@ -1294,7 +1290,7 @@ struct InstOpConversion : public ConvertToLLVMPattern {
|
|||
std::array<Value, 1> procStateMArgs({procStateSize});
|
||||
auto procStateMall = initBuilder
|
||||
.create<LLVM::CallOp>(
|
||||
op->getLoc(), i8PtrTy,
|
||||
op->getLoc(), voidPtrTy,
|
||||
SymbolRefAttr::get(mallFunc), procStateMArgs)
|
||||
.getResult();
|
||||
|
||||
|
@ -1317,7 +1313,7 @@ struct InstOpConversion : public ConvertToLLVMPattern {
|
|||
std::array<Value, 1> senseMArgs({sensesSize});
|
||||
auto sensesMall =
|
||||
initBuilder
|
||||
.create<LLVM::CallOp>(op->getLoc(), i8PtrTy,
|
||||
.create<LLVM::CallOp>(op->getLoc(), voidPtrTy,
|
||||
SymbolRefAttr::get(mallFunc), senseMArgs)
|
||||
.getResult();
|
||||
|
||||
|
@ -1488,7 +1484,7 @@ struct DrvOpConversion : public ConvertToLLVMPattern {
|
|||
|
||||
// Collect used llvm types.
|
||||
auto voidTy = getVoidType();
|
||||
auto i8PtrTy = getVoidPtrType();
|
||||
auto voidPtrTy = getVoidPtrType();
|
||||
auto i1Ty = IntegerType::get(rewriter.getContext(), 1);
|
||||
auto i32Ty = IntegerType::get(rewriter.getContext(), 32);
|
||||
auto i64Ty = IntegerType::get(rewriter.getContext(), 64);
|
||||
|
@ -1496,7 +1492,7 @@ struct DrvOpConversion : public ConvertToLLVMPattern {
|
|||
|
||||
// Get or insert the drive library call.
|
||||
auto drvFuncTy = LLVM::LLVMFunctionType::get(
|
||||
voidTy, {i8PtrTy, LLVM::LLVMPointerType::get(sigTy), i8PtrTy, i64Ty,
|
||||
voidTy, {voidPtrTy, LLVM::LLVMPointerType::get(sigTy), voidPtrTy, i64Ty,
|
||||
i64Ty, i64Ty, i64Ty});
|
||||
auto drvFunc = getOrInsertFunction(module, rewriter, op->getLoc(),
|
||||
"driveSignal", drvFuncTy);
|
||||
|
@ -1559,7 +1555,7 @@ struct DrvOpConversion : public ConvertToLLVMPattern {
|
|||
auto alloca = rewriter.create<LLVM::AllocaOp>(
|
||||
op->getLoc(), LLVM::LLVMPointerType::get(valTy), oneConst, 4);
|
||||
rewriter.create<LLVM::StoreOp>(op->getLoc(), castVal, alloca);
|
||||
auto bc = rewriter.create<LLVM::BitcastOp>(op->getLoc(), i8PtrTy, alloca);
|
||||
auto bc = rewriter.create<LLVM::BitcastOp>(op->getLoc(), voidPtrTy, alloca);
|
||||
|
||||
// Get the time values.
|
||||
auto realTime = rewriter.create<LLVM::ExtractValueOp>(
|
||||
|
|
2
llvm
2
llvm
|
@ -1 +1 @@
|
|||
Subproject commit c0967995d254fd2dd24ba74afa46df5f559f11ba
|
||||
Subproject commit 77c90ebeb7baaad71d306a8f611c78674f00e9f5
|
|
@ -2,41 +2,41 @@
|
|||
//RUN: circt-opt %s --convert-llhd-to-llvm --split-input-file | FileCheck %s
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_empty(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<()>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: llvm.return
|
||||
// CHECK: }
|
||||
llhd.entity @convert_empty () -> () {}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_one_input(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<()>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.return
|
||||
// CHECK: }
|
||||
llhd.entity @convert_one_input (%in0 : !llhd.sig<i1>) -> () {}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_one_output(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<()>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.return
|
||||
// CHECK: }
|
||||
llhd.entity @convert_one_output () -> (%out0 : !llhd.sig<i1>) {}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_input_and_output(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<()>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_5]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_5]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.return
|
||||
// CHECK: }
|
||||
llhd.entity @convert_input_and_output (%in0 : !llhd.sig<i1>) -> (%out0 : !llhd.sig<i1>) {}
|
||||
|
|
|
@ -3,35 +3,35 @@
|
|||
|
||||
// CHECK-LABEL: llvm.func @convertSigExtract(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: i5,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_2:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 0] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.load %[[VAL_4]] : !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 1] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 0] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.load %[[VAL_4]] : !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 1] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_7:.*]] = llvm.load %[[VAL_6]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_8:.*]] = llvm.mlir.constant(2 : i32) : i32
|
||||
// CHECK: %[[VAL_9:.*]] = llvm.mlir.constant(3 : i32) : i32
|
||||
// CHECK: %[[VAL_10:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 2] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_10:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 2] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_11:.*]] = llvm.load %[[VAL_10]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_12:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 3] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_12:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 3] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_13:.*]] = llvm.load %[[VAL_12]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_14:.*]] = llvm.zext %[[VAL_0]] : i5 to i64
|
||||
// CHECK: %[[VAL_15:.*]] = llvm.add %[[VAL_7]], %[[VAL_14]] : i64
|
||||
// CHECK: %[[VAL_16:.*]] = llvm.ptrtoint %[[VAL_5]] : !llvm.ptr<i8> to i64
|
||||
// CHECK: %[[VAL_16:.*]] = llvm.ptrtoint %[[VAL_5]] : !llvm.ptr to i64
|
||||
// CHECK: %[[VAL_17:.*]] = llvm.mlir.constant(8 : i64) : i64
|
||||
// CHECK: %[[VAL_18:.*]] = llvm.udiv %[[VAL_15]], %[[VAL_17]] : i64
|
||||
// CHECK: %[[VAL_19:.*]] = llvm.add %[[VAL_16]], %[[VAL_18]] : i64
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.inttoptr %[[VAL_19]] : i64 to !llvm.ptr<i8>
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.inttoptr %[[VAL_19]] : i64 to !llvm.ptr
|
||||
// CHECK: %[[VAL_21:.*]] = llvm.urem %[[VAL_15]], %[[VAL_17]] : i64
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.mlir.undef : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_23:.*]] = llvm.insertvalue %[[VAL_20]], %[[VAL_22]][0] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_24:.*]] = llvm.insertvalue %[[VAL_21]], %[[VAL_23]][1] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_25:.*]] = llvm.insertvalue %[[VAL_11]], %[[VAL_24]][2] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_26:.*]] = llvm.insertvalue %[[VAL_13]], %[[VAL_25]][3] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.mlir.undef : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_23:.*]] = llvm.insertvalue %[[VAL_20]], %[[VAL_22]][0] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_24:.*]] = llvm.insertvalue %[[VAL_21]], %[[VAL_23]][1] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_25:.*]] = llvm.insertvalue %[[VAL_11]], %[[VAL_24]][2] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_26:.*]] = llvm.insertvalue %[[VAL_13]], %[[VAL_25]][3] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_27:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_28:.*]] = llvm.alloca %[[VAL_27]] x !llvm.struct<(ptr<i8>, i64, i64, i64)> {alignment = 4 : i64} : (i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: llvm.store %[[VAL_26]], %[[VAL_28]] : !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_28:.*]] = llvm.alloca %[[VAL_27]] x !llvm.struct<(ptr, i64, i64, i64)> {alignment = 4 : i64} : (i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.store %[[VAL_26]], %[[VAL_28]] : !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.return
|
||||
// CHECK: }
|
||||
func.func @convertSigExtract (%c : i5, %sI32 : !llhd.sig<i32>) {
|
||||
|
@ -42,32 +42,32 @@ func.func @convertSigExtract (%c : i5, %sI32 : !llhd.sig<i32>) {
|
|||
|
||||
// CHECK-LABEL: llvm.func @convertSigArraySlice(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: i2,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_2:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 0] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.load %[[VAL_4]] : !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 1] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 0] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.load %[[VAL_4]] : !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 1] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_7:.*]] = llvm.load %[[VAL_6]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_8:.*]] = llvm.mlir.constant(2 : i32) : i32
|
||||
// CHECK: %[[VAL_9:.*]] = llvm.mlir.constant(3 : i32) : i32
|
||||
// CHECK: %[[VAL_10:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 2] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_10:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 2] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_11:.*]] = llvm.load %[[VAL_10]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_12:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 3] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_12:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_2]], 3] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_13:.*]] = llvm.load %[[VAL_12]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_14:.*]] = llvm.zext %[[VAL_0]] : i2 to i3
|
||||
// CHECK: %[[VAL_15:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_16:.*]] = llvm.bitcast %[[VAL_5]] : !llvm.ptr<i8> to !llvm.ptr<array<4 x i4>>
|
||||
// CHECK: %[[VAL_16:.*]] = llvm.bitcast %[[VAL_5]] : !llvm.ptr to !llvm.ptr<array<4 x i4>>
|
||||
// CHECK: %[[VAL_17:.*]] = llvm.getelementptr %[[VAL_16]]{{\[}}%[[VAL_15]], %[[VAL_14]]] : (!llvm.ptr<array<4 x i4>>, i32, i3) -> !llvm.ptr<i4>
|
||||
// CHECK: %[[VAL_18:.*]] = llvm.bitcast %[[VAL_17]] : !llvm.ptr<i4> to !llvm.ptr<i8>
|
||||
// CHECK: %[[VAL_19:.*]] = llvm.mlir.undef : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.insertvalue %[[VAL_18]], %[[VAL_19]][0] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_21:.*]] = llvm.insertvalue %[[VAL_7]], %[[VAL_20]][1] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.insertvalue %[[VAL_11]], %[[VAL_21]][2] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_23:.*]] = llvm.insertvalue %[[VAL_13]], %[[VAL_22]][3] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_18:.*]] = llvm.bitcast %[[VAL_17]] : !llvm.ptr<i4> to !llvm.ptr
|
||||
// CHECK: %[[VAL_19:.*]] = llvm.mlir.undef : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.insertvalue %[[VAL_18]], %[[VAL_19]][0] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_21:.*]] = llvm.insertvalue %[[VAL_7]], %[[VAL_20]][1] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.insertvalue %[[VAL_11]], %[[VAL_21]][2] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_23:.*]] = llvm.insertvalue %[[VAL_13]], %[[VAL_22]][3] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_24:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_25:.*]] = llvm.alloca %[[VAL_24]] x !llvm.struct<(ptr<i8>, i64, i64, i64)> {alignment = 4 : i64} : (i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: llvm.store %[[VAL_23]], %[[VAL_25]] : !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_25:.*]] = llvm.alloca %[[VAL_24]] x !llvm.struct<(ptr, i64, i64, i64)> {alignment = 4 : i64} : (i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.store %[[VAL_23]], %[[VAL_25]] : !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.return
|
||||
// CHECK: }
|
||||
func.func @convertSigArraySlice (%c : i2, %sArr : !llhd.sig<!hw.array<4xi4>>) {
|
||||
|
@ -77,32 +77,32 @@ func.func @convertSigArraySlice (%c : i2, %sArr : !llhd.sig<!hw.array<4xi4>>) {
|
|||
}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convertSigStructExtract(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_1:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_2:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_1]], 0] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.load %[[VAL_3]] : !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_1]], 1] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_1]], 0] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.load %[[VAL_3]] : !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_1]], 1] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.load %[[VAL_5]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_7:.*]] = llvm.mlir.constant(2 : i32) : i32
|
||||
// CHECK: %[[VAL_8:.*]] = llvm.mlir.constant(3 : i32) : i32
|
||||
// CHECK: %[[VAL_9:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_1]], 2] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_9:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_1]], 2] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_10:.*]] = llvm.load %[[VAL_9]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_11:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_1]], 3] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_11:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_1]], 3] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_12:.*]] = llvm.load %[[VAL_11]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_13:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_14:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_15:.*]] = llvm.bitcast %[[VAL_4]] : !llvm.ptr<i8> to !llvm.ptr<struct<(i3, i2, i1)>>
|
||||
// CHECK: %[[VAL_15:.*]] = llvm.bitcast %[[VAL_4]] : !llvm.ptr to !llvm.ptr<struct<(i3, i2, i1)>>
|
||||
// CHECK: %[[VAL_16:.*]] = llvm.getelementptr %[[VAL_15]]{{\[}}%[[VAL_14]], 1] : (!llvm.ptr<struct<(i3, i2, i1)>>, i32) -> !llvm.ptr<i2>
|
||||
// CHECK: %[[VAL_17:.*]] = llvm.bitcast %[[VAL_16]] : !llvm.ptr<i2> to !llvm.ptr<i8>
|
||||
// CHECK: %[[VAL_18:.*]] = llvm.mlir.undef : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_19:.*]] = llvm.insertvalue %[[VAL_17]], %[[VAL_18]][0] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.insertvalue %[[VAL_6]], %[[VAL_19]][1] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_21:.*]] = llvm.insertvalue %[[VAL_10]], %[[VAL_20]][2] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.insertvalue %[[VAL_12]], %[[VAL_21]][3] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_17:.*]] = llvm.bitcast %[[VAL_16]] : !llvm.ptr<i2> to !llvm.ptr
|
||||
// CHECK: %[[VAL_18:.*]] = llvm.mlir.undef : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_19:.*]] = llvm.insertvalue %[[VAL_17]], %[[VAL_18]][0] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.insertvalue %[[VAL_6]], %[[VAL_19]][1] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_21:.*]] = llvm.insertvalue %[[VAL_10]], %[[VAL_20]][2] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.insertvalue %[[VAL_12]], %[[VAL_21]][3] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_23:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_24:.*]] = llvm.alloca %[[VAL_23]] x !llvm.struct<(ptr<i8>, i64, i64, i64)> {alignment = 4 : i64} : (i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: llvm.store %[[VAL_22]], %[[VAL_24]] : !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_24:.*]] = llvm.alloca %[[VAL_23]] x !llvm.struct<(ptr, i64, i64, i64)> {alignment = 4 : i64} : (i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.store %[[VAL_22]], %[[VAL_24]] : !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.return
|
||||
// CHECK: }
|
||||
func.func @convertSigStructExtract (%sTup : !llhd.sig<!hw.struct<foo: i1, bar: i2, baz: i3>>) {
|
||||
|
@ -112,33 +112,33 @@ func.func @convertSigStructExtract (%sTup : !llhd.sig<!hw.struct<foo: i1, bar: i
|
|||
}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convertSigArrayGet(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: i2) {
|
||||
// CHECK: %[[VAL_2:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_2]], 0] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.load %[[VAL_4]] : !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_2]], 1] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_2]], 0] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.load %[[VAL_4]] : !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_2]], 1] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_7:.*]] = llvm.load %[[VAL_6]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_8:.*]] = llvm.mlir.constant(2 : i32) : i32
|
||||
// CHECK: %[[VAL_9:.*]] = llvm.mlir.constant(3 : i32) : i32
|
||||
// CHECK: %[[VAL_10:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_2]], 2] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_10:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_2]], 2] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_11:.*]] = llvm.load %[[VAL_10]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_12:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_2]], 3] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_12:.*]] = llvm.getelementptr %[[VAL_0]]{{\[}}%[[VAL_2]], 3] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_13:.*]] = llvm.load %[[VAL_12]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_14:.*]] = llvm.zext %[[VAL_1]] : i2 to i3
|
||||
// CHECK: %[[VAL_15:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_16:.*]] = llvm.bitcast %[[VAL_5]] : !llvm.ptr<i8> to !llvm.ptr<array<4 x i4>>
|
||||
// CHECK: %[[VAL_16:.*]] = llvm.bitcast %[[VAL_5]] : !llvm.ptr to !llvm.ptr<array<4 x i4>>
|
||||
// CHECK: %[[VAL_17:.*]] = llvm.getelementptr %[[VAL_16]]{{\[}}%[[VAL_15]], %[[VAL_14]]] : (!llvm.ptr<array<4 x i4>>, i32, i3) -> !llvm.ptr<i4>
|
||||
// CHECK: %[[VAL_18:.*]] = llvm.bitcast %[[VAL_17]] : !llvm.ptr<i4> to !llvm.ptr<i8>
|
||||
// CHECK: %[[VAL_19:.*]] = llvm.mlir.undef : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.insertvalue %[[VAL_18]], %[[VAL_19]][0] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_21:.*]] = llvm.insertvalue %[[VAL_7]], %[[VAL_20]][1] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.insertvalue %[[VAL_11]], %[[VAL_21]][2] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_23:.*]] = llvm.insertvalue %[[VAL_13]], %[[VAL_22]][3] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_18:.*]] = llvm.bitcast %[[VAL_17]] : !llvm.ptr<i4> to !llvm.ptr
|
||||
// CHECK: %[[VAL_19:.*]] = llvm.mlir.undef : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.insertvalue %[[VAL_18]], %[[VAL_19]][0] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_21:.*]] = llvm.insertvalue %[[VAL_7]], %[[VAL_20]][1] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.insertvalue %[[VAL_11]], %[[VAL_21]][2] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_23:.*]] = llvm.insertvalue %[[VAL_13]], %[[VAL_22]][3] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_24:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_25:.*]] = llvm.alloca %[[VAL_24]] x !llvm.struct<(ptr<i8>, i64, i64, i64)> {alignment = 4 : i64} : (i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: llvm.store %[[VAL_23]], %[[VAL_25]] : !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_25:.*]] = llvm.alloca %[[VAL_24]] x !llvm.struct<(ptr, i64, i64, i64)> {alignment = 4 : i64} : (i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.store %[[VAL_23]], %[[VAL_25]] : !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.return
|
||||
// CHECK: }
|
||||
func.func @convertSigArrayGet(%sArr : !llhd.sig<!hw.array<4xi4>>, %c : i2) {
|
||||
|
|
|
@ -27,9 +27,9 @@ func.func @dummy_subsig(%0 : !llhd.sig<i10>) {
|
|||
}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_persistent_i1(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<(i1)>)>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_3]], 1] : (!llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<(i1)>)>>, i32) -> !llvm.ptr<i32>
|
||||
|
@ -67,9 +67,9 @@ llhd.proc @convert_persistent_i1 () -> () {
|
|||
}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_persistent_i32(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<(i32)>)>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_3]], 1] : (!llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<(i32)>)>>, i32) -> !llvm.ptr<i32>
|
||||
|
@ -108,9 +108,9 @@ llhd.proc @convert_persistent_i32 () -> () {
|
|||
}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_persistent_time(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<(array<3 x i64>)>)>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_3]], 1] : (!llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<(array<3 x i64>)>)>>, i32) -> !llvm.ptr<i32>
|
||||
|
@ -148,9 +148,9 @@ llhd.proc @convert_persistent_time () -> () {
|
|||
}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_persistent_ptr(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<(i32)>)>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_3]], 1] : (!llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<(i32)>)>>, i32) -> !llvm.ptr<i32>
|
||||
|
@ -192,14 +192,14 @@ llhd.proc @convert_persistent_ptr () -> () {
|
|||
}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_persistent_subsig(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(i32, i32, ptr<array<1 x i1>>, struct<(struct<(ptr<i8>, i64, i64, i64)>)>)>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(i32, i32, ptr<array<1 x i1>>, struct<(struct<(ptr, i64, i64, i64)>)>)>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_7:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_5]], 1] : (!llvm.ptr<struct<(i32, i32, ptr<array<1 x i1>>, struct<(struct<(ptr<i8>, i64, i64, i64)>)>)>>, i32) -> !llvm.ptr<i32>
|
||||
// CHECK: %[[VAL_7:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_5]], 1] : (!llvm.ptr<struct<(i32, i32, ptr<array<1 x i1>>, struct<(struct<(ptr, i64, i64, i64)>)>)>>, i32) -> !llvm.ptr<i32>
|
||||
// CHECK: %[[VAL_8:.*]] = llvm.load %[[VAL_7]] : !llvm.ptr<i32>
|
||||
// CHECK: llvm.br ^bb1
|
||||
// CHECK: ^bb1:
|
||||
|
@ -210,45 +210,45 @@ llhd.proc @convert_persistent_ptr () -> () {
|
|||
// CHECK: %[[VAL_11:.*]] = llvm.mlir.constant(0 : i5) : i5
|
||||
// CHECK: %[[VAL_12:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_13:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_14:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_12]], 0] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_15:.*]] = llvm.load %[[VAL_14]] : !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_16:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_12]], 1] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_14:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_12]], 0] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_15:.*]] = llvm.load %[[VAL_14]] : !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_16:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_12]], 1] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_17:.*]] = llvm.load %[[VAL_16]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_18:.*]] = llvm.mlir.constant(2 : i32) : i32
|
||||
// CHECK: %[[VAL_19:.*]] = llvm.mlir.constant(3 : i32) : i32
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_12]], 2] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_12]], 2] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_21:.*]] = llvm.load %[[VAL_20]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_12]], 3] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_12]], 3] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_23:.*]] = llvm.load %[[VAL_22]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_24:.*]] = llvm.zext %[[VAL_11]] : i5 to i64
|
||||
// CHECK: %[[VAL_25:.*]] = llvm.add %[[VAL_17]], %[[VAL_24]] : i64
|
||||
// CHECK: %[[VAL_26:.*]] = llvm.ptrtoint %[[VAL_15]] : !llvm.ptr<i8> to i64
|
||||
// CHECK: %[[VAL_26:.*]] = llvm.ptrtoint %[[VAL_15]] : !llvm.ptr to i64
|
||||
// CHECK: %[[VAL_27:.*]] = llvm.mlir.constant(8 : i64) : i64
|
||||
// CHECK: %[[VAL_28:.*]] = llvm.udiv %[[VAL_25]], %[[VAL_27]] : i64
|
||||
// CHECK: %[[VAL_29:.*]] = llvm.add %[[VAL_26]], %[[VAL_28]] : i64
|
||||
// CHECK: %[[VAL_30:.*]] = llvm.inttoptr %[[VAL_29]] : i64 to !llvm.ptr<i8>
|
||||
// CHECK: %[[VAL_30:.*]] = llvm.inttoptr %[[VAL_29]] : i64 to !llvm.ptr
|
||||
// CHECK: %[[VAL_31:.*]] = llvm.urem %[[VAL_25]], %[[VAL_27]] : i64
|
||||
// CHECK: %[[VAL_32:.*]] = llvm.mlir.undef : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_33:.*]] = llvm.insertvalue %[[VAL_30]], %[[VAL_32]][0] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_34:.*]] = llvm.insertvalue %[[VAL_31]], %[[VAL_33]][1] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_35:.*]] = llvm.insertvalue %[[VAL_21]], %[[VAL_34]][2] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_36:.*]] = llvm.insertvalue %[[VAL_23]], %[[VAL_35]][3] : !llvm.struct<(ptr<i8>, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_32:.*]] = llvm.mlir.undef : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_33:.*]] = llvm.insertvalue %[[VAL_30]], %[[VAL_32]][0] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_34:.*]] = llvm.insertvalue %[[VAL_31]], %[[VAL_33]][1] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_35:.*]] = llvm.insertvalue %[[VAL_21]], %[[VAL_34]][2] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_36:.*]] = llvm.insertvalue %[[VAL_23]], %[[VAL_35]][3] : !llvm.struct<(ptr, i64, i64, i64)>
|
||||
// CHECK: %[[VAL_37:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_38:.*]] = llvm.alloca %[[VAL_37]] x !llvm.struct<(ptr<i8>, i64, i64, i64)> {alignment = 4 : i64} : (i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: llvm.store %[[VAL_36]], %[[VAL_38]] : !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_38:.*]] = llvm.alloca %[[VAL_37]] x !llvm.struct<(ptr, i64, i64, i64)> {alignment = 4 : i64} : (i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.store %[[VAL_36]], %[[VAL_38]] : !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_39:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_40:.*]] = llvm.mlir.constant(3 : i32) : i32
|
||||
// CHECK: %[[VAL_41:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_42:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_39]], 3, 0] : (!llvm.ptr<struct<(i32, i32, ptr<array<1 x i1>>, struct<(struct<(ptr<i8>, i64, i64, i64)>)>)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_43:.*]] = llvm.load %[[VAL_38]] : !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: llvm.store %[[VAL_43]], %[[VAL_42]] : !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_42:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_39]], 3, 0] : (!llvm.ptr<struct<(i32, i32, ptr<array<1 x i1>>, struct<(struct<(ptr, i64, i64, i64)>)>)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_43:.*]] = llvm.load %[[VAL_38]] : !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.store %[[VAL_43]], %[[VAL_42]] : !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.br ^bb3
|
||||
// CHECK: ^bb3:
|
||||
// CHECK: %[[VAL_44:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_45:.*]] = llvm.mlir.constant(3 : i32) : i32
|
||||
// CHECK: %[[VAL_46:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_47:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_44]], 3, 0] : (!llvm.ptr<struct<(i32, i32, ptr<array<1 x i1>>, struct<(struct<(ptr<i8>, i64, i64, i64)>)>)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: llvm.call @dummy_subsig(%[[VAL_47]]) : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) -> ()
|
||||
// CHECK: %[[VAL_47:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_44]], 3, 0] : (!llvm.ptr<struct<(i32, i32, ptr<array<1 x i1>>, struct<(struct<(ptr, i64, i64, i64)>)>)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.call @dummy_subsig(%[[VAL_47]]) : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>) -> ()
|
||||
// CHECK: llvm.br ^bb3
|
||||
// CHECK: ^bb4:
|
||||
// CHECK: llvm.return
|
||||
|
@ -263,9 +263,9 @@ llhd.proc @convert_persistent_subsig () -> (%out : !llhd.sig<i32>) {
|
|||
}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_persistent_block_argument(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<(i32)>)>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_3]], 1] : (!llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<(i32)>)>>, i32) -> !llvm.ptr<i32>
|
||||
|
@ -311,9 +311,9 @@ llhd.proc @convert_persistent_block_argument () -> () {
|
|||
}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_ptr_redirect(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<(i32, i32)>)>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_3]], 1] : (!llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<(i32, i32)>)>>, i32) -> !llvm.ptr<i32>
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
// NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
||||
// RUN: circt-opt %s --convert-llhd-to-llvm | FileCheck %s
|
||||
|
||||
// CHECK-LABEL: llvm.func @driveSignal(!llvm.ptr<i8>, !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, !llvm.ptr<i8>, i64, i64, i64, i64)
|
||||
// CHECK-LABEL: llvm.func @driveSignal(!llvm.ptr, !llvm.ptr<struct<(ptr, i64, i64, i64)>>, !llvm.ptr, i64, i64, i64, i64)
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_sig(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<()>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_9:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_10:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_9]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_10:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_9]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_11:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_12:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_11]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_12:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_11]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: llvm.return
|
||||
// CHECK: }
|
||||
llhd.entity @convert_sig () -> () {
|
||||
|
@ -21,31 +21,31 @@ llhd.entity @convert_sig () -> () {
|
|||
}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_prb(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<()>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_5]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_5]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_7:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_8:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_9:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_7]], 0] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_10:.*]] = llvm.load %[[VAL_9]] : !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_11:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_7]], 1] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_9:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_7]], 0] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_10:.*]] = llvm.load %[[VAL_9]] : !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_11:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_7]], 1] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_12:.*]] = llvm.load %[[VAL_11]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_13:.*]] = llvm.bitcast %[[VAL_10]] : !llvm.ptr<i8> to !llvm.ptr<i16>
|
||||
// CHECK: %[[VAL_13:.*]] = llvm.bitcast %[[VAL_10]] : !llvm.ptr to !llvm.ptr<i16>
|
||||
// CHECK: %[[VAL_14:.*]] = llvm.load %[[VAL_13]] : !llvm.ptr<i16>
|
||||
// CHECK: %[[VAL_15:.*]] = llvm.trunc %[[VAL_12]] : i64 to i16
|
||||
// CHECK: %[[VAL_16:.*]] = llvm.lshr %[[VAL_14]], %[[VAL_15]] : i16
|
||||
// CHECK: %[[VAL_17:.*]] = llvm.trunc %[[VAL_16]] : i16 to i1
|
||||
// CHECK: %[[VAL_18:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_19:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.getelementptr %[[VAL_6]]{{\[}}%[[VAL_18]], 0] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_21:.*]] = llvm.load %[[VAL_20]] : !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.getelementptr %[[VAL_6]]{{\[}}%[[VAL_18]], 1] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.getelementptr %[[VAL_6]]{{\[}}%[[VAL_18]], 0] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_21:.*]] = llvm.load %[[VAL_20]] : !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.getelementptr %[[VAL_6]]{{\[}}%[[VAL_18]], 1] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_23:.*]] = llvm.load %[[VAL_22]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_24:.*]] = llvm.bitcast %[[VAL_21]] : !llvm.ptr<i8> to !llvm.ptr<array<3 x i5>>
|
||||
// CHECK: %[[VAL_24:.*]] = llvm.bitcast %[[VAL_21]] : !llvm.ptr to !llvm.ptr<array<3 x i5>>
|
||||
// CHECK: %[[VAL_25:.*]] = llvm.load %[[VAL_24]] : !llvm.ptr<array<3 x i5>>
|
||||
// CHECK: llvm.return
|
||||
// CHECK: }
|
||||
|
@ -55,13 +55,13 @@ llhd.entity @convert_prb (%sI1 : !llhd.sig<i1>, %sArr : !llhd.sig<!hw.array<3xi5
|
|||
}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_drv(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<()>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_5]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_5]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_7:.*]] = llvm.mlir.constant(false) : i1
|
||||
// CHECK: %[[VAL_8:.*]] = llvm.mlir.constant(0 : i5) : i5
|
||||
// CHECK: %[[VAL_9:.*]] = llvm.mlir.addressof @{{.+}} : !llvm.ptr<array<3 x i5>>
|
||||
|
@ -71,11 +71,11 @@ llhd.entity @convert_prb (%sI1 : !llhd.sig<i1>, %sArr : !llhd.sig<!hw.array<3xi5
|
|||
// CHECK: %[[VAL_15:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_16:.*]] = llvm.alloca %[[VAL_15]] x i1 {alignment = 4 : i64} : (i32) -> !llvm.ptr<i1>
|
||||
// CHECK: llvm.store %[[VAL_7]], %[[VAL_16]] : !llvm.ptr<i1>
|
||||
// CHECK: %[[VAL_17:.*]] = llvm.bitcast %[[VAL_16]] : !llvm.ptr<i1> to !llvm.ptr<i8>
|
||||
// CHECK: %[[VAL_17:.*]] = llvm.bitcast %[[VAL_16]] : !llvm.ptr<i1> to !llvm.ptr
|
||||
// CHECK: %[[VAL_18:.*]] = llvm.extractvalue %[[VAL_13]][0] : !llvm.array<3 x i64>
|
||||
// CHECK: %[[VAL_19:.*]] = llvm.extractvalue %[[VAL_13]][1] : !llvm.array<3 x i64>
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.extractvalue %[[VAL_13]][2] : !llvm.array<3 x i64>
|
||||
// CHECK: llvm.call @driveSignal(%[[VAL_0]], %[[VAL_4]], %[[VAL_17]], %[[VAL_14]], %[[VAL_18]], %[[VAL_19]], %[[VAL_20]]) : (!llvm.ptr<i8>, !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, !llvm.ptr<i8>, i64, i64, i64, i64) -> ()
|
||||
// CHECK: llvm.call @driveSignal(%[[VAL_0]], %[[VAL_4]], %[[VAL_17]], %[[VAL_14]], %[[VAL_18]], %[[VAL_19]], %[[VAL_20]]) : (!llvm.ptr, !llvm.ptr<struct<(ptr, i64, i64, i64)>>, !llvm.ptr, i64, i64, i64, i64) -> ()
|
||||
// CHECK: %[[VAL_21:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.mlir.constant(8 : i64) : i64
|
||||
// CHECK: %[[VAL_23:.*]] = llvm.mlir.null : !llvm.ptr<array<3 x i5>>
|
||||
|
@ -85,11 +85,11 @@ llhd.entity @convert_prb (%sI1 : !llhd.sig<i1>, %sArr : !llhd.sig<!hw.array<3xi5
|
|||
// CHECK: %[[VAL_27:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_28:.*]] = llvm.alloca %[[VAL_27]] x !llvm.array<3 x i5> {alignment = 4 : i64} : (i32) -> !llvm.ptr<array<3 x i5>>
|
||||
// CHECK: llvm.store %[[VAL_10]], %[[VAL_28]] : !llvm.ptr<array<3 x i5>>
|
||||
// CHECK: %[[VAL_29:.*]] = llvm.bitcast %[[VAL_28]] : !llvm.ptr<array<3 x i5>> to !llvm.ptr<i8>
|
||||
// CHECK: %[[VAL_29:.*]] = llvm.bitcast %[[VAL_28]] : !llvm.ptr<array<3 x i5>> to !llvm.ptr
|
||||
// CHECK: %[[VAL_30:.*]] = llvm.extractvalue %[[VAL_13]][0] : !llvm.array<3 x i64>
|
||||
// CHECK: %[[VAL_31:.*]] = llvm.extractvalue %[[VAL_13]][1] : !llvm.array<3 x i64>
|
||||
// CHECK: %[[VAL_32:.*]] = llvm.extractvalue %[[VAL_13]][2] : !llvm.array<3 x i64>
|
||||
// CHECK: llvm.call @driveSignal(%[[VAL_0]], %[[VAL_6]], %[[VAL_29]], %[[VAL_26]], %[[VAL_30]], %[[VAL_31]], %[[VAL_32]]) : (!llvm.ptr<i8>, !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, !llvm.ptr<i8>, i64, i64, i64, i64) -> ()
|
||||
// CHECK: llvm.call @driveSignal(%[[VAL_0]], %[[VAL_6]], %[[VAL_29]], %[[VAL_26]], %[[VAL_30]], %[[VAL_31]], %[[VAL_32]]) : (!llvm.ptr, !llvm.ptr<struct<(ptr, i64, i64, i64)>>, !llvm.ptr, i64, i64, i64, i64) -> ()
|
||||
// CHECK: llvm.return
|
||||
// CHECK: }
|
||||
llhd.entity @convert_drv (%sI1 : !llhd.sig<i1>, %sArr : !llhd.sig<!hw.array<3xi5>>) -> () {
|
||||
|
@ -120,13 +120,13 @@ llhd.entity @convert_drv_enable (%sI1 : !llhd.sig<i1>) -> () {
|
|||
}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_reg(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(array<3 x i1>)>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(dense<[1000, 0, 0]> : tensor<3xi64>) : !llvm.array<3 x i64>
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.mlir.constant(false) : i1
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_5]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_5]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_7:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_8:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_9:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
|
@ -183,11 +183,11 @@ llhd.entity @convert_drv_enable (%sI1 : !llhd.sig<i1>) -> () {
|
|||
// CHECK: %[[VAL_46:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_47:.*]] = llvm.alloca %[[VAL_46]] x i1 {alignment = 4 : i64} : (i32) -> !llvm.ptr<i1>
|
||||
// CHECK: llvm.store %[[VAL_40]], %[[VAL_47]] : !llvm.ptr<i1>
|
||||
// CHECK: %[[VAL_48:.*]] = llvm.bitcast %[[VAL_47]] : !llvm.ptr<i1> to !llvm.ptr<i8>
|
||||
// CHECK: %[[VAL_48:.*]] = llvm.bitcast %[[VAL_47]] : !llvm.ptr<i1> to !llvm.ptr
|
||||
// CHECK: %[[VAL_49:.*]] = llvm.extractvalue %[[VAL_41]][0] : !llvm.array<3 x i64>
|
||||
// CHECK: %[[VAL_50:.*]] = llvm.extractvalue %[[VAL_41]][1] : !llvm.array<3 x i64>
|
||||
// CHECK: %[[VAL_51:.*]] = llvm.extractvalue %[[VAL_41]][2] : !llvm.array<3 x i64>
|
||||
// CHECK: llvm.call @driveSignal(%[[VAL_0]], %[[VAL_6]], %[[VAL_48]], %[[VAL_43]], %[[VAL_49]], %[[VAL_50]], %[[VAL_51]]) : (!llvm.ptr<i8>, !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, !llvm.ptr<i8>, i64, i64, i64, i64) -> ()
|
||||
// CHECK: llvm.call @driveSignal(%[[VAL_0]], %[[VAL_6]], %[[VAL_48]], %[[VAL_43]], %[[VAL_49]], %[[VAL_50]], %[[VAL_51]]) : (!llvm.ptr, !llvm.ptr<struct<(ptr, i64, i64, i64)>>, !llvm.ptr, i64, i64, i64, i64) -> ()
|
||||
// CHECK: llvm.br ^bb8
|
||||
// CHECK: ^bb8:
|
||||
// CHECK: llvm.br ^bb9
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
// NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
||||
// RUN: circt-opt %s --convert-llhd-to-llvm | FileCheck %s
|
||||
|
||||
// CHECK-LABEL: llvm.func @driveSignal(!llvm.ptr<i8>, !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, !llvm.ptr<i8>, i64, i64, i64, i64)
|
||||
// CHECK-LABEL: llvm.func @driveSignal(!llvm.ptr, !llvm.ptr<struct<(ptr, i64, i64, i64)>>, !llvm.ptr, i64, i64, i64, i64)
|
||||
|
||||
// CHECK-LABEL: llvm.func @Foo(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<()>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(false) : i1
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_4]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_4]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_7:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_8:.*]] = llvm.getelementptr %[[VAL_5]]{{\[}}%[[VAL_6]], 0] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_9:.*]] = llvm.load %[[VAL_8]] : !llvm.ptr<ptr<i8>>
|
||||
// CHECK: %[[VAL_10:.*]] = llvm.getelementptr %[[VAL_5]]{{\[}}%[[VAL_6]], 1] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_8:.*]] = llvm.getelementptr %[[VAL_5]]{{\[}}%[[VAL_6]], 0] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_9:.*]] = llvm.load %[[VAL_8]] : !llvm.ptr<ptr>
|
||||
// CHECK: %[[VAL_10:.*]] = llvm.getelementptr %[[VAL_5]]{{\[}}%[[VAL_6]], 1] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_11:.*]] = llvm.load %[[VAL_10]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_12:.*]] = llvm.bitcast %[[VAL_9]] : !llvm.ptr<i8> to !llvm.ptr<i16>
|
||||
// CHECK: %[[VAL_12:.*]] = llvm.bitcast %[[VAL_9]] : !llvm.ptr to !llvm.ptr<i16>
|
||||
// CHECK: %[[VAL_13:.*]] = llvm.load %[[VAL_12]] : !llvm.ptr<i16>
|
||||
// CHECK: %[[VAL_14:.*]] = llvm.trunc %[[VAL_11]] : i64 to i16
|
||||
// CHECK: %[[VAL_15:.*]] = llvm.lshr %[[VAL_13]], %[[VAL_14]] : i16
|
||||
|
@ -28,11 +28,11 @@
|
|||
// CHECK: %[[VAL_21:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.alloca %[[VAL_21]] x i1 {alignment = 4 : i64} : (i32) -> !llvm.ptr<i1>
|
||||
// CHECK: llvm.store %[[VAL_18]], %[[VAL_22]] : !llvm.ptr<i1>
|
||||
// CHECK: %[[VAL_23:.*]] = llvm.bitcast %[[VAL_22]] : !llvm.ptr<i1> to !llvm.ptr<i8>
|
||||
// CHECK: %[[VAL_23:.*]] = llvm.bitcast %[[VAL_22]] : !llvm.ptr<i1> to !llvm.ptr
|
||||
// CHECK: %[[VAL_24:.*]] = llvm.extractvalue %[[VAL_19]][0] : !llvm.array<3 x i64>
|
||||
// CHECK: %[[VAL_25:.*]] = llvm.extractvalue %[[VAL_19]][1] : !llvm.array<3 x i64>
|
||||
// CHECK: %[[VAL_26:.*]] = llvm.extractvalue %[[VAL_19]][2] : !llvm.array<3 x i64>
|
||||
// CHECK: llvm.call @driveSignal(%[[VAL_0]], %[[VAL_5]], %[[VAL_23]], %[[VAL_20]], %[[VAL_24]], %[[VAL_25]], %[[VAL_26]]) : (!llvm.ptr<i8>, !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, !llvm.ptr<i8>, i64, i64, i64, i64) -> ()
|
||||
// CHECK: llvm.call @driveSignal(%[[VAL_0]], %[[VAL_5]], %[[VAL_23]], %[[VAL_20]], %[[VAL_24]], %[[VAL_25]], %[[VAL_26]]) : (!llvm.ptr, !llvm.ptr<struct<(ptr, i64, i64, i64)>>, !llvm.ptr, i64, i64, i64, i64) -> ()
|
||||
// CHECK: llvm.return
|
||||
// CHECK: }
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
// NOTE: Assertions have been autogenerated by utils/generate-test-checks.py
|
||||
// RUN: circt-opt %s --convert-llhd-to-llvm | FileCheck %s
|
||||
|
||||
// CHECK-LABEL: llvm.func @llhdSuspend(!llvm.ptr<i8>, !llvm.ptr<i8>, i64, i64, i64)
|
||||
// CHECK-LABEL: llvm.func @llhdSuspend(!llvm.ptr, !llvm.ptr, i64, i64, i64)
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_resume_timed(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<()>)>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_3]], 1] : (!llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<()>)>>, i32) -> !llvm.ptr<i32>
|
||||
|
@ -29,11 +29,11 @@
|
|||
// CHECK: %[[VAL_15:.*]] = llvm.mlir.constant(2 : i32) : i32
|
||||
// CHECK: %[[VAL_16:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_14]], 2] : (!llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<()>)>>, i32) -> !llvm.ptr<ptr<array<0 x i1>>>
|
||||
// CHECK: %[[VAL_17:.*]] = llvm.load %[[VAL_16]] : !llvm.ptr<ptr<array<0 x i1>>>
|
||||
// CHECK: %[[VAL_18:.*]] = llvm.bitcast %[[VAL_1]] : !llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<()>)>> to !llvm.ptr<i8>
|
||||
// CHECK: %[[VAL_18:.*]] = llvm.bitcast %[[VAL_1]] : !llvm.ptr<struct<(i32, i32, ptr<array<0 x i1>>, struct<()>)>> to !llvm.ptr
|
||||
// CHECK: %[[VAL_19:.*]] = llvm.extractvalue %[[VAL_11]][0] : !llvm.array<3 x i64>
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.extractvalue %[[VAL_11]][1] : !llvm.array<3 x i64>
|
||||
// CHECK: %[[VAL_21:.*]] = llvm.extractvalue %[[VAL_11]][2] : !llvm.array<3 x i64>
|
||||
// CHECK: llvm.call @llhdSuspend(%[[VAL_0]], %[[VAL_18]], %[[VAL_19]], %[[VAL_20]], %[[VAL_21]]) : (!llvm.ptr<i8>, !llvm.ptr<i8>, i64, i64, i64) -> ()
|
||||
// CHECK: llvm.call @llhdSuspend(%[[VAL_0]], %[[VAL_18]], %[[VAL_19]], %[[VAL_20]], %[[VAL_21]]) : (!llvm.ptr, !llvm.ptr, i64, i64, i64) -> ()
|
||||
// CHECK: llvm.return
|
||||
// CHECK: ^bb4:
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
|
@ -52,15 +52,15 @@ llhd.proc @convert_resume_timed () -> () {
|
|||
}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_resume_observe_partial(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(i32, i32, ptr<array<3 x i1>>, struct<()>)>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_5]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_5]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_7:.*]] = llvm.mlir.constant(2 : i32) : i32
|
||||
// CHECK: %[[VAL_8:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_7]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_8:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_7]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_9:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_10:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_11:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_9]], 1] : (!llvm.ptr<struct<(i32, i32, ptr<array<3 x i1>>, struct<()>)>>, i32) -> !llvm.ptr<i32>
|
||||
|
@ -92,17 +92,17 @@ llhd.proc @convert_resume_timed () -> () {
|
|||
// CHECK: %[[VAL_28:.*]] = llvm.mlir.constant(2 : i32) : i32
|
||||
// CHECK: %[[VAL_29:.*]] = llvm.getelementptr %[[VAL_22]]{{\[}}%[[VAL_19]], %[[VAL_28]]] : (!llvm.ptr<array<3 x i1>>, i32, i32) -> !llvm.ptr<i1>
|
||||
// CHECK: llvm.store %[[VAL_23]], %[[VAL_29]] : !llvm.ptr<i1>
|
||||
// CHECK: %[[VAL_30:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_19]], 2] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_30:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_19]], 2] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_31:.*]] = llvm.load %[[VAL_30]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_32:.*]] = llvm.mlir.constant(true) : i1
|
||||
// CHECK: %[[VAL_33:.*]] = llvm.getelementptr %[[VAL_22]]{{\[}}%[[VAL_19]], %[[VAL_31]]] : (!llvm.ptr<array<3 x i1>>, i32, i64) -> !llvm.ptr<i1>
|
||||
// CHECK: llvm.store %[[VAL_32]], %[[VAL_33]] : !llvm.ptr<i1>
|
||||
// CHECK: %[[VAL_34:.*]] = llvm.getelementptr %[[VAL_8]]{{\[}}%[[VAL_19]], 2] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_34:.*]] = llvm.getelementptr %[[VAL_8]]{{\[}}%[[VAL_19]], 2] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_35:.*]] = llvm.load %[[VAL_34]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_36:.*]] = llvm.mlir.constant(true) : i1
|
||||
// CHECK: %[[VAL_37:.*]] = llvm.getelementptr %[[VAL_22]]{{\[}}%[[VAL_19]], %[[VAL_35]]] : (!llvm.ptr<array<3 x i1>>, i32, i64) -> !llvm.ptr<i1>
|
||||
// CHECK: llvm.store %[[VAL_36]], %[[VAL_37]] : !llvm.ptr<i1>
|
||||
// CHECK: %[[VAL_38:.*]] = llvm.bitcast %[[VAL_1]] : !llvm.ptr<struct<(i32, i32, ptr<array<3 x i1>>, struct<()>)>> to !llvm.ptr<i8>
|
||||
// CHECK: %[[VAL_38:.*]] = llvm.bitcast %[[VAL_1]] : !llvm.ptr<struct<(i32, i32, ptr<array<3 x i1>>, struct<()>)>> to !llvm.ptr
|
||||
// CHECK: llvm.return
|
||||
// CHECK: ^bb4:
|
||||
// CHECK: %[[VAL_39:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
|
@ -132,11 +132,11 @@ llhd.proc @convert_resume_observe_partial (%in0 : !llhd.sig<i1>, %in1 : !llhd.si
|
|||
}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_resume_timed_observe(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(i32, i32, ptr<array<1 x i1>>, struct<()>)>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_7:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_5]], 1] : (!llvm.ptr<struct<(i32, i32, ptr<array<1 x i1>>, struct<()>)>>, i32) -> !llvm.ptr<i32>
|
||||
|
@ -159,16 +159,16 @@ llhd.proc @convert_resume_observe_partial (%in0 : !llhd.sig<i1>, %in1 : !llhd.si
|
|||
// CHECK: %[[VAL_17:.*]] = llvm.mlir.constant(2 : i32) : i32
|
||||
// CHECK: %[[VAL_18:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_16]], 2] : (!llvm.ptr<struct<(i32, i32, ptr<array<1 x i1>>, struct<()>)>>, i32) -> !llvm.ptr<ptr<array<1 x i1>>>
|
||||
// CHECK: %[[VAL_19:.*]] = llvm.load %[[VAL_18]] : !llvm.ptr<ptr<array<1 x i1>>>
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_16]], 2] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_16]], 2] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_21:.*]] = llvm.load %[[VAL_20]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.mlir.constant(true) : i1
|
||||
// CHECK: %[[VAL_23:.*]] = llvm.getelementptr %[[VAL_19]]{{\[}}%[[VAL_16]], %[[VAL_21]]] : (!llvm.ptr<array<1 x i1>>, i32, i64) -> !llvm.ptr<i1>
|
||||
// CHECK: llvm.store %[[VAL_22]], %[[VAL_23]] : !llvm.ptr<i1>
|
||||
// CHECK: %[[VAL_24:.*]] = llvm.bitcast %[[VAL_1]] : !llvm.ptr<struct<(i32, i32, ptr<array<1 x i1>>, struct<()>)>> to !llvm.ptr<i8>
|
||||
// CHECK: %[[VAL_24:.*]] = llvm.bitcast %[[VAL_1]] : !llvm.ptr<struct<(i32, i32, ptr<array<1 x i1>>, struct<()>)>> to !llvm.ptr
|
||||
// CHECK: %[[VAL_25:.*]] = llvm.extractvalue %[[VAL_13]][0] : !llvm.array<3 x i64>
|
||||
// CHECK: %[[VAL_26:.*]] = llvm.extractvalue %[[VAL_13]][1] : !llvm.array<3 x i64>
|
||||
// CHECK: %[[VAL_27:.*]] = llvm.extractvalue %[[VAL_13]][2] : !llvm.array<3 x i64>
|
||||
// CHECK: llvm.call @llhdSuspend(%[[VAL_0]], %[[VAL_24]], %[[VAL_25]], %[[VAL_26]], %[[VAL_27]]) : (!llvm.ptr<i8>, !llvm.ptr<i8>, i64, i64, i64) -> ()
|
||||
// CHECK: llvm.call @llhdSuspend(%[[VAL_0]], %[[VAL_24]], %[[VAL_25]], %[[VAL_26]], %[[VAL_27]]) : (!llvm.ptr, !llvm.ptr, i64, i64, i64) -> ()
|
||||
// CHECK: llvm.return
|
||||
// CHECK: ^bb4:
|
||||
// CHECK: %[[VAL_28:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
|
@ -191,13 +191,13 @@ llhd.proc @convert_resume_timed_observe (%in0 : !llhd.sig<i32>) -> () {
|
|||
}
|
||||
|
||||
// CHECK-LABEL: llvm.func @convert_resume_observe_all(
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr<i8>,
|
||||
// CHECK-SAME: %[[VAL_0:.*]]: !llvm.ptr,
|
||||
// CHECK-SAME: %[[VAL_1:.*]]: !llvm.ptr<struct<(i32, i32, ptr<array<2 x i1>>, struct<()>)>>,
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>) {
|
||||
// CHECK-SAME: %[[VAL_2:.*]]: !llvm.ptr<struct<(ptr, i64, i64, i64)>>) {
|
||||
// CHECK: %[[VAL_3:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_4:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_3]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_5:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_5]]] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_6:.*]] = llvm.getelementptr %[[VAL_2]]{{\[}}%[[VAL_5]]] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<struct<(ptr, i64, i64, i64)>>
|
||||
// CHECK: %[[VAL_7:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
// CHECK: %[[VAL_8:.*]] = llvm.mlir.constant(1 : i32) : i32
|
||||
// CHECK: %[[VAL_9:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_7]], 1] : (!llvm.ptr<struct<(i32, i32, ptr<array<2 x i1>>, struct<()>)>>, i32) -> !llvm.ptr<i32>
|
||||
|
@ -219,17 +219,17 @@ llhd.proc @convert_resume_timed_observe (%in0 : !llhd.sig<i32>) -> () {
|
|||
// CHECK: %[[VAL_18:.*]] = llvm.mlir.constant(2 : i32) : i32
|
||||
// CHECK: %[[VAL_19:.*]] = llvm.getelementptr %[[VAL_1]]{{\[}}%[[VAL_17]], 2] : (!llvm.ptr<struct<(i32, i32, ptr<array<2 x i1>>, struct<()>)>>, i32) -> !llvm.ptr<ptr<array<2 x i1>>>
|
||||
// CHECK: %[[VAL_20:.*]] = llvm.load %[[VAL_19]] : !llvm.ptr<ptr<array<2 x i1>>>
|
||||
// CHECK: %[[VAL_21:.*]] = llvm.getelementptr %[[VAL_6]]{{\[}}%[[VAL_17]], 2] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_21:.*]] = llvm.getelementptr %[[VAL_6]]{{\[}}%[[VAL_17]], 2] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_22:.*]] = llvm.load %[[VAL_21]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_23:.*]] = llvm.mlir.constant(true) : i1
|
||||
// CHECK: %[[VAL_24:.*]] = llvm.getelementptr %[[VAL_20]]{{\[}}%[[VAL_17]], %[[VAL_22]]] : (!llvm.ptr<array<2 x i1>>, i32, i64) -> !llvm.ptr<i1>
|
||||
// CHECK: llvm.store %[[VAL_23]], %[[VAL_24]] : !llvm.ptr<i1>
|
||||
// CHECK: %[[VAL_25:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_17]], 2] : (!llvm.ptr<struct<(ptr<i8>, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_25:.*]] = llvm.getelementptr %[[VAL_4]]{{\[}}%[[VAL_17]], 2] : (!llvm.ptr<struct<(ptr, i64, i64, i64)>>, i32) -> !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_26:.*]] = llvm.load %[[VAL_25]] : !llvm.ptr<i64>
|
||||
// CHECK: %[[VAL_27:.*]] = llvm.mlir.constant(true) : i1
|
||||
// CHECK: %[[VAL_28:.*]] = llvm.getelementptr %[[VAL_20]]{{\[}}%[[VAL_17]], %[[VAL_26]]] : (!llvm.ptr<array<2 x i1>>, i32, i64) -> !llvm.ptr<i1>
|
||||
// CHECK: llvm.store %[[VAL_27]], %[[VAL_28]] : !llvm.ptr<i1>
|
||||
// CHECK: %[[VAL_29:.*]] = llvm.bitcast %[[VAL_1]] : !llvm.ptr<struct<(i32, i32, ptr<array<2 x i1>>, struct<()>)>> to !llvm.ptr<i8>
|
||||
// CHECK: %[[VAL_29:.*]] = llvm.bitcast %[[VAL_1]] : !llvm.ptr<struct<(i32, i32, ptr<array<2 x i1>>, struct<()>)>> to !llvm.ptr
|
||||
// CHECK: llvm.return
|
||||
// CHECK: ^bb4:
|
||||
// CHECK: %[[VAL_30:.*]] = llvm.mlir.constant(0 : i32) : i32
|
||||
|
|
Loading…
Reference in New Issue