[PATCH] D55909: [ARMISelLowering] Add CPSR to live-ins of newly created blocks, if required.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 20 17:59:17 PST 2018


efriedma added inline comments.


================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:9009
+    exitMBB->addLiveIn(ARM::CPSR);
+  }
+
----------------
fhahn wrote:
> efriedma wrote:
> > Hang on... doesn't the loop clobber CPSR?  I think rather than add the live-in marking like this, we need to mark COPY_STRUCT_BYVAL_I32 with "Defs = [CPSR]".
> Yes, at least when not in Thumb1, we define CPSR in the loop. I guess something could still potentially use CPSR after the COPY_STRUCT_BYVAL, then we would still need it in the live-ins. Not sure if that would make sense though.
Presumably nothing is ever going to use the CPSR def of a COPY_STRUCT_BYVAL... we would have to add explicit logic for that, and the loop sets CPSR to a fixed value which isn't generally useful.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55909/new/

https://reviews.llvm.org/D55909





More information about the llvm-commits mailing list