[PATCH] D87814: [AArch64][GlobalISel] Fix bug in fewVectorElts action while legalizing oversize G_FPTRUNC vectors

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 23:29:38 PDT 2020


aemerson created this revision.
aemerson added reviewers: arsenm, paquette.
aemerson added a project: LLVM.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls, rovka.
Herald added a reviewer: rengolin.
aemerson requested review of this revision.
Herald added a subscriber: wdng.

For <8 x s32> = fptrunc <8 x s64> the fewerElementsVector action tries to break down the source vector into the final source vectors of <2 x s64> using unmerge. This fixes a crash due to using the wrong number of elements for the breakdown type.

Also add some legalizer tests for explicitly G_FPTRUNC which we didn't have.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87814

Files:
  llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
  llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-fptrunc.mir
  llvm/test/CodeGen/AArch64/arm64-vcvt.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87814.292410.patch
Type: text/x-patch
Size: 7593 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200917/b3b879dd/attachment.bin>


More information about the llvm-commits mailing list