Home | History | Annotate | Download | only in Support

Lines Matching refs:One

22   static ConstantRange One;
29 ConstantRange ConstantRangeTest::One(APInt(16, 0xa));
54 EXPECT_FALSE(One.isFullSet());
55 EXPECT_FALSE(One.isEmptySet());
56 EXPECT_FALSE(One.isWrappedSet());
57 EXPECT_FALSE(One.contains(APInt(16, 0x0)));
58 EXPECT_FALSE(One.contains(APInt(16, 0x9)));
59 EXPECT_TRUE(One.contains(APInt(16, 0xa)));
60 EXPECT_FALSE(One.contains(APInt(16, 0xaa9)));
61 EXPECT_FALSE(One.contains(APInt(16, 0xaaa)));
62 EXPECT_FALSE(One.inverse().contains(APInt(16, 0xa)));
86 EXPECT_EQ(One, One);
90 EXPECT_NE(Full, One);
93 EXPECT_NE(Empty, One);
96 EXPECT_NE(One, Some);
97 EXPECT_NE(One, Wrap);
104 EXPECT_EQ(*One.getSingleElement(), APInt(16, 0xa));
110 EXPECT_TRUE(One.isSingleElement());
118 EXPECT_EQ(One.getSetSize(), APInt(17, 1));
129 EXPECT_EQ(One.getUnsignedMax(), APInt(16, 0xa));
134 EXPECT_EQ(One.getUnsignedMin(), APInt(16, 0xa));
139 EXPECT_EQ(One.getSignedMax(), APInt(16, 0xa));
144 EXPECT_EQ(One.getSignedMin(), APInt(16, 0xa));
156 EXPECT_FALSE(One.isSignWrappedSet());
172 ConstantRange TOne = One.truncate(10);
177 EXPECT_EQ(TOne, ConstantRange(One.getLower().trunc(10),
178 One.getUpper().trunc(10)));
185 ConstantRange ZOne = One.zeroExtend(20);
190 EXPECT_EQ(ZOne, ConstantRange(One.getLower().zext(20),
191 One.getUpper().zext(20)));
204 ConstantRange SOne = One.signExtend(20);
210 EXPECT_EQ(SOne, ConstantRange(One.getLower().sext(20),
211 One.getUpper().sext(20)));
224 EXPECT_EQ(Empty.intersectWith(One), Empty);
229 EXPECT_EQ(Some.intersectWith(One), One);
230 EXPECT_EQ(Full.intersectWith(One), One);
233 EXPECT_EQ(One.intersectWith(Wrap), Empty);
234 EXPECT_EQ(One.intersectWith(Wrap), Wrap.intersectWith(One));
280 EXPECT_EQ(Wrap.unionWith(One),
282 EXPECT_EQ(One.unionWith(Wrap), Wrap.unionWith(One));
323 EXPECT_EQ(One.subtract(APInt(16, 4)),
331 EXPECT_EQ(Full.add(One), Full);
335 EXPECT_EQ(Empty.add(One), Empty);
343 EXPECT_EQ(One.add(APInt(16, 4)),
351 EXPECT_EQ(Full.sub(One), Full);
355 EXPECT_EQ(Empty.sub(One), Empty);
365 EXPECT_EQ(One.sub(APInt(16, 4)),
372 EXPECT_EQ(Full.multiply(One), Full);
376 EXPECT_EQ(Empty.multiply(One), Empty);
379 EXPECT_EQ(One.multiply(One), ConstantRange(APInt(16, 0xa*0xa),
381 EXPECT_EQ(One.multiply(Some), ConstantRange(APInt(16, 0xa*0xa),
383 EXPECT_EQ(One.multiply(Wrap), Full);
411 EXPECT_EQ(Empty.umax(One), Empty);
414 EXPECT_EQ(Some.umax(One), Some);
417 EXPECT_EQ(Wrap.umax(One), ConstantRange(APInt(16, 0xa), APInt(16, 0)));
418 EXPECT_EQ(One.umax(One), One);
427 EXPECT_EQ(Full.smax(One), ConstantRange(APInt(16, 0xa),
432 EXPECT_EQ(Empty.smax(One), Empty);
436 EXPECT_EQ(Some.smax(One), Some);
437 EXPECT_EQ(Wrap.smax(One), ConstantRange(APInt(16, 0xa),
439 EXPECT_EQ(One.smax(One), One);
445 EXPECT_EQ(Full.udiv(One), ConstantRange(APInt(16, 0),
451 EXPECT_EQ(Empty.udiv(One), Empty);
454 EXPECT_EQ(One.udiv(One), ConstantRange(APInt(16, 1)));
455 EXPECT_EQ(One.udiv(Some), ConstantRange(APInt(16, 0), APInt(16, 2)));
456 EXPECT_EQ(One.udiv(Wrap), ConstantRange(APInt(16, 0), APInt(16, 0xb)));
465 EXPECT_EQ(Full.shl(One), Full); // TODO: [0, (-1 << 0xa) + 1)
469 EXPECT_EQ(Empty.shl(One), Empty);
472 EXPECT_EQ(One.shl(One), ConstantRange(APInt(16, 0xa << 0xa),
474 EXPECT_EQ(One.shl(Some), Full); // TODO: [0xa << 0xa, 0)
475 EXPECT_EQ(One.shl(Wrap), Full); // TODO: [0xa, 0xa << 14 + 1)
484 EXPECT_EQ(Full.lshr(One), ConstantRange(APInt(16, 0),
490 EXPECT_EQ(Empty.lshr(One), Empty);
493 EXPECT_EQ(One.lshr(One), ConstantRange(APInt(16, 0)));
494 EXPECT_EQ(One.lshr(Some), ConstantRange(APInt(16, 0)));
495 EXPECT_EQ(One.lshr(Wrap), ConstantRange(APInt(16, 0), APInt(16, 0xb)));