Commit ac85e74b authored by Richard Angersbach's avatar Richard Angersbach
Browse files

Merge branch 'devel/fix_poly_matrix_compounds' into 'master'

devel/fix_poly_matrix_compounds

See merge request exastencils/exastencils!77
parents 4c96a571 ee7ec781
......@@ -95,14 +95,14 @@ object IR_PreItMOps extends DefaultStrategy("Prelimirary transformations") {
////////////////////////////////////////////////////////////////// combined ops
this += new Transformation("Split combined operators", {
case IR_Assignment(dest, src, "+=") =>
IR_Assignment(dest, IR_Addition(dest, src))
case IR_Assignment(dest, src, "*=") =>
IR_Assignment(dest, IR_Multiplication(ListBuffer[IR_Expression](dest, src)))
case IR_Assignment(dest, src, "-=") =>
IR_Assignment(dest, IR_Subtraction(dest, src))
case IR_Assignment(dest, src, "/=") =>
IR_Assignment(dest, IR_Division(dest, src))
case IR_Assignment(dest, src, "+=") if dest.datatype.isInstanceOf[IR_HigherDimensionalDatatype] =>
IR_Assignment(Duplicate(dest), IR_Addition(dest, src))
case IR_Assignment(dest, src, "*=") if dest.datatype.isInstanceOf[IR_HigherDimensionalDatatype] =>
IR_Assignment(Duplicate(dest), IR_Multiplication(ListBuffer[IR_Expression](dest, src)))
case IR_Assignment(dest, src, "-=") if dest.datatype.isInstanceOf[IR_HigherDimensionalDatatype] =>
IR_Assignment(Duplicate(dest), IR_Subtraction(dest, src))
case IR_Assignment(dest, src, "/=") if dest.datatype.isInstanceOf[IR_HigherDimensionalDatatype] =>
IR_Assignment(Duplicate(dest), IR_Division(dest, src))
}, false)
/////////////////////////////////////////////
......
......@@ -581,7 +581,7 @@ private object VectorizeInnermost extends PartialFunction[Node, Transformation.O
ctx.addStmt(IR_Comment("Copy: " + lhsSca.prettyprint()))
val (copyName, _) = ctx.getName(IR_VariableAccess("copyVec", SIMD_RealDatatype))
val copy = IR_VariableAccess(copyName, SIMD_RealDatatype)
vectorizeStmt(IR_Assignment(copy, lhsSca, op), ctx)
vectorizeStmt(IR_Assignment(copy, lhsSca), ctx)
vectorizeStmt(IR_Assignment(lhsSca, SIMD_Blendv(copy, rhsSca, mask), op), ctx)
case _ : IR_IfCondition =>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment