summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-01-03 23:11:32 +0000
committerVedant Kumar <vsk@apple.com>2018-01-03 23:11:32 +0000
commitbbafd50756b81519617bac03ed6d0ef987f0c45e (patch)
treefcbdd9b97c603222785ba009514ecd1e2538330d /lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py
parent9fb4e60d7d76e4a3f45f473fe016478f66b94c2f (diff)
downloadbcm5719-llvm-bbafd50756b81519617bac03ed6d0ef987f0c45e.tar.gz
bcm5719-llvm-bbafd50756b81519617bac03ed6d0ef987f0c45e.zip
[CGBuiltin] Handle unsigned mul overflow properly (PR35750)
r320902 fixed the IRGen for some types of checked multiplications. It did not handle unsigned overflow correctly in the case where the signed operand is negative (PR35750). Eli pointed out that on overflow, the result must be equal to the unique value that is equivalent to the mathematically-correct result modulo two raised to the k power, where k is the number of bits in the result type. This patch fixes the specialized IRGen from r320902 accordingly. Testing: Apart from check-clang, I modified the test harness from r320902 to validate the results of all multiplications -- not just the ones which don't overflow: https://gist.github.com/vedantk/3eb9c88f82e5c32f2e590555b4af5081 llvm.org/PR35750, rdar://34963321 Differential Revision: https://reviews.llvm.org/D41717 llvm-svn: 321771
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud