cisco-open / llvm-crash-analyzer

llvm crash analysis
Apache License 2.0
40 stars 17 forks source link

[RegEq] Handle Load with same Dest and SrcBase Reg #17

Closed niktesic closed 1 year ago

niktesic commented 1 year ago

Please, consider case where Load instruction has the same register as a Destination and a Source Base, like in the example below.

$rax = MOV64rm $rax, 1, $noreg, -8,

Currently, after such instruction, we are setting equivalence relation between $rax and deref->$rax+(-8). This is not valid, because Source operand uses old value of $rax and Destination operand represents a new (redefined) value of $rax.

This patch handles such cases by only setting identity equivalence $rax == $rax, without considering it equal to the Source operand.