]> granicus.if.org Git - llvm/commit
[globalisel][tablegen] Fix patterns involving multiple ComplexPatterns.
authorDaniel Sanders <daniel_l_sanders@apple.com>
Wed, 5 Apr 2017 13:14:03 +0000 (13:14 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Wed, 5 Apr 2017 13:14:03 +0000 (13:14 +0000)
commitbe2d374747cccfd076480eac2284668baacef161
treee260b4969143925265689c373992745452defb98
parent452338954325348fd1530e61cca29e74437c3f85
[globalisel][tablegen] Fix patterns involving multiple ComplexPatterns.

Summary:
Temporaries are now allocated to operands instead of predicates and this
allocation is used to correctly pair up the rendered operands with the
matched operands.

Previously, ComplexPatterns were allocated temporaries independently in the
Src Pattern and Dst Pattern, leading to mismatches. Additionally, the Dst
Pattern failed to account for the allocated index and therefore always used
temporary 0, 1, ... when it should have used base+0, base+1, ...

Thanks to Aditya Nandakumar for noticing the bug.

Depends on D30539

Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

Reviewed By: rovka

Subscribers: igorb, dberris, kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D31054

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299538 91177308-0d34-0410-b5e6-96231b3b80d8
test/TableGen/GlobalISelEmitter.td
utils/TableGen/GlobalISelEmitter.cpp