------- Comment #5 from fxcoudert at gcc dot gnu dot org 2006-11-04 18:21 ------- (In reply to comment #4) > Can't you use the same trick that the frontend already uses to detect the > matmul(transpose(a),b) thing?
The front-end doesn't "detect" the case you quote. It's only that transposition is done by creating a new array descriptor, pointing to the same data but with inverted strides; matmul being able to operate on all possible strides, it is indeed optimal. For conjugation, it's a bit more difficult. We really need the front-end to recognize if one argument of matmul is conjugated, and simplify the code itself by 1) removing the conjugation and 2) emitting a different matmul call. The fact that there is no BLAS routine for matmul(conj(a),b) but only matmul(tranpose(conj(a))) makes it a bit more difficult. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29550