This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386] Fix emitting of prefetch instructions
- From: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Ilya Tocar <tocarip dot intel at gmail dot com>
- Date: Tue, 4 Mar 2014 12:04:43 +0300
- Subject: Re: [PATCH, i386] Fix emitting of prefetch instructions
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4Z+k9f1YMLZqNpWvb7XTMkk9XSKAn3FfwKAEK4pppbHBw at mail dot gmail dot com> <CAFULd4b6hhzT20-sUfu4xUsUET-whnoUDuP9YScTC9EeQCogKA at mail dot gmail dot com> <CAFULd4YJyA88BoX9=s_pSDngVN_-3ObgaQJVF1t69xQugt10Ew at mail dot gmail dot com>
Hello UroÅ,
On 04 Mar 01:13, Uros Bizjak wrote:
> On Tue, Mar 4, 2014 at 12:31 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> > They are all:
> >
> > FAIL: gcc.target/i386/avx512pf-vscatterpf0dpd-1.c (test for excess errors)
> > Excess errors:
> > /ssd/uros/gcc-build/gcc/include/avx512pfintrin.h:108:3: error: the
> > last argument must be hint 0 or 1
> >
> > They are due to _MM_HINT_ET0 fix, and probably show that the pattern
> > was not updated when hint constants were adjusted to 2 and 3.
> >
> > Kirill, can you please look at this inconsistency?
>
> Attached patch fixes these failures, and also fixes and improves error message.
>
> Uros.
> Index: i386.c
> ===================================================================
> --- i386.c (revision 208296)
> +++ i386.c (working copy)
> @@ -36022,7 +36022,7 @@ addcarryx:
>
> if (!insn_data[icode].operand[4].predicate (op4, mode4))
> {
> - error ("the last argument must be hint 0 or 1");
> + error ("incorrect hint operand");
> return const0_rtx;
> }
>
> Index: predicates.md
> ===================================================================
> --- predicates.md (revision 208295)
> +++ predicates.md (working copy)
> @@ -660,12 +660,12 @@
> return i == 2 || i == 4 || i == 8;
> })
>
> -;; Match 2, 3, 5, or 6
> -(define_predicate "const2356_operand"
> +;; Match 2, 3, 6, or 7
> +(define_predicate "const2367_operand"
> (match_code "const_int")
> {
> HOST_WIDE_INT i = INTVAL (op);
> - return i == 2 || i == 3 || i == 5 || i == 6;
> + return i == 2 || i == 3 || i == 6 || i == 7;
> })
This will break `immediate' compatibility w/ ICC, since
ICC using ET0=5.
But as far as IMHO using immediates instead of literals
is ugly, I think this is minor issue.
--
Thanks, K