summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-05-21 02:24:44 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-05-21 02:24:44 +0000
commitbe6c7a12cb2bf9cae7db4268f290c30ed57e6d0e (patch)
tree004c1c697ed62657d3bb5887854e44d8fa914349 /llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
parent81a709503d378c188462465918df161d664c4205 (diff)
downloadbcm5719-llvm-be6c7a12cb2bf9cae7db4268f290c30ed57e6d0e.tar.gz
bcm5719-llvm-be6c7a12cb2bf9cae7db4268f290c30ed57e6d0e.zip
[GuardWidening] Fix incorrect use of remove_if
I had used `std::remove_if` under the assumption that it moves the predicate matching elements to the end, but actaully the elements remaining towards the end (after the iterator returned by `std::remove_if`) are indeterminate. Fix the bug (and make the code more straightforward) by using a temporary SmallVector, and add a test case demonstrating the issue. llvm-svn: 270306
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud