[PATCH] D42109: [PowerPC] Follow-up to r322373 for materializing constants that set the CR

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 29 11:55:31 PDT 2018


hfinkel added inline comments.


================
Comment at: lib/Target/PowerPC/PPCInstrInfo.cpp:2501
+    if (SetCR) {
+    // We don't know anything about uses when we're out of SSA, so only replace
+    // if the new immediate will be reproduced.
----------------
Indentation looks off here.


================
Comment at: lib/Target/PowerPC/PPCInstrInfo.cpp:2516
+        else if (MRI->use_empty(MI.getOperand(0).getReg()))
+          NewImm = NewImm ? Immediate : 0;
+        else if (ImmChanged)
----------------
Could it be the case that NewImm is non-zero while Immediate is zero? Does it matter? (I'm guessing not, but given that NewImm is set in a variety of ways above, it's not completely obvious to me).


Repository:
  rL LLVM

https://reviews.llvm.org/D42109





More information about the llvm-commits mailing list