Skip to content
Snippets Groups Projects
Commit 6e5f6274 authored by Jiufu Guo's avatar Jiufu Guo Committed by guojiufu
Browse files

rs6000: build constant via lis;rotldi

If a constant is possible to be rotated to/from a negative value from
"lis", then using "lis;rotldi" to build the constant.

The positive value of "lis" does not need to be analyzed.  Because if a
constant can be rotated from the positive value of "lis", it also can be
rotated from a positive value of "li".

gcc/ChangeLog:

	* config/rs6000/rs6000.cc (can_be_rotated_to_negative_lis): New
	function.
	(can_be_built_by_li_and_rotldi): Rename to ...
	(can_be_built_by_li_lis_and_rotldi): ... this function.
	(rs6000_emit_set_long_const): Call can_be_built_by_li_lis_and_rotldi.

gcc/testsuite/ChangeLog:

	* gcc.target/powerpc/const-build.c: Add more tests.
parent 25b91754
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