reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Declarations

unittests/IR/ConstantRangeTest.cpp
   23   static ConstantRange Empty;

References

unittests/IR/ConstantRangeTest.cpp
  153   EXPECT_FALSE(Empty.isFullSet());
  154   EXPECT_TRUE(Empty.isEmptySet());
  155   EXPECT_TRUE(Empty.inverse().isFullSet());
  156   EXPECT_FALSE(Empty.isWrappedSet());
  157   EXPECT_FALSE(Empty.contains(APInt(16, 0x0)));
  158   EXPECT_FALSE(Empty.contains(APInt(16, 0x9)));
  159   EXPECT_FALSE(Empty.contains(APInt(16, 0xa)));
  160   EXPECT_FALSE(Empty.contains(APInt(16, 0xaa9)));
  161   EXPECT_FALSE(Empty.contains(APInt(16, 0xaaa)));
  194   EXPECT_EQ(Empty, Empty);
  194   EXPECT_EQ(Empty, Empty);
  198   EXPECT_NE(Full, Empty);
  202   EXPECT_NE(Empty, One);
  203   EXPECT_NE(Empty, Some);
  204   EXPECT_NE(Empty, Wrap);
  212   EXPECT_EQ(Empty.getSingleElement(), static_cast<APInt *>(nullptr));
  214   EXPECT_EQ(Empty.getSingleMissingElement(), static_cast<APInt *>(nullptr));
  227   EXPECT_FALSE(Empty.isSingleElement());
  261   EXPECT_FALSE(Empty.isSignWrappedSet());
  278   EXPECT_FALSE(Empty.isUpperWrapped());
  283   EXPECT_FALSE(Empty.isUpperSignWrapped());
  300   ConstantRange TEmpty = Empty.truncate(10);
  330   ConstantRange ZEmpty = Empty.zeroExtend(20);
  349   ConstantRange SEmpty = Empty.signExtend(20);
  371   EXPECT_EQ(Empty.intersectWith(Full), Empty);
  371   EXPECT_EQ(Empty.intersectWith(Full), Empty);
  372   EXPECT_EQ(Empty.intersectWith(Empty), Empty);
  372   EXPECT_EQ(Empty.intersectWith(Empty), Empty);
  372   EXPECT_EQ(Empty.intersectWith(Empty), Empty);
  373   EXPECT_EQ(Empty.intersectWith(One), Empty);
  373   EXPECT_EQ(Empty.intersectWith(One), Empty);
  374   EXPECT_EQ(Empty.intersectWith(Some), Empty);
  374   EXPECT_EQ(Empty.intersectWith(Some), Empty);
  375   EXPECT_EQ(Empty.intersectWith(Wrap), Empty);
  375   EXPECT_EQ(Empty.intersectWith(Wrap), Empty);
  381   EXPECT_EQ(Some.intersectWith(Wrap), Empty);
  382   EXPECT_EQ(One.intersectWith(Wrap), Empty);
  582   EXPECT_EQ(Empty.unionWith(Empty), Empty);
  582   EXPECT_EQ(Empty.unionWith(Empty), Empty);
  582   EXPECT_EQ(Empty.unionWith(Empty), Empty);
  599   EXPECT_EQ(Full.difference(Empty), Full);
  600   EXPECT_EQ(Full.difference(Full), Empty);
  601   EXPECT_EQ(Empty.difference(Empty), Empty);
  601   EXPECT_EQ(Empty.difference(Empty), Empty);
  601   EXPECT_EQ(Empty.difference(Empty), Empty);
  602   EXPECT_EQ(Empty.difference(Full), Empty);
  602   EXPECT_EQ(Empty.difference(Full), Empty);
  617   EXPECT_EQ(Empty.subtract(APInt(16, 4)), Empty);
  617   EXPECT_EQ(Empty.subtract(APInt(16, 4)), Empty);
  629   EXPECT_EQ(Full.add(Empty), Empty);
  629   EXPECT_EQ(Full.add(Empty), Empty);
  633   EXPECT_EQ(Empty.add(Empty), Empty);
  633   EXPECT_EQ(Empty.add(Empty), Empty);
  633   EXPECT_EQ(Empty.add(Empty), Empty);
  634   EXPECT_EQ(Empty.add(One), Empty);
  634   EXPECT_EQ(Empty.add(One), Empty);
  635   EXPECT_EQ(Empty.add(Some), Empty);
  635   EXPECT_EQ(Empty.add(Some), Empty);
  636   EXPECT_EQ(Empty.add(Wrap), Empty);
  636   EXPECT_EQ(Empty.add(Wrap), Empty);
  637   EXPECT_EQ(Empty.add(APInt(16, 4)), Empty);
  637   EXPECT_EQ(Empty.add(APInt(16, 4)), Empty);
  761   EXPECT_EQ(Empty.addWithNoWrap(Some, OBO::NoSignedWrap), Empty);
  761   EXPECT_EQ(Empty.addWithNoWrap(Some, OBO::NoSignedWrap), Empty);
  762   EXPECT_EQ(Some.addWithNoWrap(Empty, OBO::NoSignedWrap), Empty);
  762   EXPECT_EQ(Some.addWithNoWrap(Empty, OBO::NoSignedWrap), Empty);
  816   EXPECT_EQ(Empty.addWithNoWrap(Some, OBO::NoUnsignedWrap), Empty);
  816   EXPECT_EQ(Empty.addWithNoWrap(Some, OBO::NoUnsignedWrap), Empty);
  817   EXPECT_EQ(Some.addWithNoWrap(Empty, OBO::NoUnsignedWrap), Empty);
  817   EXPECT_EQ(Some.addWithNoWrap(Empty, OBO::NoUnsignedWrap), Empty);
  905   EXPECT_EQ(Full.sub(Empty), Empty);
  905   EXPECT_EQ(Full.sub(Empty), Empty);
  909   EXPECT_EQ(Empty.sub(Empty), Empty);
  909   EXPECT_EQ(Empty.sub(Empty), Empty);
  909   EXPECT_EQ(Empty.sub(Empty), Empty);
  910   EXPECT_EQ(Empty.sub(One), Empty);
  910   EXPECT_EQ(Empty.sub(One), Empty);
  911   EXPECT_EQ(Empty.sub(Some), Empty);
  911   EXPECT_EQ(Empty.sub(Some), Empty);
  912   EXPECT_EQ(Empty.sub(Wrap), Empty);
  912   EXPECT_EQ(Empty.sub(Wrap), Empty);
  913   EXPECT_EQ(Empty.sub(APInt(16, 4)), Empty);
  913   EXPECT_EQ(Empty.sub(APInt(16, 4)), Empty);
  926   EXPECT_EQ(Full.multiply(Empty), Empty);
  926   EXPECT_EQ(Full.multiply(Empty), Empty);
  930   EXPECT_EQ(Empty.multiply(Empty), Empty);
  930   EXPECT_EQ(Empty.multiply(Empty), Empty);
  930   EXPECT_EQ(Empty.multiply(Empty), Empty);
  931   EXPECT_EQ(Empty.multiply(One), Empty);
  931   EXPECT_EQ(Empty.multiply(One), Empty);
  932   EXPECT_EQ(Empty.multiply(Some), Empty);
  932   EXPECT_EQ(Empty.multiply(Some), Empty);
  933   EXPECT_EQ(Empty.multiply(Wrap), Empty);
  933   EXPECT_EQ(Empty.multiply(Wrap), Empty);
  971   EXPECT_EQ(Full.umax(Empty), Empty);
  971   EXPECT_EQ(Full.umax(Empty), Empty);
  975   EXPECT_EQ(Empty.umax(Empty), Empty);
  975   EXPECT_EQ(Empty.umax(Empty), Empty);
  975   EXPECT_EQ(Empty.umax(Empty), Empty);
  976   EXPECT_EQ(Empty.umax(Some), Empty);
  976   EXPECT_EQ(Empty.umax(Some), Empty);
  977   EXPECT_EQ(Empty.umax(Wrap), Empty);
  977   EXPECT_EQ(Empty.umax(Wrap), Empty);
  978   EXPECT_EQ(Empty.umax(One), Empty);
  978   EXPECT_EQ(Empty.umax(One), Empty);
  990   EXPECT_EQ(Full.smax(Empty), Empty);
  990   EXPECT_EQ(Full.smax(Empty), Empty);
  996   EXPECT_EQ(Empty.smax(Empty), Empty);
  996   EXPECT_EQ(Empty.smax(Empty), Empty);
  996   EXPECT_EQ(Empty.smax(Empty), Empty);
  997   EXPECT_EQ(Empty.smax(Some), Empty);
  997   EXPECT_EQ(Empty.smax(Some), Empty);
  998   EXPECT_EQ(Empty.smax(Wrap), Empty);
  998   EXPECT_EQ(Empty.smax(Wrap), Empty);
  999   EXPECT_EQ(Empty.smax(One), Empty);
  999   EXPECT_EQ(Empty.smax(One), Empty);
 1011   EXPECT_EQ(Full.umin(Empty), Empty);
 1011   EXPECT_EQ(Full.umin(Empty), Empty);
 1014   EXPECT_EQ(Empty.umin(Empty), Empty);
 1014   EXPECT_EQ(Empty.umin(Empty), Empty);
 1014   EXPECT_EQ(Empty.umin(Empty), Empty);
 1015   EXPECT_EQ(Empty.umin(Some), Empty);
 1015   EXPECT_EQ(Empty.umin(Some), Empty);
 1016   EXPECT_EQ(Empty.umin(Wrap), Empty);
 1016   EXPECT_EQ(Empty.umin(Wrap), Empty);
 1017   EXPECT_EQ(Empty.umin(One), Empty);
 1017   EXPECT_EQ(Empty.umin(One), Empty);
 1029   EXPECT_EQ(Full.smin(Empty), Empty);
 1029   EXPECT_EQ(Full.smin(Empty), Empty);
 1033   EXPECT_EQ(Empty.smin(Empty), Empty);
 1033   EXPECT_EQ(Empty.smin(Empty), Empty);
 1033   EXPECT_EQ(Empty.smin(Empty), Empty);
 1034   EXPECT_EQ(Empty.smin(Some), Empty);
 1034   EXPECT_EQ(Empty.smin(Some), Empty);
 1035   EXPECT_EQ(Empty.smin(Wrap), Empty);
 1035   EXPECT_EQ(Empty.smin(Wrap), Empty);
 1036   EXPECT_EQ(Empty.smin(One), Empty);
 1036   EXPECT_EQ(Empty.smin(One), Empty);
 1050   EXPECT_EQ(Full.udiv(Empty), Empty);
 1050   EXPECT_EQ(Full.udiv(Empty), Empty);
 1056   EXPECT_EQ(Empty.udiv(Empty), Empty);
 1056   EXPECT_EQ(Empty.udiv(Empty), Empty);
 1056   EXPECT_EQ(Empty.udiv(Empty), Empty);
 1057   EXPECT_EQ(Empty.udiv(One), Empty);
 1057   EXPECT_EQ(Empty.udiv(One), Empty);
 1058   EXPECT_EQ(Empty.udiv(Some), Empty);
 1058   EXPECT_EQ(Empty.udiv(Some), Empty);
 1059   EXPECT_EQ(Empty.udiv(Wrap), Empty);
 1059   EXPECT_EQ(Empty.udiv(Wrap), Empty);
 1136   EXPECT_EQ(Full.urem(Empty), Empty);
 1136   EXPECT_EQ(Full.urem(Empty), Empty);
 1137   EXPECT_EQ(Empty.urem(Full), Empty);
 1137   EXPECT_EQ(Empty.urem(Full), Empty);
 1139   EXPECT_EQ(Full.urem(ConstantRange(APInt(16, 0))), Empty);
 1172   EXPECT_EQ(Full.srem(Empty), Empty);
 1172   EXPECT_EQ(Full.srem(Empty), Empty);
 1173   EXPECT_EQ(Empty.srem(Full), Empty);
 1173   EXPECT_EQ(Empty.srem(Full), Empty);
 1175   EXPECT_EQ(Full.srem(ConstantRange(APInt(16, 0))), Empty);
 1248   EXPECT_EQ(Full.shl(Empty), Empty);
 1248   EXPECT_EQ(Full.shl(Empty), Empty);
 1252   EXPECT_EQ(Empty.shl(Empty), Empty);
 1252   EXPECT_EQ(Empty.shl(Empty), Empty);
 1252   EXPECT_EQ(Empty.shl(Empty), Empty);
 1253   EXPECT_EQ(Empty.shl(One), Empty);
 1253   EXPECT_EQ(Empty.shl(One), Empty);
 1254   EXPECT_EQ(Empty.shl(Some), Empty);
 1254   EXPECT_EQ(Empty.shl(Some), Empty);
 1255   EXPECT_EQ(Empty.shl(Wrap), Empty);
 1255   EXPECT_EQ(Empty.shl(Wrap), Empty);
 1271   EXPECT_EQ(Full.lshr(Empty), Empty);
 1271   EXPECT_EQ(Full.lshr(Empty), Empty);
 1277   EXPECT_EQ(Empty.lshr(Empty), Empty);
 1277   EXPECT_EQ(Empty.lshr(Empty), Empty);
 1277   EXPECT_EQ(Empty.lshr(Empty), Empty);
 1278   EXPECT_EQ(Empty.lshr(One), Empty);
 1278   EXPECT_EQ(Empty.lshr(One), Empty);
 1279   EXPECT_EQ(Empty.lshr(Some), Empty);
 1279   EXPECT_EQ(Empty.lshr(Some), Empty);
 1280   EXPECT_EQ(Empty.lshr(Wrap), Empty);
 1280   EXPECT_EQ(Empty.lshr(Wrap), Empty);
 1292   EXPECT_EQ(Full.ashr(Empty), Empty);
 1292   EXPECT_EQ(Full.ashr(Empty), Empty);
 1301   EXPECT_EQ(Empty.ashr(Empty), Empty);
 1301   EXPECT_EQ(Empty.ashr(Empty), Empty);
 1301   EXPECT_EQ(Empty.ashr(Empty), Empty);
 1302   EXPECT_EQ(Empty.ashr(One), Empty);
 1302   EXPECT_EQ(Empty.ashr(One), Empty);
 1303   EXPECT_EQ(Empty.ashr(Some), Empty);
 1303   EXPECT_EQ(Empty.ashr(Some), Empty);
 1304   EXPECT_EQ(Empty.ashr(Wrap), Empty);
 1304   EXPECT_EQ(Empty.ashr(Wrap), Empty);
 1785   EXPECT_MAY_OVERFLOW(Some.unsignedAddMayOverflow(Empty));
 1786   EXPECT_MAY_OVERFLOW(Empty.unsignedAddMayOverflow(Some));
 1819   EXPECT_MAY_OVERFLOW(Some.unsignedSubMayOverflow(Empty));
 1820   EXPECT_MAY_OVERFLOW(Empty.unsignedSubMayOverflow(Some));
 1854   EXPECT_MAY_OVERFLOW(Some.signedAddMayOverflow(Empty));
 1855   EXPECT_MAY_OVERFLOW(Empty.signedAddMayOverflow(Some));
 1906   EXPECT_MAY_OVERFLOW(Some.signedSubMayOverflow(Empty));
 1907   EXPECT_MAY_OVERFLOW(Empty.signedSubMayOverflow(Some));
 2136   EXPECT_TRUE(Empty.isAllNegative());
 2137   EXPECT_TRUE(Empty.isAllNonNegative());