It looks like gcc sometimes produces useless conditional branches.
I've found code like this:
xor%edx,%edx
; code with no effect on edx (see full code below)
test %edx,%edx
jnesomewhere else
The branch on the last line is never taken. Why does gcc generate such
code sequences
Alain Ketterlin wrote:
I've found code like this:
xor %edx,%edx
; code with no effect on edx (see full code below)
test %edx,%edx
jne somewhere else
I have experienced similar sequences where your
code with no effect was a lot of SSE instructions,
so I can confirm that the
On 03/02/2010 08:55 AM, Alain Ketterlin wrote:
It looks like gcc sometimes produces useless conditional branches.
I've found code like this:
xor%edx,%edx
; code with no effect on edx (see full code below)
test %edx,%edx
jnesomewhere else
The branch on the last line
Andrew Haley wrote:
On 03/02/2010 08:55 AM, Alain Ketterlin wrote:
It looks like gcc sometimes produces useless conditional branches.
I've found code like this:
xor%edx,%edx
; code with no effect on edx (see full code below)
test %edx,%edx
jnesomewhere else
The branch
On Tue, Mar 2, 2010 at 10:55 AM, Andrew Haley a...@redhat.com wrote:
On 03/02/2010 08:55 AM, Alain Ketterlin wrote:
It looks like gcc sometimes produces useless conditional branches.
I've found code like this:
xor %edx,%edx
; code with no effect on edx (see full code below)
test