diff options
author | Roger Ferrer Ibanez <roger.ferreribanez@arm.com> | 2017-09-19 09:05:39 +0000 |
---|---|---|
committer | Roger Ferrer Ibanez <roger.ferreribanez@arm.com> | 2017-09-19 09:05:39 +0000 |
commit | 8d0180c955534978c52aed830fe91c081a044ede (patch) | |
tree | 8f8bff0f8e8cc13a4ac40ea1ed8b4113e744b76f /llvm/lib/CodeGen/LiveDebugVariables.cpp | |
parent | 142516b456e788788360ae49da02634c97626537 (diff) | |
download | llvm-8d0180c955534978c52aed830fe91c081a044ede.zip llvm-8d0180c955534978c52aed830fe91c081a044ede.tar.gz llvm-8d0180c955534978c52aed830fe91c081a044ede.tar.bz2 |
[ARM] Use ADDCARRY / SUBCARRY
This is a preparatory step for D34515.
This change:
- makes nodes ISD::ADDCARRY and ISD::SUBCARRY legal for i32
- lowering is done by first converting the boolean value into the carry flag
using (_, C) ← (ARMISD::ADDC R, -1) and converted back to an integer value
using (R, _) ← (ARMISD::ADDE 0, 0, C). An ARMISD::ADDE between the two
operations does the actual addition.
- for subtraction, given that ISD::SUBCARRY second result is actually a
borrow, we need to invert the value of the second operand and result before
and after using ARMISD::SUBE. We need to invert the carry result of
ARMISD::SUBE to preserve the semantics.
- given that the generic combiner may lower ISD::ADDCARRY and
ISD::SUBCARRYinto ISD::UADDO and ISD::USUBO we need to update their lowering
as well otherwise i64 operations now would require branches. This implies
updating the corresponding test for unsigned.
- add new combiner to remove the redundant conversions from/to carry flags
to/from boolean values (ARMISD::ADDC (ARMISD::ADDE 0, 0, C), -1) → C
- fixes PR34045
- fixes PR34564
Differential Revision: https://reviews.llvm.org/D35192
llvm-svn: 313618
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
0 files changed, 0 insertions, 0 deletions