<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/114820>114820</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[CVP] Infer samesign in CorrelatedValuePropagation
</td>
</tr>
<tr>
<th>Labels</th>
<td>
good first issue,
missed-optimization,
llvm:transforms
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
nikic
</td>
</tr>
</table>
<pre>
CVP performs signed -> unsigned comparison canonicalization, so we should also infer the samesign flag there. Relevant function is: https://github.com/llvm/llvm-project/blob/3268d51a5c81be705a97216bf061fab9bb195ebe/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp#L286
We need a change similar to https://github.com/llvm/llvm-project/commit/095d49da76be09143582e07a807c86d3b4334dec for InstCombine.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUkk9v3igQxj8NvozyCrDxn4MP2Tf7SpH2EO2u0vMAY5sWgwU4VfvpK7tpmksPucAAw2ieeX6Ys5sD0cjUX0w9VLiXJaYxuC_OVDrab-P1-Qk2SlNMa4Yz2cIdq_-GPbyeTFw3TC7HAAZDDM6gd9-xuBiYvEKO8JUgL3H3FtDnCC5MlKAsBBlXOqrA5HE-bhJd4F_y9IKhwLQHc1QBl1l9D0sp2xEweWPyNruy7Ppi4srkzfuXX9vdluJnMoXJm_ZRM3mrZdtbJVCZXmjquMKhk6LVE2_FhHrQWgyKNL2r445__ycM-dTN5O0_gx4Tk7drTIk8FrLP6Hd6SnHD-RR7MdvGZP2P7FvGHxi__7l-IghEFhDMgmEmyG51HhOU-HFJJq6rOwI-KNsMFrtWEx9EU6teEu-w553pW1vrpq4bSwammOAx5HKNq3aBLpUdazvUA1Y0iq7mXd0KoaplnFSrmo7zpicr6qmzPQ6cxNS02kilpsqNkstGCN6IlgulLq3BiYRqBtEIoTpiDacVnb8cTV9imiuX806jEE0veeVRk88naVLOMVqYXMoFziQmJZNXJuXqciZ7F7fi1jeKXt_OmdT35Z0x8qA2jeeY9D5n1nDvcsm_eyiu-JPv6_MTUw_weNL3Rp4L8GdLqz358cMmnYIOaF6Fv4zyRwAAAP__duYcBg">