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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 05:26:25 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) {
----------------
nikic wrote:

Why limit this to vectors only?

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


More information about the llvm-commits mailing list