[PATCH] D80907: [PowerPC] refactor convertToImmediateForm - NFC

Qing Shan Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 7 18:39:35 PDT 2020


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

Thank you for doing this to make the code more clear. LGTM now.



================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.cpp:3396
+    InVal = InVal.rotl(SH);
+    uint64_t Mask = MB == 0 ? -1LLU : (1LLU << (63 - MB + 1)) - 1;
+    InVal &= Mask;
----------------
Maybe, this is another case that can be improved with the APInt utility to make the code more clear.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80907





More information about the llvm-commits mailing list