<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/162199>162199</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[IR2Vec] Reduce/Remove "magic numbers" in IR2VecTest
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
svkeerthy
</td>
</tr>
</table>
<pre>
Current `IR2VecTest.cpp` relies heavily on `createDummyVocabForTest()` defined in `IR2Vec.cpp` for testing the embeddings. This leads to embeddings for opcodes, types, and operands to appear out of nowhere resulting in hardcoded values. This can be changed by allowing vocabulary creation with embeddings specific to the entities for which we want to compare (follow the same style as what we have in MIR2VecTest.cpp for testing the expected embeddings)
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxkkstunTAQhp_GbEY5AnMJLFi0iZC66CaKsh_sAbs1NrINlLevTBLlVF2BZH_zXzwYgp4tUc_q76x-znCLyvk-7L-JfFRnNjp59k-b92QjsCb_8cLfSLxSiDexrqzJwZPRFEAR7tqc4Gy6JjxhpOdtWc43J3AcnE8M4y3jXaIkTdqSBG2_pn5OnJyHSCFqO0NUBLSMJKW2c7jBq9IBDKEMEN3dyQW5VThJgfEniOf6_oNWglvJo31HcF0JPbgtgpvAukORJ_AUNnMJagsKvUyDJOxoNvpUFWhhJBAK7UwSxhPQGHckaE8ZN4P-hCu5dhYOHdW9wbCS0JMWycSVykYdU3PJ-aG0UHAQHGhjuiHcsqInYLydXJK5mIALQYinIcAAh8KYGIU7Jd8__32c_3v8s5KIJO9cMd5lsi9lV3aYUV881t1jVxV1m6m-KLCULbY1b0aqcJyKumkeRVXKlk8T5Znuec7rIs8bXla8bG9FM7Wy7SaOVTs1bcWqnBbU5mbMvtycnzMdwkZ90fCi6zKDI5lwrR7nlg64ThnnaRN9n6CHcZsDq3KjQwxfY6KO5trZ98SsfoYXkpsgxocXWtyeiuMLzlqA3ZaRfGCcp46-Kso2b3oV4xpY-Y3xgfFh1lFt4024hfEhiX18HlbvfpGIjA-XxcD48JFh7_nfAAAA__8rPhrT">