Skip to content
Snippets Groups Projects
Commit 892ee5ff authored by Andrew Pinski's avatar Andrew Pinski
Browse files

i386: Fix pr101950-2.c [PR115028]


So what is happening here is that after r15-268-g9dbff9c05520a7,
a move instruction still exists after combine and the register
allocator choses different register allocation order for the xor
and because the input operand of lzcntq is not the same as output
operand, there is an extra xor that happens (due to an errata).

This fixes the testcase by using loading from a pointer instead
of a function argument directly. The register allocator has more
freedom since the load has no hard register associated with it (rdi)
so it can be in eax register right away.

Tested for both -m32 and -m64 on x86_64-linux-gnu.

gcc/testsuite/ChangeLog:

	PR testsuite/115028
	* gcc.target/i386/pr101950-2.c: Use a pointer argument instead
	of the argument directly.

Signed-off-by: default avatarAndrew Pinski <quic_apinski@quicinc.com>
parent df4565ea
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment