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

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 13 12:34:47 PST 2017


efriedma added inline comments.


================
Comment at: test/CodeGen/builtins-overflow.c:402
+  int result;
+  if (__builtin_mul_overflow(y, x, &result))
+    return LongLongErrorCode;
----------------
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.


https://reviews.llvm.org/D41149





More information about the cfe-commits mailing list