[PATCH] D159406: [SelectionDAG] Generalise SelectionDAG::computeOverflowKind to support other opcodes

Mohamed Atef via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 08:35:54 PDT 2023


elhewaty added a comment.

@RKSimon Hi I don't fully understand the testing infrastructure. I think I need some help.
for the following test:

  %t = call { i16, i1 } @llvm.smul.with.overflow.i16(i16 -256, i16 -128)
    %val = extractvalue {i16, i1} %t, 0
    %obit = extractvalue {i16, i1} %t, 1
    ret i1 %obit

This should be handled with "SignBits == BitWidth + 1", right?
how should I write this?



================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:5450
+        DAG.getSetCC(DL, CarryVT, And, DAG.getConstant(0, DL, VT), ISD::SETNE));
   }
 
----------------
Isn't this a wrong formatting it becomes this every time I use git clang-format


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

https://reviews.llvm.org/D159406



More information about the llvm-commits mailing list