<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 7/25/2017 2:48 AM, Sam Parker via
      llvm-dev wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:HE1PR0802MB2507683BBF5A37FA8D8945DC85B80@HE1PR0802MB2507.eurprd08.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
      <div id="divtagdefaultwrapper" style="font-size: 12pt; color:
        rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif,
        EmojiFont, "Apple Color Emoji", "Segoe UI
        Emoji", NotoColorEmoji, "Segoe UI Symbol",
        "Android Emoji", EmojiSymbols;" dir="ltr">
        <p>Hi, </p>
        <p><br>
        </p>
        <p>In running opt -indvars on the attached file, I see a massive
          constant expression being generated (I stop opt once the
          output file grows larger than 3GB). The example comes from
          a reduced version an LNT test. I've been looking into constant
          folding and indvar simplify to see if there's a way to limit
          the depth of these expressions, but I haven't figured anything
          out.</p>
        <p><br>
        </p>
        <p>Could anyone shine some light into how to handle these
          expressions? Could they be broken into multiple values? Or can
          we limit the complexity of constant exprs?</p>
      </div>
    </blockquote>
    <br>
    It's a known issue that printing textual IR for constant expressions
    which have the same operand multiple times can cause an exponential
    explosion in the size of the text.  Other passes generally handle
    expressions like that without any problem, though.<br>
    <br>
    -Eli<br>
    <pre class="moz-signature" cols="72">-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre>
  </body>
</html>