[PATCH] D34515: [ARM] Materialise some boolean values to avoid a branch
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 6 12:32:13 PDT 2017
efriedma added a comment.
If you're seeing references to apsr, you aren't lowering ADDCARRY correctly.
ARMISD::ADDE has three operands; two integers, and apsr. It has two results: an integer, and the resulting apsr. If you're lowering ADDCARRY to ARMISD::ADDE, you actually need three operations: one to convert the boolean carry input to an apsr, one ARMISD::ADDE to perform the actual operation, and one operation to convert the result apsr to a boolean. See LowerADDSUBCARRY for how the x86 backend does this.
(Afterwards, you use a target dagcombine to eliminate the redundant operations.)
https://reviews.llvm.org/D34515
More information about the llvm-commits
mailing list