diff options
| author | Matthias Braun <matze@braunis.de> | 2015-12-11 19:42:09 +0000 |
|---|---|---|
| committer | Matthias Braun <matze@braunis.de> | 2015-12-11 19:42:09 +0000 |
| commit | 60d69e2865b2dfe62f689274b6346919250b5250 (patch) | |
| tree | 464db5d51576cc74d64c4437bb76e7e65c377e0d /llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp | |
| parent | 742afdb3d285d579e10fe6cde67f21bdb661d862 (diff) | |
| download | bcm5719-llvm-60d69e2865b2dfe62f689274b6346919250b5250.tar.gz bcm5719-llvm-60d69e2865b2dfe62f689274b6346919250b5250.zip | |
CodeGen: Redo analyzePhysRegs() and computeRegisterLiveness()
computeRegisterLiveness() was broken in that it reported dead for a
register even if a subregister was alive. I assume this was because the
results of analayzePhysRegs() are hard to understand with respect to
subregisters.
This commit: Changes the results of analyzePhysRegs (=struct
PhysRegInfo) to be clearly understandable, also renames the fields to
avoid silent breakage of third-party code (and improve the grammar).
Fix all (two) users of computeRegisterLiveness() in llvm: By reenabling
it and removing workarounds for the bug.
This fixes http://llvm.org/PR24535 and http://llvm.org/PR25033
Differential Revision: http://reviews.llvm.org/D15320
llvm-svn: 255362
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp b/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp index b6c74244e64..920f4094a45 100644 --- a/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp +++ b/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp @@ -353,7 +353,7 @@ MachineInstr *SSACCmpConv::findConvertibleCompare(MachineBasicBlock *MBB) { MIOperands::PhysRegInfo PRI = MIOperands(I).analyzePhysReg(AArch64::NZCV, TRI); - if (PRI.Reads) { + if (PRI.Read) { // The ccmp doesn't produce exactly the same flags as the original // compare, so reject the transform if there are uses of the flags // besides the terminators. @@ -362,7 +362,7 @@ MachineInstr *SSACCmpConv::findConvertibleCompare(MachineBasicBlock *MBB) { return nullptr; } - if (PRI.Clobbers) { + if (PRI.Defined || PRI.Clobbered) { DEBUG(dbgs() << "Not convertible compare: " << *I); ++NumUnknNZCVDefs; return nullptr; |

