[PATCH] D137108: Implement support for AArch64ISD::MOVI in computeKnownBits

Adrian Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 1 07:21:00 PDT 2022


adriantong1024 added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:1979
+    Known =
+        KnownBits::makeConstant(APInt(Known.getBitWidth(), CN->getZExtValue()));
+    break;
----------------
dmgreen wrote:
> Does CN->getAPIntValue() work, or does it need to change the width of the APInt?
I think its needs to be the same width as Known. Otherwise Known bitwidth will be changed and cause trouble later.


================
Comment at: llvm/test/CodeGen/AArch64/shift-accumulate.ll:124
+
+; Expected to be able to deduce movi is generate a vector of integer
+; and turn USHR+ORR into USRA.
----------------
foad wrote:
> Pre-commit this test and rebase the current patch on top of it?
Hi Jay

Thank you for the comment. Do you mean I should change this test and commit it as a separate patch before the actual change (i.e. the implementation of the MOVI) ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137108



More information about the llvm-commits mailing list