[AArch64/GCC] PR64304, miscompilation with -mgeneral-regs-only
Jiong Wang
jiong.wang@arm.com
Wed Jan 14 15:50:00 GMT 2015
as discussed here https://gcc.gnu.org/ml/gcc-patches/2015-01/msg00563.html
the problem is aarch64 hardware only support left shift truncation for SI/DI,
while SHIFT_COUNT_TRUNCATED is enabled for all mode including QI/HI, which is
inconsistent with hardware feature.
there are two patterns defined for ashift:QI/HI, one for shift amount in register,
one for shift amount as constant.
this patch only remove the pattern for shift amount in register which cause the trouble.
no regression on bare metal test.
bootstrap OK.
ok for trunk?
2015-01-15 Jiong. Wang (jiong.wang@arm.com)
gcc/
PR64304
* config/aarch64/aarch64.md (define_insn "*ashl<mode>3_insn"): Deleted.
(ashl<mode>3): Don't expand if operands[2] is not constant.
gcc/testsuite/
* gcc.target/aarch64/pr64304.c: New testcase.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-md.patch
Type: text/x-patch
Size: 1423 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150114/34f8da26/attachment.bin>
More information about the Gcc-patches
mailing list