This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Concerns we have is: Do we need separate pass (which I am currently implementing) to transform if-then-else to use 'conditional modify expr' for vectorizer or not?
I suspect that your vectorizer will want something much stronger than what we will ever get from phiopts. Phiopts is simply trying to tidy up simple situations.
--
Something that you should watch is that COND_EXPR is *not* predication, and you can't force it to be predication on most targets. Depending on what papers you're reading, this may significantly affect what you're planning on doing.
The big distinction involves trapping expressions and operands. E.g.
if (test) T_1 = *p; else T_2 = 0; T_3 = PHI (T_1, T_2);
cannot be transformed to
T_1 = *p; T_3 = test ? T_1 : 0; unless you can show either that (1) dereferencing *p will never trap, or (2) some other dereference of *p dominates this test. Similar examples can be shown with arithmetic such as divide, or fp arithmetic without -ffast-math (i.e. when we can't discount NaNs).
-- Devang
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |