[PATCH] D108871: [AArch64] Implement target hook function to decide folding (mul (add x, c1), c2)

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 1 15:39:50 PDT 2021


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:12152
+// Return true if Imm can be composed by a single MOVZ instruction.
+static inline bool isMOVZImm(uint64_t Imm, unsigned Sz) {
+  assert((Sz == 64) || (Sz == 32) && "invalid immediate size");
----------------
Can this use AArch64TTIImpl::getIntImmCost in some way?


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

https://reviews.llvm.org/D108871



More information about the llvm-commits mailing list