diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2016-08-21 20:53:48 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2016-08-21 20:53:48 +0200 |
commit | 2561f329f131251888447e101853c4a5552503fd (patch) | |
tree | 0ce86c01daa99fdf5060affac80d210a533ad2c2 /gcc | |
parent | 21afd9113c18e79afb3b71386181da941fad3d16 (diff) | |
download | gcc-2561f329f131251888447e101853c4a5552503fd.zip gcc-2561f329f131251888447e101853c4a5552503fd.tar.gz gcc-2561f329f131251888447e101853c4a5552503fd.tar.bz2 |
re PR target/77270 (Flag -mprftchw is shared with 3dnow for -march=k8)
PR target/77270
* config/i386/i386.md (prefetch): When TARGET_PRFCHW or
TARGET_PREFETCHWT1 are disabled, emit 3dNOW! write prefetches for
non-SSE2 athlons only, otherwise prefer SSE prefetches.
From-SVN: r239643
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 16 |
2 files changed, 17 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2c27cb5..265cc29 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-08-21 Uros Bizjak <ubizjak@gmail.com> + + PR target/77270 + * config/i386/i386.md (prefetch): When TARGET_PRFCHW or + TARGET_PREFETCHWT1 are disabled, emit 3dNOW! write prefetches for + non-SSE2 athlons only, otherwise prefer SSE prefetches. + 2016-08-20 Kugan Vivekanandarajah <kuganv@linaro.org> * tree-vrp.c (vrp_visit_assignment_or_call): Changed to Return VR. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 36ae876..9454458 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -18634,20 +18634,24 @@ gcc_assert (IN_RANGE (locality, 0, 3)); /* Use 3dNOW prefetch in case we are asking for write prefetch not - supported by SSE counterpart or the SSE prefetch is not available - (K6 machines). Otherwise use SSE prefetch as it allows specifying - of locality. */ + supported by SSE counterpart (non-SSE2 athlon machines) or the + SSE prefetch is not available (K6 machines). Otherwise use SSE + prefetch as it allows specifying of locality. */ if (write) { if (TARGET_PREFETCHWT1) operands[2] = GEN_INT (MAX (locality, 2)); - else if (TARGET_3DNOW || TARGET_PRFCHW) + else if (TARGET_PRFCHW) operands[2] = GEN_INT (3); + else if (TARGET_3DNOW && !TARGET_SSE2) + operands[2] = GEN_INT (3); + else if (TARGET_PREFETCH_SSE) + operands[1] = const0_rtx; else { - gcc_assert (TARGET_PREFETCH_SSE); - operands[1] = const0_rtx; + gcc_assert (TARGET_3DNOW); + operands[2] = GEN_INT (3); } } else |