Lines Matching refs:Some
24 static ConstantRange Some; member in __anonab7e7ab80111::ConstantRangeTest
31 ConstantRange ConstantRangeTest::Some(APInt(16, 0xa), APInt(16, 0xaaa)); member in __anonab7e7ab80111::ConstantRangeTest
65 EXPECT_FALSE(Some.isFullSet()); in TEST_F()
66 EXPECT_FALSE(Some.isEmptySet()); in TEST_F()
67 EXPECT_FALSE(Some.isWrappedSet()); in TEST_F()
68 EXPECT_FALSE(Some.contains(APInt(16, 0x0))); in TEST_F()
69 EXPECT_FALSE(Some.contains(APInt(16, 0x9))); in TEST_F()
70 EXPECT_TRUE(Some.contains(APInt(16, 0xa))); in TEST_F()
71 EXPECT_TRUE(Some.contains(APInt(16, 0xaa9))); in TEST_F()
72 EXPECT_FALSE(Some.contains(APInt(16, 0xaaa))); in TEST_F()
88 EXPECT_EQ(Some, Some); in TEST_F()
92 EXPECT_NE(Full, Some); in TEST_F()
95 EXPECT_NE(Empty, Some); in TEST_F()
97 EXPECT_NE(One, Some); in TEST_F()
99 EXPECT_NE(Some, Wrap); in TEST_F()
106 EXPECT_EQ(Some.getSingleElement(), static_cast<APInt *>(nullptr)); in TEST_F()
112 EXPECT_FALSE(Some.isSingleElement()); in TEST_F()
120 EXPECT_EQ(Some.getSetSize(), APInt(17, 0xaa0)); in TEST_F()
131 EXPECT_EQ(Some.getUnsignedMax(), APInt(16, 0xaa9)); in TEST_F()
136 EXPECT_EQ(Some.getUnsignedMin(), APInt(16, 0xa)); in TEST_F()
141 EXPECT_EQ(Some.getSignedMax(), APInt(16, 0xaa9)); in TEST_F()
146 EXPECT_EQ(Some.getSignedMin(), APInt(16, 0xa)); in TEST_F()
158 EXPECT_FALSE(Some.isSignWrappedSet()); in TEST_F()
174 ConstantRange TSome = Some.truncate(10); in TEST_F()
187 ConstantRange ZSome = Some.zeroExtend(20); in TEST_F()
193 EXPECT_EQ(ZSome, ConstantRange(Some.getLower().zext(20), in TEST_F()
194 Some.getUpper().zext(20))); in TEST_F()
206 ConstantRange SSome = Some.signExtend(20); in TEST_F()
213 EXPECT_EQ(SSome, ConstantRange(Some.getLower().sext(20), in TEST_F()
214 Some.getUpper().sext(20))); in TEST_F()
229 EXPECT_EQ(Empty.intersectWith(Some), Empty); in TEST_F()
232 EXPECT_EQ(Some.intersectWith(Some), Some); in TEST_F()
233 EXPECT_EQ(Some.intersectWith(One), One); in TEST_F()
235 EXPECT_EQ(Full.intersectWith(Some), Some); in TEST_F()
236 EXPECT_EQ(Some.intersectWith(Wrap), Empty); in TEST_F()
289 EXPECT_EQ(Some.unionWith(Wrap), Full); in TEST_F()
323 EXPECT_EQ(Some.subtract(APInt(16, 4)), in TEST_F()
336 EXPECT_EQ(Full.add(Some), Full); in TEST_F()
340 EXPECT_EQ(Empty.add(Some), Empty); in TEST_F()
343 EXPECT_EQ(Some.add(APInt(16, 4)), in TEST_F()
356 EXPECT_EQ(Full.sub(Some), Full); in TEST_F()
360 EXPECT_EQ(Empty.sub(Some), Empty); in TEST_F()
363 EXPECT_EQ(Some.sub(APInt(16, 4)), in TEST_F()
365 EXPECT_EQ(Some.sub(Some), in TEST_F()
377 EXPECT_EQ(Full.multiply(Some), Full); in TEST_F()
381 EXPECT_EQ(Empty.multiply(Some), Empty); in TEST_F()
385 EXPECT_EQ(One.multiply(Some), ConstantRange(APInt(16, 0xa*0xa), in TEST_F()
388 EXPECT_EQ(Some.multiply(Some), Full); in TEST_F()
389 EXPECT_EQ(Some.multiply(Wrap), Full); in TEST_F()
394 EXPECT_EQ(Zero.multiply(Some), Zero); in TEST_F()
397 EXPECT_EQ(Some.multiply(Zero), Zero); in TEST_F()
416 EXPECT_EQ(Full.umax(Some), ConstantRange(APInt(16, 0xa), APInt(16, 0))); in TEST_F()
418 EXPECT_EQ(Full.umax(Some), ConstantRange(APInt(16, 0xa), APInt(16, 0))); in TEST_F()
420 EXPECT_EQ(Empty.umax(Some), Empty); in TEST_F()
423 EXPECT_EQ(Some.umax(Some), Some); in TEST_F()
424 EXPECT_EQ(Some.umax(Wrap), ConstantRange(APInt(16, 0xa), APInt(16, 0))); in TEST_F()
425 EXPECT_EQ(Some.umax(One), Some); in TEST_F()
435 EXPECT_EQ(Full.smax(Some), ConstantRange(APInt(16, 0xa), in TEST_F()
441 EXPECT_EQ(Empty.smax(Some), Empty); in TEST_F()
444 EXPECT_EQ(Some.smax(Some), Some); in TEST_F()
445 EXPECT_EQ(Some.smax(Wrap), ConstantRange(APInt(16, 0xa), in TEST_F()
447 EXPECT_EQ(Some.smax(One), Some); in TEST_F()
456 EXPECT_EQ(Full.umin(Some), ConstantRange(APInt(16, 0), APInt(16, 0xaaa))); in TEST_F()
459 EXPECT_EQ(Empty.umin(Some), Empty); in TEST_F()
462 EXPECT_EQ(Some.umin(Some), Some); in TEST_F()
463 EXPECT_EQ(Some.umin(Wrap), ConstantRange(APInt(16, 0), APInt(16, 0xaaa))); in TEST_F()
464 EXPECT_EQ(Some.umin(One), One); in TEST_F()
474 EXPECT_EQ(Full.smin(Some), ConstantRange(APInt(16, (uint64_t)INT16_MIN), in TEST_F()
478 EXPECT_EQ(Empty.smin(Some), Empty); in TEST_F()
481 EXPECT_EQ(Some.smin(Some), Some); in TEST_F()
482 EXPECT_EQ(Some.smin(Wrap), ConstantRange(APInt(16, (uint64_t)INT16_MIN), in TEST_F()
484 EXPECT_EQ(Some.smin(One), One); in TEST_F()
497 EXPECT_EQ(Full.udiv(Some), ConstantRange(APInt(16, 0), in TEST_F()
502 EXPECT_EQ(Empty.udiv(Some), Empty); in TEST_F()
505 EXPECT_EQ(One.udiv(Some), ConstantRange(APInt(16, 0), APInt(16, 2))); in TEST_F()
507 EXPECT_EQ(Some.udiv(Some), ConstantRange(APInt(16, 0), APInt(16, 0x111))); in TEST_F()
508 EXPECT_EQ(Some.udiv(Wrap), ConstantRange(APInt(16, 0), APInt(16, 0xaaa))); in TEST_F()
516 EXPECT_EQ(Full.shl(Some), Full); // TODO: [0, (-1 << 0xa) + 1) in TEST_F()
520 EXPECT_EQ(Empty.shl(Some), Empty); in TEST_F()
524 EXPECT_EQ(One.shl(Some), Full); // TODO: [0xa << 0xa, 0) in TEST_F()
526 EXPECT_EQ(Some.shl(Some), Full); // TODO: [0xa << 0xa, 0xfc01) in TEST_F()
527 EXPECT_EQ(Some.shl(Wrap), Full); // TODO: [0xa, 0x7ff << 0x5 + 1) in TEST_F()
536 EXPECT_EQ(Full.lshr(Some), ConstantRange(APInt(16, 0), in TEST_F()
541 EXPECT_EQ(Empty.lshr(Some), Empty); in TEST_F()
544 EXPECT_EQ(One.lshr(Some), ConstantRange(APInt(16, 0))); in TEST_F()
546 EXPECT_EQ(Some.lshr(Some), ConstantRange(APInt(16, 0), in TEST_F()
548 EXPECT_EQ(Some.lshr(Wrap), ConstantRange(APInt(16, 0), APInt(16, 0xaaa))); in TEST_F()