[PATCH] D48662: [InstCombine] reverse canonicalization of binops to allow more shuffle folding

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 29 09:02:37 PDT 2018


RKSimon added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineVectorOps.cpp:1155
+/// new binop. If not, return invalid elements.
+static BinopElts getAlternateBinop(BinaryOperator *BO, const DataLayout &DL) {
+  switch (BO->getOpcode()) {
----------------
Better to do this as an Optional<BinopElts> ?


https://reviews.llvm.org/D48662





More information about the llvm-commits mailing list