This patch adds visitSelectInst() to find free Select IRs and continue the propagation of SimplifiedValues, ConstantOffsetPtrs, and SROAArgValues.
We don't need all operands of Select IR to be constants to fold it, so I don't use the generic CallAnalyzer::simplifyInstruction().
The impact on SPEC20xx is below
Benchmark | Code Size (%) | Perf (%) |
(+ is bigger) | (+ is faster) | |
spec2000/gcc | 0.01 | 1.08 |
spec2000/mesa | 0.04 | 2.2 |
spec2000/twolf | -0.15 | -0.01 |
spec2006/gcc | 0.02 | -0.19 |
spec2006/h264ref | 0.33 | 0.18 |
spec2017/blender | 0.01 | 0.5 |
spec2017/gcc | 0.01 | 0.09 |
spec2017/imagick | 0.02 | 0.01 |
spec2017/parest | 0 | -0.05 |
spec2017/perlbench | 0.1 | 0.56 |