[AArch64InstrInfo] Ignore debug insts in areCFlagsAccessedBetweenInstrs [7/14]
authorVedant Kumar <vsk@apple.com>
Tue, 14 Apr 2020 21:50:03 +0000 (14:50 -0700)
committerVedant Kumar <vsk@apple.com>
Thu, 23 Apr 2020 00:03:40 +0000 (17:03 -0700)
commitf0b52beef3e3fa5e99aa9fae962f9df0cdaf5f74
treef1956331e60c7cbb882cf312c40c034861025e2c
parent26271c83849ba05982963bf5e85e54fc0de1389a
[AArch64InstrInfo] Ignore debug insts in areCFlagsAccessedBetweenInstrs [7/14]

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

In test/CodeGen/AArch64/arm64-csel.ll, the issue was found in the
function @foo5, in which the first compare could successfully be
optimized but not the second.

Reviewers: t.p.northover, eastig, paquette

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D78157
llvm/lib/CodeGen/PeepholeOptimizer.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/test/CodeGen/AArch64/arm64-csel.ll