aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2017-03-09 15:02:25 +0000
committerSanjay Patel <spatel@rotateright.com>2017-03-09 15:02:25 +0000
commitdf21979db7856d80dea6ba4e1a710c6fe3913919 (patch)
tree6a14223a59df64216d649bfc907ccebc1b31dd79 /llvm/lib/CodeGen/MachineFunction.cpp
parentc206800218c862db45c19b31a11856bb805e7b02 (diff)
downloadllvm-df21979db7856d80dea6ba4e1a710c6fe3913919.zip
llvm-df21979db7856d80dea6ba4e1a710c6fe3913919.tar.gz
llvm-df21979db7856d80dea6ba4e1a710c6fe3913919.tar.bz2
[DAG] recognize div/rem by 0 as undef before trying constant folding
As discussed in the review thread for rL297026, this is actually 2 changes that would independently fix all of the test cases in the patch: 1. Return undef in FoldConstantArithmetic for div/rem by 0. 2. Move basic undef simplifications for div/rem (simplifyDivRem()) before foldBinopIntoSelect() as a matter of efficiency. I will handle the case of vectors with any zero element as a follow-up. That change is the DAG sibling for D30665 + adding a check of vector elements to FoldConstantVectorArithmetic(). I'm deleting the test for PR30693 because it does not test for the actual bug any more (dangers of using bugpoint). Differential Revision: https://reviews.llvm.org/D30741 llvm-svn: 297384
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions