<div dir="ltr">Hey,<div><br></div><div>Indeed. The shuffle_vector replaces the build_vector shortly after visitBUILD_VECTOR returns. This dump is immediately before and after visitBUILD_VECTOR calls reduceBuildVecToShuffle. The shuffle_vector<0,0> then gets lowered as usual, to code that doesn't implement shuffle_vector<0,2>.</div><div><br></div><div>There are other cases where the indexing calculation works out correctly, but for some reason it misfires on this input DAG. The implementation involves chasing indices through intermediate data structures and I don't have an adequate handle on how it is intended to work. The control flow constructs a single shuffle node with a vector mask calculated from previous information and then returns, so at least the shuffle combination code at the end of the function isn't involved.<span class="sewi03wfommft3m"></span></div><div><br></div><div>Disabling reduceBuildVecToShuffle fixes the problem completely for my back end, but I'd rather get to the root cause.<span class="sewi03wfommft3m"></span></div><div><br></div><div>Cheers</div><div><br></div><div>Jon</div><div><br></div><div><br><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
------------------------------<br>
<br>
Message: 4<br>
Date: Mon, 9 Apr 2018 11:33:37 -0500<br>
From: Krzysztof Parzyszek via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
To: <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
Subject: Re: [llvm-dev] llvm-dev Digest, Vol 166, Issue 22<br>
Message-ID: <<a href="mailto:2c3b814b-8bf3-816d-2737-6dede6396759@codeaurora.org" target="_blank">2c3b814b-8bf3-816d-2737-6dede<wbr>6396759@codeaurora.org</a>><br>
Content-Type: text/plain; charset=utf-8; format=flowed<br>
<br>
The node t29 seems to be dead. The CopyToReg m0 still uses t25, same as<br>
the original code.<br>
<br>
Does t29 disappear later on?<br>
<br>
-Krzysztof<br><br>
</blockquote></div><br></div></div></div></div>