Skip to content

Commit

Permalink
Merge pull request #422 from Wuerfel21/W21-missing-longcheck
Browse files Browse the repository at this point in the history
Add missing size==4 check
  • Loading branch information
totalspectrum authored Nov 23, 2023
2 parents c1af89c + 463602c commit 81087f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backends/asm/optimize_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -4637,7 +4637,7 @@ OptimizeReadWrite(IRList *irl)
if (nextread && CondIsSubset(ir->cond,nextread->cond)) {
// wrlong a, b ... rdlong c, b -> mov c, a
// rdlong a, b ... rdlong c, b -> mov c, a
if(size == nextsize && (!write || size==4 || gl_p2) && (gl_p2 || !InstrSetsFlags(nextread,FLAG_WC)) ) {
if(size == nextsize && (!write || size==4 || gl_p2) && ((gl_p2 && size==4) || !InstrSetsFlags(nextread,FLAG_WC)) ) {
nextread->src = dst1;
if (!write || size == 4) {
ReplaceOpcode(nextread, OPC_MOV);
Expand Down

0 comments on commit 81087f7

Please sign in to comment.