<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54930>54930</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[optimization] an redundance mov should be eliminated by register allocation
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
vfdff
</td>
</tr>
</table>
<pre>
test case: https://godbolt.org/z/4qcx57G8r
```
void add_arrays(double* a, unsigned n)
{
#pragma clang loop unroll_count(2)
for (unsigned i = 0; i < n; ++i)
a[i] += 1;
}
```
there is following code fragment in kernel loop body (**.LBB0_6**), I think the mov should be eliminated by register allocation.
Firstly, the mov is brought in by pass **TwoAddressInstruction** , it try the transform: `a = b op c -> a=b, a op= c`.
```
mov z3.d, z0.d
orr z3.d, z3.d, #0x1
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVU8Fu4yAQ_Rp8GdXC2K6Tgw9Js1lV2uPeIzDYZksgCzhp8vU72Gm7qqqVVsJmYJg3bx6DcPLaRhUidDwoUm4AxhhPAS3C9jgGJ4UzMXd-wNUNv-p391o331ee0B2hG_JI72Nenp2WwKU8cO_5NRC2km4SRhG2AU7YE0w26MEqCZaw9R2i2S4GAGHlyfPhyKEz3A5gnDthiHfGHDo32YiA7D0QoHceY1bvoBpIuQNKyu1sPmEWNAnb4tB_xQGSqXGn3s1OjCnw4Bud3ZelLf84Kq9AB0xtjLtoJNk5qaBPtJWNoC28KG-VWcgLVDhRRAFw5D-2W3p4XBaJDyryDHHU9gX_Co7uDGF0k5EgFCijj9ryiIWJK3g16BCVB46JOx61s_nCaa99iOaawN5AkKDwbhrGmRBGn3gIsOT9eXEbKb0K4dmG6KcuQS0uSBg6QvRXmLGi5zagysfUGygFnwUWgJV18EDKbyhkuRMpjONmcnZ4LP9SQZip3cpcpvM3ivN933n_sX-fsRfoa_GPq8hkW8p1ueZZ1NGoFm_UnSJKdpvFSZfLLcomJyu57f5b3Wzypv30HHQcJ5F37ogLY85v08PJu1-qw_bc6xAmhY2_r6t1SbOxXVdN2RWrhvNa4FytlKB90_e0Z6qUVZUZLpQJiT5hzKoLzBBoYwWZbhlljFZFXbCCsSJntMGieVPWrOCFbEhF1ZFrkyce6Z1mvp0piWkI6DRYVvhwYhukpzKrlfD5FEfn23Mv-z6bE7cz8T9Mfzq6">