summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-10-13 22:37:51 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-10-13 22:37:51 +0000
commitdb0773089f8a1944fa3c73e5be78e88b258318ca (patch)
tree7af69fa517a84411f253ca47d27b8377474d2df1 /clang/lib/CodeGen/CGExpr.cpp
parentb75d8f300cbfba07aad4442a8ef600194e5a8a42 (diff)
downloadbcm5719-llvm-db0773089f8a1944fa3c73e5be78e88b258318ca.tar.gz
bcm5719-llvm-db0773089f8a1944fa3c73e5be78e88b258318ca.zip
InstCombine: Fix miscompile in X % -Y -> X % Y transform
We assumed that negation operations of the form (0 - %Z) resulted in a negative number. This isn't true if %Z was originally negative. Substituting the negative number into the remainder operation may result in undefined behavior because the dividend might be INT_MIN. This fixes PR21256. llvm-svn: 219639
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud