Commit c5913732 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

ia32: Add peephole optimization 'testl $0x0000XX00, %eRx' -> 'testb $0xXX, %Rh'.

parent 05b412cb
......@@ -18,6 +18,7 @@ libFirm 1.22.1 (2016-01-07)
* Add peephole optimization 'lea (%r1, %r2), %r1' -> 'add %r2, %r1' and the commutated case (amd64)
* Add peephole optimization 'lea c(, %i, 2), %d' -> 'lea c(%i, %i), %d' (ia32)
* Add peephole optimization 'lea (%b), %d' -> 'mov %b, %d' (ia32)
* Add peephole optimization 'testl $0x0000XX00, %eRx' -> 'testb $0xXX, %Rh' (ia32)
* Bugfixes
libFirm 1.22.0 (2015-12-31)
......
......@@ -468,6 +468,10 @@ set_mode_low:
/* Technically we should build a Test8Bit because of the register
* constraints, but nobody changes registers at this point anymore. */
set_ia32_ls_mode(node, mode_Bu);
} else if ((offset & 0xFFFF80FF) == 0) {
/* testl $0x0000XX00, %eRx -> testb 0xXX, %Rh */
set_test_imm(node, offset >> 8);
set_ia32_ls_mode(node, ia32_mode_8h);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment