dtcxzyw / llvm-opt-benchmark

An LLVM IR dataset for data-driven compiler optimization research
https://dtcxzyw.github.io/llvm-opt-benchmark/
MIT License
18 stars 3 forks source link

Grep PR107228 #1273

Closed dtcxzyw closed 1 week ago

dtcxzyw commented 1 week ago
define i64 @test(i64 %x, i64 %y) {
  %4 = add i64 %x, -1
  %5 = xor i64 %x, -1
  %not.i.i20 = and i64 %4, %5
  %shr.i.i21 = lshr i64 %not.i.i20, %y
  ret i64 %shr.i.i21
}

https://github.com/llvm/llvm-project/issues/107228

github-actions[bot] commented 1 week ago
linux/optimized/strnlen_user.ll
  %1 = add i64 %x, -1  ->  %31 = add i64 %.lcssa, -1
  %2 = xor i64 %x, -1  ->  %32 = xor i64 %.lcssa, -1
  %not.i.i20 = and i64 %1, %2  ->  %33 = and i64 %31, %32
  %shr.i.i21 = lshr i64 %not.i.i20, %y  ->  %34 = lshr i64 %33, 7

linux/optimized/strncpy_from_user.ll
  %1 = add i64 %x, -1  ->  %28 = add i64 %26, -1
  %2 = xor i64 %x, -1  ->  %29 = xor i64 %26, -1
  %not.i.i20 = and i64 %1, %2  ->  %30 = and i64 %28, %29
  %shr.i.i21 = lshr i64 %not.i.i20, %y  ->  %31 = lshr i64 %30, 7

linux/optimized/string.ll
  %1 = add i64 %x, -1  ->  %27 = add i64 %25, -1
  %2 = xor i64 %x, -1  ->  %28 = xor i64 %25, -1
  %not.i.i20 = and i64 %1, %2  ->  %29 = and i64 %27, %28
  %shr.i.i21 = lshr i64 %not.i.i20, %y  ->  %30 = lshr i64 %29, 7

c3c/optimized/bigint.c.ll
  %1 = add i64 %x, -1  ->  %7 = add i64 %5, -1
  %2 = xor i64 %x, -1  ->  %6 = xor i64 %5, -1
  %not.i.i20 = and i64 %1, %2  ->  %8 = and i64 %7, %6
  %shr.i.i21 = lshr i64 %not.i.i20, %y  ->  %9 = lshr i64 %8, 63

openssl/optimized/libcrypto-shlib-ecp_nistz256.ll
  %1 = add i64 %x, -1  ->  %38 = add i64 %or131, -1
  %2 = xor i64 %x, -1  ->  %39 = xor i64 %or131, -1
  %not.i.i20 = and i64 %1, %2  ->  %not.i102 = and i64 %38, %39
  %shr.i.i21 = lshr i64 %not.i.i20, %y  ->  %shr.i103 = lshr i64 %not.i102, 63

openssl/optimized/libcrypto-lib-ecp_nistz256.ll
  %1 = add i64 %x, -1  ->  %38 = add i64 %or131, -1
  %2 = xor i64 %x, -1  ->  %39 = xor i64 %or131, -1
  %not.i.i20 = and i64 %1, %2  ->  %not.i102 = and i64 %38, %39
  %shr.i.i21 = lshr i64 %not.i.i20, %y  ->  %shr.i103 = lshr i64 %not.i102, 63

openssl/optimized/libcrypto-lib-bn_lib.ll
  %1 = add i64 %x, -1  ->  %sub = add i64 %condition, -1
  %2 = xor i64 %x, -1  ->  %not = xor i64 %condition, -1
  %not.i.i20 = and i64 %1, %2  ->  %and = and i64 %sub, %not
  %shr.i.i21 = lshr i64 %not.i.i20, %y  ->  %shr = lshr i64 %and, 63

openssl/optimized/libcrypto-shlib-bn_lib.ll
  %1 = add i64 %x, -1  ->  %sub = add i64 %condition, -1
  %2 = xor i64 %x, -1  ->  %not = xor i64 %condition, -1
  %not.i.i20 = and i64 %1, %2  ->  %and = and i64 %sub, %not
  %shr.i.i21 = lshr i64 %not.i.i20, %y  ->  %shr = lshr i64 %and, 63

8 Occurrences