[PATCH] D136447: [ARM] Fix vector ule zero lowering

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 06:29:26 PDT 2022


dmgreen created this revision.
dmgreen added reviewers: samtebbs, labrinea, NickGuy, simon_tatham, john.brawn.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a project: LLVM.

The instruction `icmp ule <4 x i32> %0, zeroinitializer` will usually be simplified to `icmp eq <4 x i32> %0, zeroinitializer`. It is not guaranteed though, and the code for lowering vector compares could pick the wrong form of the instruction if this happened. I've tried to make the code more explicit about the supported conditions.

This fixes NEON being unable to select VCMPZ with HS conditions, and fixes some incorrect MVE patterns.
Fixes #58514.


https://reviews.llvm.org/D136447

Files:
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/test/CodeGen/ARM/vcmpz.ll
  llvm/test/CodeGen/Thumb2/mve-pred-and.ll
  llvm/test/CodeGen/Thumb2/mve-pred-or.ll
  llvm/test/CodeGen/Thumb2/mve-pred-xor.ll
  llvm/test/CodeGen/Thumb2/mve-vcmpz.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136447.469567.patch
Type: text/x-patch
Size: 6922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221021/25e7014f/attachment.bin>


More information about the llvm-commits mailing list