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 #931

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 %a, i32 %b
   %.sink = select i1 %cond2, i32 %switch.load, i32 %a
   ret i32 %.sink
}

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

github-actions[bot] commented 3 months ago
icu/optimized/usearch.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %spec.select107 = select i1 %cmp104, i8 0, i8 %spec.select
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %spec.select108 = select i1 %cmp118.not, i8 %spec.select107, i8 0

icu/optimized/number_mapper.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %cond105 = select i1 %cmp101, i32 -1, i32 %13
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %cond107 = select i1 %cmp98.inv, i32 %cond105, i32 -1

soc-simulator/optimized/Vmycpu_top___024root__DepSet_hcf0db31f__0__Slow.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %370 = select i1 %.not2870, i32 0, i32 %369
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %371 = select i1 %367, i32 %370, i32 0

soc-simulator/optimized/Vmycpu_top___024root__DepSet_hcf0db31f__0.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %4574 = select i1 %.not5940, i32 0, i32 %4573
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %4575 = select i1 %4571, i32 %4574, i32 0

soc-simulator/optimized/sim_mycpu.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %96 = select i1 %95, i32 0, i32 2
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %97 = select i1 %93, i32 %96, i32 0

zxing/optimized/DMDetector.cpp.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %639 = select i1 %638, i32 %632, i32 %630
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %.0.i.i = select i1 %635, i32 %639, i32 %632

gromacs/optimized/bonded.cpp.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %370 = select <8 x i1> %366, <8 x float> zeroinitializer, <8 x float> <float 0x3FF921FB60000000, float 0x3FF921FB60000000, float 0x3FF921FB60000000, float 0x3FF921FB60000000, float 0x3FF921FB60000000, float 0x3FF921FB60000000, float 0x3FF921FB60000000, float 0x3FF921FB60000000>
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %371 = select <8 x i1> %367, <8 x float> %370, <8 x float> zeroinitializer

gromacs/optimized/slasq4.cpp.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %115 = select i1 %114, float %.0405, float %113
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %.1406 = select i1 %112, float %115, float %.0405

gromacs/optimized/reduce.cpp.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %spec.select = select i1 %34, ptr %1, ptr %0
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %spec.select. = select i1 %67, ptr %spec.select, ptr %1

gromacs/optimized/dlasq4.cpp.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %112 = select i1 %111, double %.0408, double %110
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %.1409 = select i1 %109, double %112, double %.0408

gromacs/optimized/decidesimulationworkload.cpp.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %spec.select = select i1 %101, i8 0, i8 %17
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %spec.select41 = select i1 %cond.fr, i8 %spec.select, i8 0

gromacs/optimized/mshift.cpp.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %spec.select.i.i = select i1 %or.cond51.not.i.i, i32 -1, i32 1
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %.044.i.i = select i1 %or.cond.i.i, i32 %spec.select.i.i, i32 -1

gromacs/optimized/md_support.cpp.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %spec.select35 = select i1 %or.cond.i24.not, i32 %.1, i32 %2
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %.2 = select i1 %10, i32 %spec.select35, i32 %.1

gromacs/optimized/nbnxm_setup.cpp.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %74 = select i1 %70, i32 3, i32 2
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %.sroa.06.0.extract.trunc.i = select i1 %.not4.i.i, i32 %74, i32 3

gromacs/optimized/ewald.cpp.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %.mux.val = select i1 %202, i64 %.val411, i64 %.val412
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %.sroa.0.0 = select i1 %.not238, i64 %.mux.val, i64 %.val411

verilator/optimized/V3Number.cpp.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %507 = select i1 %38, i8 32, i8 48
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %spec.select = select i1 %506, i8 %507, i8 32

verilator/optimized/V3EmitCModel.cpp.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %spec.select = select i1 %811, ptr @.str.3, ptr @.str.498
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %812 = select i1 %809, ptr %spec.select, ptr @.str.3

php/optimized/cgi_main.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %spec.select.i = select i1 %or.cond.i, ptr %202, ptr %201
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %spec.select399.i = select i1 %.not363.i, ptr %spec.select.i, ptr %202

verilator/optimized/V3Const__gen.cpp.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %41 = select i1 %.not7, i32 32, i32 %40
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %46 = select i1 %45, i32 %41, i32 32

php/optimized/string.ll
  %switch.load = select i1 %cond1, i32 %a, i32 %b  ->  %spec.select = select i1 %or.cond8, ptr %71, ptr %83
  %.sink = select i1 %cond2, i32 %switch.load, i32 %a  ->  %.0188 = select i1 %85, ptr %spec.select, ptr %71

20 Occurrences