On Tue, 7 May 2013, Marc Glisse wrote:

        * fold-const.c (operand_equal_p): Use element_precision.
        (fold_binary_loc): Handle vector types.

Note that this causes a regression in some cases: it now recognizes LROTATE_EXPR for vectors, but then on x86_64 it isn't a supported vector operation so it is lowered to scalar rotations, which is worse than the shift+shift+or that we started with. But it only means that the vector lowering is bad, not that the patch is wrong. I didn't check if the vectorizer was clever enough to split rotations into shifts+or when that helps.

--
Marc Glisse

Reply via email to