Issue 179427
Summary [DAG] Add SelectionDAG::getConstantBuildVector(EVT VT, const SDLoc &DL, ArrayRef<APInt> Ops, const APInt &UndefElts)
Labels llvm:SelectionDAG
Assignees
Reporter RKSimon
    As detailed on #178617 - we sometimes need to create constant build vectors after legalisation, and the vector integer element type might not be legal at this stage and will rely on ISD::BUILD_VECTOR's implicit truncation.

Instead we should do something similar to SelectionDAG::getConstant() which handles the vector element type legalisation for us.

We also need to handle undef (and poison?) elements in some cases.

As well as #178617, there are a number of places in DAGCombiner/TargetLowering that have getConstant + getBuildVector calls  that can be converted to make use of this (e.g. tryToFoldExtendOfConstant).

CC @zhaoqi5

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to