AnyDSL / MimIR

MimIR is my Intermediate Representation
https://anydsl.github.io/MimIR/
MIT License
46 stars 9 forks source link

Float Infer Unification Issue #188

Closed NeuralCoder3 closed 1 year ago

NeuralCoder3 commented 1 year ago

%math.arith.mul 0 (a,b) is parsed as %math.arith.mul (.infer (<nullptr>), .infer (<nullptr>)) 0 (applied to (a,b)) of domain «2; %math.F (.infer (<nullptr>), .infer (<nullptr>))».

However, this excludes floats where (p,e) is perceived as one def.

For instance,

  .let R = %math.F (p,e);
  .con prod_comb [[mem:%mem.M, acc:R, [a:R, b:R]], ret:.Cn[%mem.M,R]] = {
      .let v = %math.arith.mul 0 (a,b);

is not accepted (in the current version) as (a,b) is of type «2; %math.F __13580».

Note: The code is present in matrix.thorin in the matrix_dialect branch.