[all-commits] [llvm/llvm-project] 7550f1: [X86] Clear kill flags when rewriting SETCC uses i...
Craig Topper via All-commits
all-commits at lists.llvm.org
Tue Sep 21 14:30:01 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7550f146ff75667d6e1828d64438dcc23b77f036
https://github.com/llvm/llvm-project/commit/7550f146ff75667d6e1828d64438dcc23b77f036
Author: Craig Topper <craig.topper at sifive.com>
Date: 2021-09-21 (Tue, 21 Sep 2021)
Changed paths:
M llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
M llvm/test/CodeGen/X86/flags-copy-lowering.mir
A llvm/test/CodeGen/X86/pr51908.mir
Log Message:
-----------
[X86] Clear kill flags when rewriting SETCC uses in flag copy lowering.
When we rewrite the setcc we replace set old setcc output register
with the new CondReg. But since CondReg can be shared by other
replacements, we don't know if the kill flags for the old register
are valid for CondReg. So be conservative and remove them.
The test case has a SETCCr and a SETCCm on the same condition so
they end up sharing the same CondReg. The SETCCr had one use with
a kill flag. This kill flag isn't valid after the replacement because
CondReg needs a live range extending to the later SETCCm replacment.
Fixes PR51908.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D110046
More information about the All-commits
mailing list