aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/SimplifyInstructions.cpp
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2017-07-11 10:40:18 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2017-07-11 10:40:18 +0000
commit57938df813d5934b6b9400968a6e09d46d611802 (patch)
tree33719dc00466d5406f239e0984243116945ac5b0 /llvm/lib/Transforms/Utils/SimplifyInstructions.cpp
parente40c0fe3f840cc5f1b324d87f49218ed58c386b4 (diff)
downloadllvm-57938df813d5934b6b9400968a6e09d46d611802.zip
llvm-57938df813d5934b6b9400968a6e09d46d611802.tar.gz
llvm-57938df813d5934b6b9400968a6e09d46d611802.tar.bz2
[globalisel][tablegen] Fix an multi-insn match bug where ComplexPattern is used on multiple insns.
In each rule, each use of ComplexPattern is assigned an element in the Renderers array. The matcher then collects renderer functions in this array and they are used to render instructions. This works well for a single instruction but a bug in the allocation mechanism causes the elements to be assigned on a per-instruction basis rather than a per-rule basis. So in the case of: (set GPR32:$dst, (Op complex:$src1, complex:$src2)) tablegen currently assigns elements 0 and 1 to $src1 and $src2 respectively, but for: (set GPR32:$dst, (Op complex:$src1, (Op complex:$src2))) it currently assigned both $src1 and $src2 the same element (0). This results in one complex operand being rendered twice and the other being forgotten. This patch corrects the allocation such that $src1 and $src2 are still allocated different elements in this case. llvm-svn: 307646
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyInstructions.cpp')
0 files changed, 0 insertions, 0 deletions