[PATCH] D42565: [ARM][GISel] PR35965 Constrain RegClasses of nested instructions built from Dst Patter

Roman Tereshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 01:23:11 PST 2018


rtereshin created this revision.
rtereshin added reviewers: dsanders, qcolombet, rovka, bogner, aditya_nandakumar, volkan.
Herald added subscribers: llvm-commits, kristof.beyls, javed.absar, aemerson.

Apparently, we missed on constraining register classes of VReg-operands of all the instructions
built from a destination pattern but the root (top-level) one. The issue exposed itself
while selecting G_FPTOSI for armv7: the corresponding pattern generates VTOSIZS wrapped
into COPY_TO_REGCLASS, so top-level COPY_TO_REGCLASS gets properly constrained,
while nested VTOSIZS (or rather its destination virtual register to be exact) does not.

Fixing this by issuing GIR_ConstrainSelectedInstOperands for every nested GIR_BuildMI.

https://bugs.llvm.org/show_bug.cgi?id=35965
rdar://problem/36886530


Repository:
  rL LLVM

https://reviews.llvm.org/D42565

Files:
  lib/CodeGen/GlobalISel/Utils.cpp
  lib/Target/ARM/ARMLegalizerInfo.cpp
  test/CodeGen/ARM/GlobalISel/arm-select-fptosi-pr35965.mir
  test/TableGen/GlobalISelEmitter.td
  utils/TableGen/GlobalISelEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42565.131548.patch
Type: text/x-patch
Size: 5134 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180126/d32198d3/attachment.bin>


More information about the llvm-commits mailing list