[AArch64InstrInfo] Ignore debug insts in canInstrSubstituteCmpInstr [6/14]
authorVedant Kumar <vsk@apple.com>
Thu, 16 Apr 2020 00:54:46 +0000 (17:54 -0700)
committerVedant Kumar <vsk@apple.com>
Thu, 23 Apr 2020 00:03:40 +0000 (17:03 -0700)
commit26271c83849ba05982963bf5e85e54fc0de1389a
tree4e37a818e54f67ee69889e482f50259943f24290
parentf1a71b5949069315a7f530e989f863f9c19d59f8
[AArch64InstrInfo] Ignore debug insts in canInstrSubstituteCmpInstr [6/14]

Summary:
Fix an issue where the presence of debug info could disable a peephole
optimization in optimizeCompareInstr due to canInstrSubstituteCmpInstr
returning the wrong result.

Depends on D78137.

Reviewers: t.p.northover, eastig, paquette

Subscribers: kristof.beyls, hiraditya, danielkiss, aprantl, llvm-commits, dsanders

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78151
llvm/lib/CodeGen/PeepholeOptimizer.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/test/CodeGen/AArch64/arm64-arm64-dead-def-elimination-flag.ll