diff options
author | Tim Northover <tnorthover@apple.com> | 2015-04-28 22:03:55 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2015-04-28 22:03:55 +0000 |
commit | e18d662201cd8d849cb45ee89cfa048d5c7a35cf (patch) | |
tree | 52f06e09de7fe6ab1e50bd747721a86b3be93347 /llvm/lib/Target | |
parent | 41920d0382806957a433e23a86de26721abe5005 (diff) | |
download | bcm5719-llvm-e18d662201cd8d849cb45ee89cfa048d5c7a35cf.tar.gz bcm5719-llvm-e18d662201cd8d849cb45ee89cfa048d5c7a35cf.zip |
ARM: fix peephole optimisation of TST
We were trying to look through COPY instructions, but only to the next
instruction in a BB and incorrectly anyway. The cases where that would actually
be a good idea are rare enough (and not even tested!) that it's not worth
trying to get right.
rdar://20721342
llvm-svn: 236050
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp index a370ab37675..e722ffb94cf 100644 --- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -2315,16 +2315,6 @@ static bool isSuitableForMask(MachineInstr *&MI, unsigned SrcReg, if (SrcReg == MI->getOperand(CommonUse ? 1 : 0).getReg()) return true; break; - case ARM::COPY: { - // Walk down one instruction which is potentially an 'and'. - const MachineInstr &Copy = *MI; - MachineBasicBlock::iterator AND( - std::next(MachineBasicBlock::iterator(MI))); - if (AND == MI->getParent()->end()) return false; - MI = AND; - return isSuitableForMask(MI, Copy.getOperand(0).getReg(), - CmpMask, true); - } } return false; |