[PATCH] [x86] Fold extract_vector_elt of a load into the load's address computation.

Quentin Colombet qcolombet at apple.com
Fri May 9 11:28:50 PDT 2014


Hi Michael,

This LGTM with one remark, I leave it to you whether or not you want to address it since Nadav already gave his LGTM.

I do not particularly like the use of the lambda here. I think it would have been clearer to explicitly add the few more variables that we use (ConstEltNode, NewLowd, EltNo) and have a new (documented) private member function.
I see two advantages of using a member function instead of the lambda:
- DAGCombiner::visitEXTRACT_VECTOR_ELT would be easier to read and understand.
- The member function can be properly documented.

What do you think?

Thanks,
-Quentin

http://reviews.llvm.org/D3375






More information about the llvm-commits mailing list