[PATCH] D99388: [AArch64][GlobalISel] Combine funnel shifts to rotates.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 26 04:54:02 PDT 2021


foad added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:3883
+    return false;
+  return X == Y;
+}
----------------
Check this simple condition before the islegal test?


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:3894-3895
+                                         : TargetOpcode::G_ROTR));
+  MI.RemoveOperand(1);
+  MI.getOperand(2).setReg(ShiftReg);
+  Observer.changedInstr(MI);
----------------
I think all you have to do here is `MI.RemoveOperand(2)`. That'll move the previous operand 3 into position 2, won't it?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99388



More information about the llvm-commits mailing list