[PATCH] D59062: [GlobalISel][AArch64] Always fall back on aarch64.neon.addp.*

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 6 16:44:21 PST 2019


paquette created this revision.
paquette added reviewers: aemerson, aditya_nandakumar, dsanders, arsenm.
Herald added subscribers: Petar.Avramovic, volkan, kristof.beyls, javed.absar, rovka, wdng.

If you have an intrinsic that doesn't have a 1:1 mapping with an instruction, and the types passed into that intrinsic aren't fully defined by their register banks, GISel can't actually map it to the right instruction today. As far as I know, addp is the only such intrinsic in AArch64.

Introduce a hacky workaround in the AArch64 legalizer to make sure we always fall back on this intrinsic. Goal here is to avoid impacting other backends as much as possible while we work towards a proper solution for the problem.

Also loosen some constraints on the legality of instructions with custom legalization, and factor out an assert. Before, we assumed that legalization would always *modify* an instruction *into* a legal state (or it'd be listed as legal based off the input LLTs). Since LLTs aren't sufficient here, this assumption falls over.

Also, we had the assumption that we'd be passing along LLTs into `apply()`, which isn't true here either.

https://bugs.llvm.org/show_bug.cgi?id=40968


https://reviews.llvm.org/D59062

Files:
  lib/CodeGen/GlobalISel/LegalizerInfo.cpp
  lib/Target/AArch64/AArch64LegalizerInfo.cpp
  lib/Target/AArch64/AArch64LegalizerInfo.h
  test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
  test/CodeGen/AArch64/GlobalISel/select-addp.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59062.189616.patch
Type: text/x-patch
Size: 6719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190307/b3d56b7f/attachment.bin>


More information about the llvm-commits mailing list