[PATCH] D83153: [DAGCombiner] Prevent regression in isMulAddWithConstProfitable
Ben Shi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 5 05:19:51 PDT 2020
benshi001 updated this revision to Diff 275545.
benshi001 added a comment.
Thanks for all of your suggestions. I have uploaded a new patch edition.
1. Seperate the test cases to show improvement in another patch.
Done. https://reviews.llvm.org/D83159
2. Make sure c1 and c2 do not exceed int64, to avoid assert failure.
Done. One more if-statment is added to check that.
3. Make a inverse transform if "opt -instcombine" has been performed.
Shall we seperate this inverse transform in another patch? At least this patch works
for "clang a.c -O2 -Wall --target=x86/riscv/aarch64" if a.c contains code pattern like
"(a + 999) * 888". At least this patch can prevent the regression in such circumstance.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83153/new/
https://reviews.llvm.org/D83153
Files:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/urem-seteq-nonzero.ll
llvm/test/CodeGen/X86/urem-seteq-nonzero.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83153.275545.patch
Type: text/x-patch
Size: 9301 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200705/9d397de7/attachment.bin>
More information about the llvm-commits
mailing list