Commit f5e2f2d0 authored by liuhongt's avatar liuhongt
Browse files

Fix ICE in ix86_attr_length_immediate_default.

ix86_attr_length_immediate_default assume TYPE ishift only have 1
constant operand,
but *x86_64_shld_1/*x86_shld_1/*x86_64_shrd_1/*x86_shrd_1 has 2, with
condition: INTVAL (operands[3]) == 32 - INTVAL (operands[2]) or
INTVAL (operands[3]) == 64 - INTVAL (operands[2]), and hit
gcc_assert.
Explicitly set_attr length_immediate for these patterns.

gcc/ChangeLog:

	PR target/103463
	PR target/103484
	* config/i386/i386.md (*x86_64_shld_1): Set_attr
	length_immediate to 1.
	(*x86_shld_1): Ditto.
	(*x86_64_shrd_1): Ditto.
	(*x86_shrd_1): Ditto.

gcc/testsuite/ChangeLog:

	* gcc.target/i386/pr103463.c: New test.
	* gcc.target/i386/pr103463-2.c: New test.
parent 0fc26e6f
Supports Markdown
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