[PATCH] D79587: [CodeGen][SVE] Legalisation of extends with scalable types

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 2 13:43:15 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:10695
+    // Truncate to prevent a DUP with an over wide constant
+    SDValue Trunc = DAG.getNode(ISD::TRUNCATE, DL, EltTy, Dup->getOperand(0));
+
----------------
It's not legal to generate operations with type EltTy after legalization.  You get away with it here because it's guaranteed to constant-fold... but probably less confusing to use APInt::trunc instead.


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

https://reviews.llvm.org/D79587





More information about the cfe-commits mailing list