On Tue, 11 Sep 2012, Richard Guenther wrote:
On Tue, Sep 11, 2012 at 1:07 PM, Marc Glisse <marc.gli...@inria.fr> wrote:
Hello,
here is a patch that turns {v[1],v[0]} into vec_perm_expr(v,v,{1,0}) if the
target is ok with it.
I am attaching 2 versions of the patch. p-good is the one that passes
testing. p-bad, where I rely on fold_stmt to detect identity permutations,
ICEs towards the end of the pass while checking a bogus gimple stmt (one
that gimple_debug_stmt crashes on if I call it in gdb). From a performance
point of view, p-good makes sense, but I liked the simplicity of p-bad and I
am confused as to why it fails.
Probably because you cannot simply increase num_ops ...
Ah... thanks, it makes sense now... For some reason I thought it was a
fixed size structure and num_ops just told it how many of the fields were
in use.
[...]
Ok with that change.
Just to be sure, that means you prefer the version where I manually detect
identity and don't call fold, right?
Thank you for all the quick reviews,
--
Marc Glisse