[PATCH] D41149: [CodeGen] Specialize mixed-sign mul-with-overflow (fix PR34920)

Vedant Kumar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 13 15:33:07 PST 2017

vsk added inline comments.

Comment at: test/CodeGen/builtins-overflow.c:402
+  int result;
+  if (__builtin_mul_overflow(y, x, &result))
+    return LongLongErrorCode;
efriedma wrote:
> I think the rules for __builtin_mul_overflow say you have to check whether the truncate changes the value of the result.
> Missing testcases for the case where the result is unsigned.
Thanks for the catch. I've updated my test driver to catch cases like this.


More information about the cfe-commits mailing list