[all-commits] [llvm/llvm-project] 1e46dc: [TwoAddressInstructionPass] Put all new instructio...
weiguozhi via All-commits
all-commits at lists.llvm.org
Thu Oct 28 11:12:20 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1e46dcb77b51846c7ea97cba7fd95bc1f0911a09
https://github.com/llvm/llvm-project/commit/1e46dcb77b51846c7ea97cba7fd95bc1f0911a09
Author: Guozhi Wei <carrot at google.com>
Date: 2021-10-28 (Thu, 28 Oct 2021)
Changed paths:
M llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
M llvm/test/CodeGen/X86/addcarry.ll
A llvm/test/CodeGen/X86/distancemap.mir
M llvm/test/CodeGen/X86/sadd_sat_plus.ll
M llvm/test/CodeGen/X86/sadd_sat_vec.ll
Log Message:
-----------
[TwoAddressInstructionPass] Put all new instructions into DistanceMap
In function convertInstTo3Addr, after converting a two address instruction into
three address instruction, only the last new instruction is inserted into
DistanceMap. This is wrong, DistanceMap should track all instructions from the
beginning of current MBB to the working instruction. When a two address
instruction is converted to three address instruction, multiple instructions may
be generated (usually an extra COPY is generated), all of them should be
inserted into DistanceMap.
Similarly when unfolding memory operand in function tryInstructionTransform
DistanceMap is not maintained correctly.
Differential Revision: https://reviews.llvm.org/D111857
More information about the All-commits
mailing list