diff options
author | David Green <david.green@arm.com> | 2021-08-10 09:53:26 +0100 |
---|---|---|
committer | David Green <david.green@arm.com> | 2021-08-10 09:53:26 +0100 |
commit | c140ff493e84bbe697b78ac31fda427e4f8e12da (patch) | |
tree | 85e3ed270be0e6250383f34bda915a30b464eb3e /llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp | |
parent | 53eb469195b89a00c5e977fc7f76cd520a447d97 (diff) | |
download | llvm-c140ff493e84bbe697b78ac31fda427e4f8e12da.zip llvm-c140ff493e84bbe697b78ac31fda427e4f8e12da.tar.gz llvm-c140ff493e84bbe697b78ac31fda427e4f8e12da.tar.bz2 |
[ARM] Change a couple of instances of LiveRegs.contains to !LiveRegs.available
This changes a couple of calls to LiveRegs.contains to
!LiveRegs.available, one in Thumb1FrameLoweringInfo (which modifies a
test to look more correct to me, given r7 should be the frame pointer so
is not available), and another in the ARMLoadStoreOptimizer, that I
don't have a test for, it was just found by inspection.
Differential Revision: https://reviews.llvm.org/D107454
Diffstat (limited to 'llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp index fd06bfd..6b114f8 100644 --- a/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp +++ b/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp @@ -587,7 +587,7 @@ unsigned ARMLoadStoreOpt::findFreeReg(const TargetRegisterClass &RegClass) { } for (unsigned Reg : RegClassInfo.getOrder(&RegClass)) - if (!LiveRegs.contains(Reg)) + if (LiveRegs.available(MF->getRegInfo(), Reg)) return Reg; return 0; } |