[PATCH] D155626: [DAG][AArch64] Fix truncated vscale constant types

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 05:48:21 PDT 2023


sdesmalen added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1945
                                 bool ConstantFold) {
-  assert(MulImm.getSignificantBits() <= VT.getSizeInBits() &&
+  assert((MulImm.getSignificantBits() <= VT.getSizeInBits() || VT == MVT::i1) &&
          "Immediate does not fit VT");
----------------
I guess this still needs an additional check that for MVT::i1 the immediate fits, i.e. `... || (VT == MVT::i1 && MulImm <= 1)` ?


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

https://reviews.llvm.org/D155626



More information about the llvm-commits mailing list