aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-11-07 10:56:30 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-11-07 12:29:13 +0100
commitc25293e689b0b408c6228676536e928e4f042dfe (patch)
tree166607fb8a064dfe226c6419bd47fc5bf5621b12 /validation
parent84bf7462ebc80b350b0d2b35156bae04b8d5feb1 (diff)
downloadsparse-dev-c25293e689b0b408c6228676536e928e4f042dfe.tar.gz
select: simplify handling of constant cond or src1 == src2
If the operands of a select instruction are identical, then this select can be replaced by its operand. If the condition of a select is a constant, the this select can be replaced by one of its condition, depending on the truth value of the condition. This simplification is already done but: * when src1 == src2, the condition's value is tested although it may not be a constant. It's kinda OK because in all case one of the operand will be selected and both are identical but it's a bit weird and unclean. * since the instruction will be replaced, the usage of its condition and operands must be removed. This is done here but the kill_instruction() inside replace_with_pseudo() take already care of this. So, separate the two cases and simply use replace_with_pseudo() for both without bothering killing the operands. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
0 files changed, 0 insertions, 0 deletions