[PATCH] D13757: [x86] promote 'add nsw' to a wider type to allow more combines
Zia Ansari via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 15 12:17:36 PDT 2015
zansari added a comment.
Just another +1 on Quentin's comment regarding it being nice to see fewer extends in DAGCombine to expose more opportunities.
Given the explained complexity with that, these changes seem reasonable, to me. Just made one small comment/comment.
Thanks,
Zia.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:25702
@@ +25701,3 @@
+ // Don't make the 'add' bigger if there's no hope of combining it with some
+ // other 'add' or 'shl' instruction.
+ // TODO: It may be profitable to generate simpler LEA instructions in place
----------------
How about also SUB instructions to catch the simple constant merging case, similar to the one in add_nsw_consts?
http://reviews.llvm.org/D13757
More information about the llvm-commits
mailing list