aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineCopyPropagation.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2021-09-30 16:35:44 +0100
committerJay Foad <jay.foad@amd.com>2021-10-07 10:10:11 +0100
commitdf2d4bc4cbc0626364bd4c5fc8203a00fabcd0d5 (patch)
tree97b11e2718095b44213e325819283c376bf34a30 /llvm/lib/CodeGen/MachineCopyPropagation.cpp
parent85abedd75074bf574e8b012883b5490674037093 (diff)
downloadllvm-df2d4bc4cbc0626364bd4c5fc8203a00fabcd0d5.zip
llvm-df2d4bc4cbc0626364bd4c5fc8203a00fabcd0d5.tar.gz
llvm-df2d4bc4cbc0626364bd4c5fc8203a00fabcd0d5.tar.bz2
[TwoAddressInstruction] Fix ReplacedAllUntiedUses in processTiedPairs
Fix the calculation of ReplacedAllUntiedUses when any of the tied defs are early-clobber. The effect of this is to fix the placement of kill flags on an instruction like this (from @f2 in test/CodeGen/SystemZ/asm-18.ll): INLINEASM &"stepb $1, $2" [attdialect], $0:[regdef-ec:GRH32Bit], def early-clobber %3:grh32bit, $1:[reguse tiedto:$0], killed %4:grh32bit(tied-def 3), $2:[reguse:GRH32Bit], %4:grh32bit After TwoAddressInstruction without this patch: %3:grh32bit = COPY killed %4:grh32bit INLINEASM &"stepb $1, $2" [attdialect], $0:[regdef-ec:GRH32Bit], def early-clobber %3:grh32bit, $1:[reguse tiedto:$0], %3:grh32bit(tied-def 3), $2:[reguse:GRH32Bit], %4:grh32bit Note that the COPY kills %4, even though there is a later use of %4 in the INLINEASM. This fails machine verification if you force it to run after TwoAddressInstruction (currently it is disabled for other reasons). After TwoAddressInstruction with this patch: %3:grh32bit = COPY %4:grh32bit INLINEASM &"stepb $1, $2" [attdialect], $0:[regdef-ec:GRH32Bit], def early-clobber %3:grh32bit, $1:[reguse tiedto:$0], %3:grh32bit(tied-def 3), $2:[reguse:GRH32Bit], %4:grh32bit Differential Revision: https://reviews.llvm.org/D110848
Diffstat (limited to 'llvm/lib/CodeGen/MachineCopyPropagation.cpp')
0 files changed, 0 insertions, 0 deletions