[clang] [llvm] [ConstantRange] Estimate tighter lower (upper) bounds for masked binary and (or) (PR #120352)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 30 14:43:59 PST 2024


================
@@ -2720,6 +2720,22 @@ TEST_F(ConstantRangeTest, binaryAnd) {
   EXPECT_EQ(R16_32.binaryAnd(R0_99), R0_32);
   EXPECT_EQ(R0_99.binaryAnd(R16_32), R0_32);
 
+  // 'And' with leading bits are masked (with common leading bits stripped)
----------------
MaskRay wrote:

What happens with signed ranges? Add a test?

https://github.com/llvm/llvm-project/pull/120352


More information about the llvm-commits mailing list