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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 20 17:38:36 PST 2018


fhahn marked an inline comment as done.
fhahn added inline comments.


================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:9009
+    exitMBB->addLiveIn(ARM::CPSR);
+  }
+
----------------
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.


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

https://reviews.llvm.org/D55909





More information about the llvm-commits mailing list