After r368065, all the tests using GISelMITest must call setUp() before
doing anything, otherwise the TargetMachine is not going to be set up.
A few tests added after that commit were not doing that and ended up
testing effectively nothing.
Fix the setup of all the tests and fix the failing tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374595
91177308-0d34-0410-b5e6-
96231b3b80d8
}
TEST_F(GISelMITest, TestSignBitIsZero) {
+ setUp();
if (!TM)
return;
const LLT S32 = LLT::scalar(32);
- auto SignBit = B.buildConstant(S32, 0x8000000);
+ auto SignBit = B.buildConstant(S32, 0x80000000);
auto Zero = B.buildConstant(S32, 0);
GISelKnownBits KnownBits(*MF);
EXPECT_TRUE(KnownBits.signBitIsZero(Zero.getReg(0)));
- EXPECT_FALSE(KnownBits.signBitIsZero(Zero.getReg(0)));
EXPECT_FALSE(KnownBits.signBitIsZero(SignBit.getReg(0)));
- EXPECT_TRUE(KnownBits.signBitIsZero(SignBit.getReg(0)));
}
#endif
TEST_F(GISelMITest, DstOpSrcOp) {
+ setUp();
if (!TM)
return;
}
TEST_F(GISelMITest, BuildUnmerge) {
+ setUp();
if (!TM)
return;
}
TEST_F(GISelMITest, TestBuildFPInsts) {
+ setUp();
if (!TM)
return;
}
TEST_F(GISelMITest, BuildIntrinsic) {
+ setUp();
if (!TM)
return;
}
TEST_F(GISelMITest, BuildXor) {
+ setUp();
if (!TM)
return;
}
TEST_F(GISelMITest, BuildBitCounts) {
+ setUp();
if (!TM)
return;
}
TEST_F(GISelMITest, BuildCasts) {
+ setUp();
if (!TM)
return;
}
TEST_F(GISelMITest, BuildMinMax) {
+ setUp();
if (!TM)
return;
}
TEST_F(GISelMITest, BuildAtomicRMW) {
+ setUp();
if (!TM)
return;