Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8283094

Add Ideal transformation: x + (con - y) -> (x - y) + con

XMLWordPrintable

    • b19
    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      `x + (con - y) -> (x - y) + con` is a widely seen pattern; however it is missing in current implementation, which prevents some obvious constant folding from happening, such as `x + (1 - y) + 2` will be not optimized at all, rather than into `x - y + 3`.

      A pull request has been created: https://github.com/openjdk/jdk/pull/7795


            kvn Vladimir Kozlov
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: