Skip to content

Commit

Permalink
remove redundant simplification rule
Browse files Browse the repository at this point in the history
recognized by commutative call

Belonging to [master]:
  - OpenModelica/OMCompiler#2062
  • Loading branch information
hkiel authored and OpenModelica-Hudson committed Nov 30, 2017
1 parent 83ffab2 commit e8f130f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Compiler/FrontEnd/ExpressionSimplify.mo
Expand Up @@ -3882,10 +3882,6 @@ algorithm
case (DAE.ADD(),DAE.RCONST(r1),DAE.BINARY(DAE.RCONST(r2),DAE.SUB(ty=ty),e1 as DAE.CREF(_)))
then DAE.BINARY(DAE.RCONST(realAdd(r1,r2)),DAE.SUB(ty),e1);

// ((r2 - e) + r1) => (r3 - e)
case (DAE.ADD(),DAE.BINARY(DAE.RCONST(r2),DAE.SUB(ty=ty),e1 as DAE.CREF(_)),DAE.RCONST(r1))
then DAE.BINARY(DAE.RCONST(realAdd(r1,r2)),DAE.SUB(ty),e1);

// |e1| /e1 = e1/|e1| => sign(e1)
case(DAE.DIV(ty),DAE.CALL(path=Absyn.IDENT("abs"),expLst={e1}),e2)
guard Expression.expEqual(e1,e2)
Expand Down

0 comments on commit e8f130f

Please sign in to comment.