[PATCH] D52075: [InstCombine] Support (sub (sext x), (sext y)) --> (sext (sub x, y)) and (sub (zext x), (zext y)) --> (zext (sub x, y))

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 14 15:30:18 PDT 2018


spatel added a comment.

Logic seems right, but we already had a big pile of repeated code.
I think we can handle sub the same way as add/mul after:
https://reviews.llvm.org/rL342292
The only extra work will be swapping the constant operand to LHS for sub?


Repository:
  rL LLVM

https://reviews.llvm.org/D52075





More information about the llvm-commits mailing list