diff options
author | Jay Foad <jay.foad@amd.com> | 2020-04-17 16:17:26 +0100 |
---|---|---|
committer | Jay Foad <jay.foad@amd.com> | 2020-05-12 16:51:03 +0100 |
commit | 989be65b11fa2fbc2cde7e188657636ea9a2da1d (patch) | |
tree | 10553e3690cae1ad2af4ae728319cfbe104bdeef /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | bd80a8bb87617a25a1fda0338db3b26637b273a0 (diff) | |
download | llvm-989be65b11fa2fbc2cde7e188657636ea9a2da1d.zip llvm-989be65b11fa2fbc2cde7e188657636ea9a2da1d.tar.gz llvm-989be65b11fa2fbc2cde7e188657636ea9a2da1d.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions