[llvm-bugs] [Bug 34920] New: __builtin_mul_overflow not lowered correctly
llvm-bugs at lists.llvm.org
Wed Oct 11 16:51:14 PDT 2017
Bug ID: 34920
Summary: __builtin_mul_overflow not lowered correctly
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: vsk at apple.com
CC: llvm-bugs at lists.llvm.org
Created attachment 19264
We're miscompiling calls to __builtin_mul_overflow(), specifically when both
arguments have the same width but differ in signed-ness:
https://godbolt.org/g/cfmEEf (I've also attached the example file).
W're emitting calls to overflow intrinsics which return i33, i65, and i129.
These are lowered into runtime calls which aren't correct: for example,
___mulodi4 doesn't correctly report overflow for 33-bit arguments.
Should we require that arguments to the overflow intrinsics have the same
signed-ness if they have the same width? Or should we provide backend and
runtime support for these exotic overflow checks?
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs