[PATCH] D100485: [AArch64][SVE] Fix crash with icmp+select

Caroline via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 14 08:06:09 PDT 2021


CarolineConcatto created this revision.
Herald added subscribers: psnobl, hiraditya, kristof.beyls, tschuett.
Herald added a reviewer: efriedma.
CarolineConcatto requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch changes the lowering of SELECT_CC from Legal to Expand for scalable
vector and adds support for scalable vectors in performSelectCombine.

When selecting the nodes to lower in visitSELECT it checks if it is possible to
use SELECT_CC in cases where SETCC is followed by SELECT. visistSELECT checks
if SELECT_CC is legal or custom to replace SELECT by SELECT_CC.
SELECT_CC used to be legal for scalable vector, so the node changes to
SELECT_CC. This used to crash the compiler as there is no support for SELECT_CC
with scalable vectors. So now the compiler lowers to VSELECT instead of
SELECT_CC.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100485

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/AArch64/SVEInstrFormats.td
  llvm/test/CodeGen/AArch64/select-sve.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100485.337458.patch
Type: text/x-patch
Size: 19588 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210414/bc13b283/attachment.bin>


More information about the llvm-commits mailing list