Skip to content

Commit

Permalink
expand opportunity for OPabs
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright authored and dlang-bot committed Jun 9, 2024
1 parent d9f04c6 commit 8d627e1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions compiler/src/dmd/backend/cgelem.d
Original file line number Diff line number Diff line change
Expand Up @@ -2271,8 +2271,8 @@ private elem * elcond(elem *e, Goal goal)
!tyuns(e1.E2.Ety) &&
ec1.Eoper == OPneg &&
!el_sideeffect(ec2) &&
el_match(e.E1.E1,ec2) &&
el_match(ec1.E1,ec2) &&
el_match5(e.E1.E1,ec2) &&
el_match5(ec1.E1,ec2) && // ignore unsigned/signed difference
tysize(ty) >= _tysize[TYint]
)
{ e.E2.E2 = null;
Expand All @@ -2287,8 +2287,8 @@ private elem * elcond(elem *e, Goal goal)
!tyuns(e1.E2.Ety) &&
ec2.Eoper == OPneg &&
!el_sideeffect(ec1) &&
el_match(e.E1.E1,ec1) &&
el_match(ec2.E1,ec1) &&
el_match5(e.E1.E1,ec1) &&
el_match5(ec2.E1,ec1) &&
tysize(ty) >= _tysize[TYint]
)
{ e.E2.E1 = null;
Expand Down

0 comments on commit 8d627e1

Please sign in to comment.