[PATCH] D47718: [Mips] Use UADDO/ADDCARRY instead of ADDC/ADDE

Amaury SECHET via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 6 15:08:06 PDT 2018


deadalnix added inline comments.


================
Comment at: lib/Target/Mips/MipsSEISelDAGToDAG.cpp:310
+    // to bit 20 of the dsp control register.
+    ReplaceUses(SDValue(Node, 1), extractCarryFlag(Result, 20, CurDAG));
+  }
----------------
sdardis wrote:
> You also need to clear bit 20 in the dsp control register after performing a addwc. On page 40 of the MIPS DSP AFP (MD00374-2B-MIPS32DSP-AFP-03.01.pdf) , it notes that the over/underflow flags are sticky.
Question is, does addsc clean the flag register ? If yes, then we are good, if not, then existing code is broken as well.


Repository:
  rL LLVM

https://reviews.llvm.org/D47718





More information about the llvm-commits mailing list