On 2/20/07, Revital1 Eres <[EMAIL PROTECTED]> wrote:
Hello, We saw that the reassociation pass does not operate on built-in functions, for example: vp3 = vec_madd (vp1, vp2, vp3); In the RTL level the function is expanded to regular insn: (insn 87 91 88 9 (set (reg/v:V4SF 217 [ vp3 ]) (plus:V4SF (mult:V4SF (reg/v:V4SF 219 [ vp1 ]) (reg/v:V4SF 218 [ vp2 ])) (reg/v:V4SF 217 [ vp3 ]))) -1 (nil) (nil)) The reassociation could open opportunity for the variable expansion optimization to be applied when vec_madd is in a loop. (this is what the reassociation pass do for similar accumulation instruction that is not in built-in function) Currently MVE fails as it expects the pattern: x = x + something while it finds: x = something + x I could fix this in the MVE code, but I was wondering about the relations of reassociation pass and built-in functions in general.
If you find builtin functions you want to reassociate, this is generally a good sign they should have been expanded to trees rather than kept as builtins. If you expanded them, they would have been reassociated (or at least, they should be. I think we reassociate vector calculations, but it's been a while since i looked).