[PATCH] D31610: [InstCombine] Support folding add/and/or/xor with a constant vector RHS into selects

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 3 13:16:33 PDT 2017


spatel added a comment.

Can you add or change the bitwise logic tests to not have splat constants? That should allow us to expose the difference in a regression test (SimplifyDemanded doesn't handle non-splat afaik).
Also, for the bitwise logic tests, please add tests with a phi op, so we have some coverage for that part.

And actually, that makes the add/sub part of this seem suspicious and probably worth splitting into a separate patch. I think those cases should be calling foldOpWithConstantIntoOperand() to cover both selects and phis.


https://reviews.llvm.org/D31610





More information about the llvm-commits mailing list