[PATCH] D71885: [PowerPC] replace rlwinm operand 1 with src rlwinm operand 1

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 29 23:30:39 PST 2019


MaskRay added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:964
+        if (Simplified) {
+          NumRotatesCollapsed++;
+          if (CanSrcBeDeleted) {
----------------
The coding standard uses pre-increment operators.


================
Comment at: llvm/test/CodeGen/PowerPC/fold-rlwinm.mir:136
     %2:gprc = RLWINM %1:gprc, 27, 5, 10
-    ; CHECK: %2:gprc = RLWINM %1, 27, 5, 10
+    ; CHECK-NOT: %2:gprc = RLWINM %1, 27, 5, 10
     %3:gprc = RLWINMo %2:gprc, 8, 5, 10, implicit-def $cr0
----------------
This `-NOT` pattern is too specific. Do you intend to make it general so that it can catch more problems if the exact instruction changes a bit in the future?


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

https://reviews.llvm.org/D71885





More information about the llvm-commits mailing list