[PATCH] D90156: [PowerPC] Do not fold `cmp(d|w)` and `subf` instruction to `subf.` if `nsw` is not present

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 29 05:06:32 PST 2020


nemanjai accepted this revision.
nemanjai added a comment.
This revision is now accepted and ready to land.

LGTM with a minor nit.



================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:2131
 
+  // This transformation should not be performed if `nsw` is missing. Since if
+  // there is overflow, CR bits do not reflect correct order.
----------------
Please add a note why this is OK when `equalityOnly` is set.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90156



More information about the llvm-commits mailing list