[PATCH] D50310: Improve the legalisation lowering of UMULO

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 8 12:59:34 PDT 2018


efriedma added a comment.
Herald added a subscriber: PkmX.

Please choose a different name for the tests; "muloti2.ll" isn't usefully indicating what the files actually test.

> Correctness of the algorithm was verified by exhaustively checking the output of this algorithm for overflowing multiplication of 16 bit integers against an obviously correct widening multiplication.

What exactly did you verify?  Looking again, I'm pretty sure your example IR doesn't compute the correct result: you never compute the product %LHS.HI * %RHS.HI.



================
Comment at: test/CodeGen/X86/muloti.ll:60
   %6 = call %1 @llvm.umul.with.overflow.i128(i128 %tmp, i128 %tmp2)
-; CHECK: cmov
-; CHECK: divti3
+; CHECK-NOT: divti3
   %7 = extractvalue %1 %6, 0
----------------
This test is pretty useless; could get rid of it, I guess, since it's covered by muloti2.ll.


https://reviews.llvm.org/D50310





More information about the llvm-commits mailing list