[llvm] e487356 - [SDAG] improve assert text for getSetCC type assumptions; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 15 08:01:34 PST 2022


Author: Sanjay Patel
Date: 2022-11-15T11:01:18-05:00
New Revision: e487356e13f86c6a3b484394cf0959e2bf04c6f7

URL: https://github.com/llvm/llvm-project/commit/e487356e13f86c6a3b484394cf0959e2bf04c6f7
DIFF: https://github.com/llvm/llvm-project/commit/e487356e13f86c6a3b484394cf0959e2bf04c6f7.diff

LOG: [SDAG] improve assert text for getSetCC type assumptions; NFC

Having identical text for these 2 conditions made it harder
to find the root problem for issue #58994.

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/SelectionDAG.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/SelectionDAG.h b/llvm/include/llvm/CodeGen/SelectionDAG.h
index a2ec7c4ce33a..640cb15e03c5 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAG.h
+++ b/llvm/include/llvm/CodeGen/SelectionDAG.h
@@ -1119,9 +1119,9 @@ class SelectionDAG {
                    ISD::CondCode Cond, SDValue Chain = SDValue(),
                    bool IsSignaling = false) {
     assert(LHS.getValueType().isVector() == RHS.getValueType().isVector() &&
-           "Cannot compare scalars to vectors");
+           "Vector/scalar operand type mismatch for setcc");
     assert(LHS.getValueType().isVector() == VT.isVector() &&
-           "Cannot compare scalars to vectors");
+           "Vector/scalar result type mismatch for setcc");
     assert(Cond != ISD::SETCC_INVALID &&
            "Cannot create a setCC of an invalid node.");
     if (Chain)


        


More information about the llvm-commits mailing list