diff options
author | Weiming Zhao <weimingz@codeaurora.org> | 2014-01-13 18:47:54 +0000 |
---|---|---|
committer | Weiming Zhao <weimingz@codeaurora.org> | 2014-01-13 18:47:54 +0000 |
commit | 436f2975ace26abec6a686ef74fec728d5d52aa4 (patch) | |
tree | e60982a9cdcfbbf5e8b370ef60de2134997f9fca /lib | |
parent | 99c7fec2c94bd44fd16ba50340896287438e6a0e (diff) | |
download | llvm-436f2975ace26abec6a686ef74fec728d5d52aa4.tar.gz llvm-436f2975ace26abec6a686ef74fec728d5d52aa4.tar.bz2 llvm-436f2975ace26abec6a686ef74fec728d5d52aa4.tar.xz |
Fix PR 18369: [Thumbv8] asserts due to inconsistent CPSR liveness of IT blocks
The issue is caused when Post-RA scheduler reorders a bundle instruction
(IT block). However, it only flips the CPSR liveness of the bundle instruction,
leaves the instructions inside the bundle unchanged, which causes inconstancy and crashes
Thumb2SizeReduction.cpp::ReduceMBB().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199127 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/ARM/Thumb2SizeReduction.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/ARM/Thumb2SizeReduction.cpp b/lib/Target/ARM/Thumb2SizeReduction.cpp index 3ef822d94f..83b1a60891 100644 --- a/lib/Target/ARM/Thumb2SizeReduction.cpp +++ b/lib/Target/ARM/Thumb2SizeReduction.cpp @@ -980,6 +980,9 @@ bool Thumb2SizeReduce::ReduceMBB(MachineBasicBlock &MBB) { MachineOperand *MO = BundleMI->findRegisterDefOperand(ARM::CPSR); if (MO && !MO->isDead()) LiveCPSR = true; + MO = BundleMI->findRegisterUseOperand(ARM::CPSR); + if (MO && !MO->isKill()) + LiveCPSR = true; } bool DefCPSR = false; |