summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/CodeGen
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-11-04 02:10:18 +0000
committerCraig Topper <craig.topper@intel.com>2018-11-04 02:10:18 +0000
commit1ba86188cf4db26c79323ba15c5a4545ac6a602f (patch)
treed140a2ee49f22d46a0faf728c8442c07af0ea0b4 /llvm/unittests/CodeGen
parent0ba9339cdeb0d5d3af3185a6c3814679c8777a6d (diff)
downloadbcm5719-llvm-1ba86188cf4db26c79323ba15c5a4545ac6a602f.tar.gz
bcm5719-llvm-1ba86188cf4db26c79323ba15c5a4545ac6a602f.zip
[SelectionDAG] Remove special methods for creating *_EXTEND_VECTOR_INREG nodes. Move asserts into getNode.
These methods were just wrappers around getNode with additional asserts (identical and repeated 3 times). But getNode already has a switch that can be used to hold these asserts that allows them to be shared for all 3 opcodes. This also enables checking on the places that create these nodes without using the wrappers. The rest of the patch is just changing all callers to use getNode directly. llvm-svn: 346087
Diffstat (limited to 'llvm/unittests/CodeGen')
-rw-r--r--llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp b/llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp
index 620dfc8d234..dc2d1f9a357 100644
--- a/llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp
+++ b/llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp
@@ -86,7 +86,7 @@ TEST_F(AArch64SelectionDAGTest, computeKnownBits_ZERO_EXTEND_VECTOR_INREG) {
auto InVecVT = EVT::getVectorVT(Context, Int8VT, 4);
auto OutVecVT = EVT::getVectorVT(Context, Int16VT, 2);
auto InVec = DAG->getConstant(0, Loc, InVecVT);
- auto Op = DAG->getZeroExtendVectorInReg(InVec, Loc, OutVecVT);
+ auto Op = DAG->getNode(ISD::ZERO_EXTEND_VECTOR_INREG, Loc, OutVecVT, InVec);
auto DemandedElts = APInt(4, 15);
KnownBits Known;
DAG->computeKnownBits(Op, Known, DemandedElts);
@@ -118,7 +118,7 @@ TEST_F(AArch64SelectionDAGTest, ComputeNumSignBits_SIGN_EXTEND_VECTOR_INREG) {
auto InVecVT = EVT::getVectorVT(Context, Int8VT, 4);
auto OutVecVT = EVT::getVectorVT(Context, Int16VT, 2);
auto InVec = DAG->getConstant(1, Loc, InVecVT);
- auto Op = DAG->getSignExtendVectorInReg(InVec, Loc, OutVecVT);
+ auto Op = DAG->getNode(ISD::SIGN_EXTEND_VECTOR_INREG, Loc, OutVecVT, InVec);
auto DemandedElts = APInt(4, 15);
EXPECT_EQ(DAG->ComputeNumSignBits(Op, DemandedElts), 15u);
}
OpenPOWER on IntegriCloud