[PATCH] D14603: [X86ISelLowering] Add additional support for multiplication-to-shift conversion.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 01:09:44 PST 2015


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM - with a couple of minor diffs.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:24771
@@ +24770,3 @@
+    assert(MulAmt != 0 && MulAmt != 0xFFFFFFFF &&
+           "Both should have already been handled!");
+    if (isPowerOf2_64(MulAmt - 1))
----------------
Rephrase the assert message to make it clear that they are the cases that would involve overflow.

================
Comment at: test/CodeGen/X86/imul.ll:150
@@ +149,2 @@
+    ret i32 %mul
+}
----------------
Please add overflow test cases - I don't see them in this file although they maybe somewhere else?

================
Comment at: test/CodeGen/X86/imul.ll:151
@@ +150,1 @@
+}
\ No newline at end of file

----------------
Missing newline


http://reviews.llvm.org/D14603





More information about the llvm-commits mailing list