r156323 - Reassociate FP operands.

Owen/All,
I've been working on adding support for reassociation with unsafe math
(see: http://reviews.llvm.org/D4129).

Do you know if this change, r156323, is still necessary? Specifically, do
we need the reassociation pass to canonicalize FP operands for CSE to work
effectively? This kinda scares me if it does! :frowning:

Side note:
Without this canonicalization, I did see a 3% regression in Mesa because
the slp-vectorizer's cost model is sensitive to the ordering of operands.
I'm working on reducing a test case now.

Chad

Hi Chad,

As far as I’m aware, CSE is still sensitive to operand sorting to operate effectively. If you have a replacement for this functionality, we could probably remove it, but I don’t think we can simply live without it.

—Owen

Thanks, Owen. I'll make sure the canonicalization persists after my change.