[ARM] ScheduleDAGRRList::DelayForLiveRegsBottomUp must consider OptionalDefs
authorArtyom Skrobov <Artyom.Skrobov@arm.com>
Sun, 23 Apr 2017 06:58:08 +0000 (06:58 +0000)
committerArtyom Skrobov <Artyom.Skrobov@arm.com>
Sun, 23 Apr 2017 06:58:08 +0000 (06:58 +0000)
commit53cf1897ccea18a5919e109cde61b29d16dd8fb9
tree33b7af4de530c2e04640e0c8cf03fc0f16f72d81
parent474e5de72de95414c883fc2759f8a75b20ee42be
[ARM] ScheduleDAGRRList::DelayForLiveRegsBottomUp must consider OptionalDefs

Summary:
D30400 has enabled tADC and tSBC instructions to be unglued, thereby allowing CPSR to remain live between Thumb1 scheduling units.

Most Thumb1 instructions have an OptionalDef for CPSR; but the scheduler ignored the OptionalDefs, and could unwittingly insert a flag-setting instruction in between an ADDS and the corresponding ADC.

Reviewers: javed.absar, atrick, MatzeB, t.p.northover, jmolloy, rengolin

Reviewed By: javed.absar

Subscribers: rogfer01, efriedma, aemerson, rengolin, llvm-commits, MatzeB

Differential Revision: https://reviews.llvm.org/D31081

llvm-svn: 301106
llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
llvm/test/CodeGen/Thumb/optionaldef-scheduling.ll [new file with mode: 0644]