Skip to content

Commit ed46b6e

Browse files
committed
tests
1 parent 8d928e4 commit ed46b6e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

llvm/unittests/CodeGen/SelectionDAGPatternMatchTest.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -582,11 +582,10 @@ TEST_F(SelectionDAGPatternMatchTest, matchReassociatableOp) {
582582

583583
SDLoc DL;
584584
auto Int32VT = EVT::getIntegerVT(Context, 32);
585-
auto Float32VT = EVT::getFloatingPointVT(32);
586585

587586
SDValue Op0 = DAG->getCopyFromReg(DAG->getEntryNode(), DL, 1, Int32VT);
588587
SDValue Op1 = DAG->getCopyFromReg(DAG->getEntryNode(), DL, 2, Int32VT);
589-
SDValue Op2 = DAG->getCopyFromReg(DAG->getEntryNode(), DL, 3, Float32VT);
588+
SDValue Op2 = DAG->getCopyFromReg(DAG->getEntryNode(), DL, 3, Int32VT);
590589
SDValue Op3 = DAG->getCopyFromReg(DAG->getEntryNode(), DL, 8, Int32VT);
591590

592591
// (Op0 + Op1) + (Op2 + Op3)
@@ -600,7 +599,7 @@ TEST_F(SelectionDAGPatternMatchTest, matchReassociatableOp) {
600599
ADD, m_ReassociatableAdd(m_Value(), m_Value(), m_Value(), m_Value())));
601600

602601
// Op0 + (Op1 + (Op2 + Op3))
603-
SDValue ADD123 = DAG->getNode(ISD::ADD, DL, Int32VT, Op2, ADD23);
602+
SDValue ADD123 = DAG->getNode(ISD::ADD, DL, Int32VT, Op1, ADD23);
604603
SDValue ADD0123 = DAG->getNode(ISD::ADD, DL, Int32VT, Op0, ADD123);
605604
EXPECT_TRUE(
606605
sd_match(ADD123, m_ReassociatableAdd(m_Value(), m_Value(), m_Value())));
@@ -618,7 +617,7 @@ TEST_F(SelectionDAGPatternMatchTest, matchReassociatableOp) {
618617
MUL, m_ReassociatableMul(m_Value(), m_Value(), m_Value(), m_Value())));
619618

620619
// Op0 * (Op1 * (Op2 * Op3))
621-
SDValue MUL123 = DAG->getNode(ISD::MUL, DL, Int32VT, Op2, MUL23);
620+
SDValue MUL123 = DAG->getNode(ISD::MUL, DL, Int32VT, Op1, MUL23);
622621
SDValue MUL0123 = DAG->getNode(ISD::MUL, DL, Int32VT, Op0, MUL123);
623622
EXPECT_TRUE(
624623
sd_match(MUL123, m_ReassociatableMul(m_Value(), m_Value(), m_Value())));
@@ -636,7 +635,7 @@ TEST_F(SelectionDAGPatternMatchTest, matchReassociatableOp) {
636635
AND, m_ReassociatableAnd(m_Value(), m_Value(), m_Value(), m_Value())));
637636

638637
// Op0 && (Op1 && (Op2 && Op3))
639-
SDValue AND123 = DAG->getNode(ISD::AND, DL, Int32VT, Op2, AND23);
638+
SDValue AND123 = DAG->getNode(ISD::AND, DL, Int32VT, Op1, AND23);
640639
SDValue AND0123 = DAG->getNode(ISD::AND, DL, Int32VT, Op0, AND123);
641640
EXPECT_TRUE(
642641
sd_match(AND123, m_ReassociatableAnd(m_Value(), m_Value(), m_Value())));
@@ -654,7 +653,7 @@ TEST_F(SelectionDAGPatternMatchTest, matchReassociatableOp) {
654653
OR, m_ReassociatableOr(m_Value(), m_Value(), m_Value(), m_Value())));
655654

656655
// Op0 || (Op1 || (Op2 || Op3))
657-
SDValue OR123 = DAG->getNode(ISD::OR, DL, Int32VT, Op2, OR23);
656+
SDValue OR123 = DAG->getNode(ISD::OR, DL, Int32VT, Op1, OR23);
658657
SDValue OR0123 = DAG->getNode(ISD::OR, DL, Int32VT, Op0, OR123);
659658
EXPECT_TRUE(
660659
sd_match(OR123, m_ReassociatableOr(m_Value(), m_Value(), m_Value())));

0 commit comments

Comments
 (0)