dtcxzyw / llvm-opt-benchmark

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

Grep cascade selects (v2) #932

Open dtcxzyw opened 3 months ago

dtcxzyw commented 3 months ago
define i32 @src(i1 %cond1, i1 %cond2, i32 %a, i32 %b) {
entry:
   %switch.load = select i1 %cond1, i32 %b, i32 %a
   %.sink = select i1 %cond2, i32 %switch.load, i32 %a
   ret i32 %.sink
}

https://alive2.llvm.org/ce/z/DvnoN9

github-actions[bot] commented 3 months ago
zxing/optimized/DMDetector.cpp.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %639 = select i1 %638, i32 %632, i32 %630
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %.0266.i.i = select i1 %635, i32 %639, i32 %630

tree-sitter-rs/optimized/2jber9b3bsvatks5.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %.sroa.8443.1 = select i1 %.0124, i8 %.sroa.8443.01349, i8 1
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %spec.select651 = select i1 %.not2.i358, i8 %.sroa.8443.1, i8 1

gromacs/optimized/expfit.cpp.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %.0156 = select i1 %16, float %5, float %18
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %.sroa.speculated128 = select i1 %34, float %.0156, float %18

verilator/optimized/V3Trace.cpp.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %.sroa.0.0.i = select i1 %100, ptr %103, ptr null
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %..i50 = select i1 %106, ptr %.sroa.0.0.i, ptr null

php/optimized/pcre2_jit_compile.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %9 = select i1 %8, ptr %4, ptr %2
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %1314 = select i1 %1313, ptr %9, ptr %2

php/optimized/zend_inference.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %spec.select964410249 = select i1 %.not938810248, i32 %1380, i32 %1382
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %.1710251 = select i1 %.not938910250, i32 %spec.select964410249, i32 %1382

hyperscan/optimized/rose_build_matchers.cpp.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %nc.1.i.1 = select i1 %15, i8 %nc.1.i, i8 1
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %nc.1.i.2 = select i1 %20, i8 %nc.1.i.1, i8 1

hyperscan/optimized/rose_build_add_mask.cpp.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %fail.1 = select i1 %7, i8 %fail.0, i8 1
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %spec.select41 = select i1 %cmp25.not, i8 %fail.1, i8 1

stb/optimized/stb_truetype.c.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %scale_y.mux = select i1 %cmp1, float %scale_y, float %scale_x.addr.0
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %cond.i = select i1 %cmp.i, float %scale_y.mux, float %scale_x.addr.0

casadi/optimized/cvodes.c.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %735 = select i1 %734, i32 0, i32 2
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %spec.select.i.i = select i1 %.not87.i.i, i32 %735, i32 2

spike/optimized/f128_classify.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %11 = select i1 %9, i1 %10, i1 false
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %narrow = select i1 %or.cond, i1 %11, i1 false

spike/optimized/interactive.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %639 = select i1 %635, i1 %638, i1 false
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %brmerge467.not.i = select i1 %.not333.i, i1 %639, i1 false

wasmtime-rs/optimized/526qiozl2mm0d4p0.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %. = select i1 %trunc, i64 %41, i64 1
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %.0 = select i1 %663, i64 %., i64 1

mitsuba3/optimized/ptracer.cpp.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %241 = select i1 %240, i1 %238, i1 false
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %256 = select i1 %255, i1 %241, i1 false

mitsuba3/optimized/medium.cpp.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %.sroa.3210.0217 = select i1 %69, float %62, float 0.000000e+00
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %..i = select contract i1 %70, float %.sroa.3210.0217, float 0.000000e+00

mitsuba3/optimized/sdfgrid.cpp.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %1013 = select contract <4 x i1> %1011, <4 x float> %388, <4 x float> %1007
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %.sroa.4.0 = select i1 %1010, <4 x float> %1013, <4 x float> %1007

duckdb/optimized/ub_duckdb_aggr_distributive.cpp.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %frombool.i.i = select i1 %tobool.not.i.i57, i8 %8, i8 1
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %frombool.i.i.1 = select i1 %tobool.not.i.i57.1, i8 %frombool.i.i, i8 1

rocksdb/optimized/log_writer.cc.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %.not100.not101 = select i1 %cmp60, i1 %cmp61, i1 false
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %brmerge20.not = select i1 %begin.0, i1 %.not100.not101, i1 false

arrow/optimized/cast.cc.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %tobool5.i = select i1 %retval.0.i.i.i, i1 %tobool52.i, i1 false
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %tobool5.i22 = select i1 %cmp.i.i, i1 %tobool5.i, i1 false

arrow/optimized/api_scalar.cc.ll
  %switch.load = select i1 %cond1, i32 %b, i32 %a  ->  %tobool5.i = select i1 %4, i1 %tobool52.i, i1 false
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %tobool5.i12 = select i1 %cmp.i.i, i1 %tobool5.i, i1 false

20 Occurrences