[Bug target/78037] Incorrect code generated at optimization level -O2 for tzcnt and binary and
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Oct 20 10:24:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78037
--- Comment #12 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Richard Biener from comment #11)
> Back to target because:
>
> @defmac CLZ_DEFINED_VALUE_AT_ZERO (@var{mode}, @var{value})
> @defmacx CTZ_DEFINED_VALUE_AT_ZERO (@var{mode}, @var{value})
> A C expression that indicates whether the architecture defines a value
> for @code{clz} or @code{ctz} with a zero operand.
> ...
> Note that regardless of this macro the ``definedness'' of @code{clz}
> and @code{ctz} at zero do @emph{not} extend to the builtin functions
> visible to the user. Thus one may be free to adjust the value at will
> to match the target expansion of these operations without fear of
> breaking the API@.
Hohum. Tricky.
So, should we proceed with my RTX patch? I plan to xfail the failing tests and
file a missing-optimization PR with the hope someone will add target-dependent
folding to ix86_fold_buitin.
More information about the Gcc-bugs
mailing list