Skip to content
Snippets Groups Projects
Commit 21de01f5 authored by Haochen Jiang's avatar Haochen Jiang
Browse files

i386: Add ISA check for newly introduced prefetch builtins.

Hi all,

As Hongtao said, the fail on pentiumpro is caused by missing ISA check
since we are using emit_insn () through new builtins and it won't check
if the TARGET matches. Previously, the builtin in middle-end will check
that.

On pentiumpro, we won't have anything that supports any prefetch so that
it dropped into the pattern and then failed.

I have added the restrictions just like what middle-end builtin_prefetch
does. Also I added missing checks for PREFETCHI. Ok for trunk?

BRs,
Haochen

gcc/ChangeLog:

	* config/i386/i386-builtin.def (BDESC): Add
	OPTION_MASK_ISA2_PREFETCHI for prefetchi builtin.
	* config/i386/i386-expand.cc (ix86_expand_builtin):
	Add ISA check before emit_insn.
	* config/i386/prfchiintrin.h: Add target for intrin.

gcc/testsuite/ChangeLog:

	* gcc.target/i386/prefetchi-5.c: New test.
parent f225b813
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