[all-commits] [llvm/llvm-project] bd80a8: [GlobalISel][IRTranslator] New helper function tra...
jayfoad via All-commits
all-commits at lists.llvm.org
Tue May 12 08:51:29 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: bd80a8bb87617a25a1fda0338db3b26637b273a0
https://github.com/llvm/llvm-project/commit/bd80a8bb87617a25a1fda0338db3b26637b273a0
Author: Jay Foad <jay.foad at amd.com>
Date: 2020-05-12 (Tue, 12 May 2020)
Changed paths:
M llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
Log Message:
-----------
[GlobalISel][IRTranslator] New helper function translateCopy. NFC.
Reviewers: arsenm, volkan, t.p.northover, aditya_nandakumar
Subscribers: wdng, rovka, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78377
Commit: 989be65b11fa2fbc2cde7e188657636ea9a2da1d
https://github.com/llvm/llvm-project/commit/989be65b11fa2fbc2cde7e188657636ea9a2da1d
Author: Jay Foad <jay.foad at amd.com>
Date: 2020-05-12 (Tue, 12 May 2020)
Changed paths:
M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
M llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
A llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-constantexpr.ll
Log Message:
-----------
[GlobalISel][IRTranslator] Fix <1 x Ty> handling in ConstantExprs
Summary:
ConstantExprs involving operations on <1 x Ty> could translate into MIR
that failed to verify with:
*** Bad machine code: Reading virtual register without a def ***
The problem was that translate(const Constant &C, Register Reg) had
recursive calls that passed the same Reg in for the translation of a
subexpression, but without updating VMap for the subexpression first as
translate(const Constant &C, Register Reg) expects.
Fix this by using the same translateCopy helper function that we use for
translating Instructions. In some cases this causes extra G_COPY
MIR instructions to be generated.
Fixes https://bugs.llvm.org/show_bug.cgi?id=45576
Reviewers: arsenm, volkan, t.p.northover, aditya_nandakumar
Subscribers: jvesely, wdng, nhaehnle, rovka, hiraditya, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78378
Compare: https://github.com/llvm/llvm-project/compare/ffcaed32ef1c...989be65b11fa
More information about the All-commits
mailing list