[PATCH] D70564: [GlobalISel] LegalizationArtifactCombiner: Fix a bug in tryCombineMerges
Volkan Keles via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 21 13:35:16 PST 2019
volkan created this revision.
volkan added reviewers: qcolombet, aditya_nandakumar, aemerson, paquette, arsenm, Petar.Avramovic.
Herald added subscribers: atanasyan, jrtc27, rovka, wdng, sdardis.
Herald added a project: LLVM.
volkan added a comment.
@Petar.Avramovic Could you take a look at the failing Mips tests?
When combining G_UNMERGE_VALUES, we were replacing the destination registers
with the source register of the matching G_MERGE_VALUES. However, this is not
legal if the registers have constraints such as assigned register banks.
This patch adds a simple logic to check if the constraints match. If so,
replace the register. Othwerwise, build a COPY instruction to avoid
losing the register constraints.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70564
Files:
llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
llvm/test/CodeGen/AArch64/GlobalISel/artifact-combine-merge-with-constraints.mir
llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/long_ambiguous_chain_s64.ll
llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/phi.ll
llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/select.ll
llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/store.ll
llvm/test/CodeGen/Mips/GlobalISel/regbankselect/long_ambiguous_chain_s32.mir
llvm/test/CodeGen/Mips/GlobalISel/regbankselect/long_ambiguous_chain_s64.mir
llvm/test/CodeGen/Mips/GlobalISel/regbankselect/phi.mir
llvm/test/CodeGen/Mips/GlobalISel/regbankselect/select.mir
llvm/test/CodeGen/Mips/GlobalISel/regbankselect/store.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70564.230524.patch
Type: text/x-patch
Size: 10306 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191121/ab469fc3/attachment.bin>
More information about the llvm-commits
mailing list