[llvm] [DAG] Expand vXi1 add/sub overflow operations as xor/and (PR #69191)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 18 02:48:26 PDT 2023


================
@@ -9854,6 +9854,27 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTList,
       SDValue ZeroOverFlow = getConstant(0, DL, VTList.VTs[1]);
       return getNode(ISD::MERGE_VALUES, DL, VTList, {N1, ZeroOverFlow}, Flags);
     }
+
+    if (VTList.VTs[0].isVector() &&
+        VTList.VTs[0].getVectorElementType() == MVT::i1 &&
+        VTList.VTs[1].getVectorElementType() == MVT::i1) {
----------------
RKSimon wrote:

Would you prefer if I generalized this for scalars as well?

https://github.com/llvm/llvm-project/pull/69191


More information about the llvm-commits mailing list