https://bugs.llvm.org/show_bug.cgi?id=49273

            Bug ID: 49273
           Summary: ConstantRangeTest.cpp missing things in "exhaustive"
                    test
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedb...@nondot.org
          Reporter: paul_robin...@playstation.sony.com
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

In ConstantRangeTest.cpp, `testBinarySetOperationExhaustive` appears to be
iterating through a bunch of combinations of ConstantRange in order to test
some other operation.

Leading up to line 585, there is the following code:

    // Unsigned: Non-wrapped set, then smaller set, then any set.
    bool Variant1Full = Variant1.isFullSet() || Variant1.isWrappedSet();
    bool Variant2Full = Variant2.isFullSet() || Variant2.isWrappedSet();
    if (!Variant1Full && Variant2Full)
      EXPECT_EQ(Variant1, UnsignedCR);
    else if (Variant1Full && !Variant2Full)
      EXPECT_EQ(Variant2, UnsignedCR);  // << line 585
    ...

That test assertion is never executed, because Variant2Full is always true.
In fact you can `assert(Variant2Full);` immediately after its assignment,
and the assertion never triggers.

This suggests that the code to iterate through the Variant1/Variant2 
combinations isn't hitting everything it should be, or possibly there is
some other problem.  This is an area I have no context for, so I have no
patches to suggest.

Found by the Rotten Green Tests project.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to