mathis-s / CoreDSL2LLVM

Compiler for generating LLVM ISel Patterns from high-level instruction behavior descriptions
Other
1 stars 1 forks source link

CV_MSU: Both operands to a binary operator are not of the same type! #6

Closed PhilippvK closed 5 months ago

PhilippvK commented 6 months ago

When processing the following CoreDSL behavior with the CDSL2LLVM parser an error is raised.

signed<64> result = ((signed)(X[rd]) - (signed)(X[rs1]) * (signed)(X[rs2]))[63:0];
X[rd] = result[31:0];

Error:

Both operands to a binary operator are not of the same type!
  %6 = lshr i64 %.v, i32 0
Both operands to a binary operator are not of the same type!
  %7 = and i64 %6, i32 -1
PhilippvK commented 6 months ago

The problem pop up during the VerifyModule step. Let me add a --skip-verify flag to deal with this kind of issues for now...

mathis-s commented 5 months ago

Can no longer reproduce, likely fixed along with #5!