This is a small patch to fix std::equal() wrong usage.
Firstly find this issue in function visitSelect() of file SelectionDAGBuilder.cpp:
// Min/max matching is only viable if all output VTs are the same. if (std::equal(ValueVTs.begin(), ValueVTs.end(), ValueVTs.begin())) {
This is obviously wrong. "std::equal(ValueVTs.begin(), ValueVTs.end(), ValueVTs.begin())" is always true.
Then I go through all llvm codes, find another two wrong places.
Since this is a very obviously mistake and related to c++ language not to compiler area, I do not add some cases for this. Hope it is ok.