<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58514>58514</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Cannot lower "icmp uge <4 x i32> zeroinitializer, ..." for ARMv7
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:ARM
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          aaronpuchert
      </td>
    </tr>
</table>

<pre>
    This is reduced from a larger file:
```llvm
define <4 x i32> @vcmpz(<4 x i32> %0) {
  %2 = icmp uge <4 x i32> zeroinitializer, %0
  %3 = sext <4 x i1> %2 to <4 x i32>
  ret <4 x i32> %3
}
```
Compilation with `llc -O2 -march=arm --float-abi=hard -mattr=+armv7-a` fails with:
```
LLVM ERROR: Cannot select: t17: v4i32 = ARMISD::VCMPZ t3, Constant:i32<2>
  t3: v4i32 = bitcast t2
    t2: v2f64,ch = CopyFromReg t0, Register:v2f64 %0
      t1: v2f64 = Register %0
  t16: i32 = Constant<2>
```
The larger file had a more complex tree, but I think it boils down to the `VCMPZ`. Other comparisons are not (necessarily) an issue, e.g. for the opposite `icmp ult` we get
```asm
        vceq.i32        q8, q0, #0
        vmvn    q0, q8
        bx      lr
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNVE1v2zgQ_TXSZWBBomzZOujg2A1QoEEW3qKH3ihpJHFLiQ45cpL--h1SSRN7LysQ4Me8efPBR9Wmfa2-D8oBD4vt3GALnTUjSNDS9mihUxqjfB-lxyjdR0W6DK0v43LUYqcmhCg_rOEFVC6i_AtE6_TSjOffkdjdGMQmjUQJ0fZucQd_JNj9CIo9YO5vuX6jNWpSpKRWvI7EYWH5cM-Du8MX-uOavQUTQOaa793PIt0mzUxvZW6PN_Uu24MZz0pLUmaCZ0UDhE40sHoUsBqlbQZORNoRVqtOG0krWSs-GaRtvZ3I8i4Sdwy5bFeSvaGTSrtA9t8mL9tv3348wJfT6fHECDjIaTLExWpsyB9QtvXTZc1VhD7sTw9f_z56tnz_4_Dw10-g3DftYCZHcvJOoeDD524w5IqkVtRIR0DiHQF-7TGiK9bM1wwBeDDn13sWzAl7oNTH4ZVyxBeV7wP26rYCT_aHJ1C8O1wBKSs86j2fj-Q_pX3TqO8DfhYtDLJlGY_GIjR8cRpfgCyiz7GeCb4CDWr6BYqgNv4SWvM8ebkQ8zBp6B3PCTzyiQ0c0irHmYBkTn8NrO8JG3SODfrVC1tO_JTcHKJg0ifQGRsYzflsnKJAvShdkxfAM0KPdFOQdOPnjgFcGnxKfDPevqedD_CULq8hT2_Q42UKqGBn7JW1fllmbW-ixlhlRVHkIhVlEbdV3pZ5KWNSpLF6E542z-GmxP9_rUmSMD40grV52caz1dVAdHZepOKeR8_6n-uEW8yb8G9ZptXZmn-80MV96KrjxWa3ydbxUG3TbFeW2GGW1TvZdbs2leVOFm237op6g7GWNWpXRZs7Dl_L5hdOLUfkHHgfbY6xqrhSkaV-rNebIqlTsWnTTGCxLcoy2_FvDEd-oInPJTG2j20V0qrn3rFRs27dh1E6p_oJMYRkfjnTYGwlpTXTeW5YRBSHMqpQw78PtY5b">