<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/107199>107199</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
SLPVectorizer.cpp : Conditional Check for Idx Might Prevent TryToVectorize(Set.second) Execution in vectorizeStores()
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Bruce0316
</td>
</tr>
</table>
<pre>
In [llvm-project/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0-rc3/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp), at line 16324,
`auto It = Set.second.find(std::make_pair(Idx, *Diff));`
The comment explains that if *Diff is duplicated in the set, TryToVectorize(Set.second) should be executed.
However, the code also checks Idx. Does this mean that TryToVectorize(Set.second) might never be executed?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykU8Fu4zYQ_RrqMohADSVbOuhgxzVqoAUCxOi1oMixxYYiDZJynH79gkqyyWIPwWJPwozI9968eZQxmrMj6lmzZc2ukHMafei3YVbERbUqBq9f-oMD1mytvU53l-D_I5UY7nOZP2ZguD8G6eLJhyky3P9DKvlg_ieG-8e_Hr6XoVSXC2t2DNsxpUtkYsNwz3B_Nmmch1L56RPuj2yD9cNb14fzXdWVVcnvghK_oQQ7hvcgE1jjCKqVwDo3GN8xvmErLufk4ZCAiR08UiojKe90eTJOM2xj0nkAsZnkE_17kSYwbA_6tkDgZmdOp4WhY2LLVvwV9TgSKD9N5BLQ7WKlcRHSKBOY0_stMBH0fLFGyUQajIM0EkRKGfkYXo7-01jthzCGHcTRz1bDQEA3UnMiXb4S_-mf6UohQ6RFgyaQNnpQI6mnCAd9K2HnKasxESaS7lXXF4STOY8JXMb-zMrEvtC90J3oZEF9tcamFu16hcXYt0Mjm4Z3q4p3HVaktMS6bZpV19YV6qYwPXKsecdr3gqssTwJuRaDbitcq0bhmtWcJmlsmTdf-nAuTIwz9RVfV11XWDmQjUukER09w_KXIeaEh35J1jCfI6u5NTHFD5hkkqX-p6QAExu4906bZLyTFu6zaXDyIfsGfy8ePAS65rV-Ydgfi0PGu7zY6_uxx-QDRYYtw66Yg-1_-YEsM-bMv5lw7fFbAAAA__8cJ0G9">