[PATCH] D52075: [InstCombine] Support (sub (sext x), (sext y)) --> (sext (sub x, y)) and (sub (zext x), (zext y)) --> (zext (sub x, y))
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 14 00:01:57 PDT 2018
craig.topper created this revision.
craig.topper added a reviewer: spatel.
If the sub doesn't overflow in the original type we can move it above the sext/zext.
This is similar to what we do for add. The overflow checking for sub is currently weaker than add, so the test cases are constructed for what is supported.
Repository:
rL LLVM
https://reviews.llvm.org/D52075
Files:
lib/Transforms/InstCombine/InstCombineAddSub.cpp
test/Transforms/InstCombine/sink-zext.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52075.165431.patch
Type: text/x-patch
Size: 6851 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180914/93dd2f24/attachment.bin>
More information about the llvm-commits
mailing list