This is a follow up to D62510 where UnaryOperator was added. It was suggested that we have common handling for UnaryOperator and BinaryOperator
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM, IMO it makes sense to add this helper here.
llvm/include/llvm/IR/IRBuilder.h | ||
---|---|---|
1386 | Maybe worth a comment that it either creates a binop or unaryop and Opc must be valid accordingly. | |
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | ||
3988 | nit: Could be just ` for (Value *Op : operands()) Ops.push_back(getOrCreateVectorValue(Op, Part)); |
Maybe worth a comment that it either creates a binop or unaryop and Opc must be valid accordingly.