[SimplifyCFG] Make range reduction code deterministic.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 5 Aug 2016 14:55:02 +0000 (14:55 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 5 Aug 2016 14:55:02 +0000 (14:55 +0000)
commitaa160c22f73df256b157516f381a86eb23cd568c
treeeb27bbb46008cbb0b0f5cb1c5d5217c465b6f066
parent5a9b9f98c0918bb2a5efdf621ef4552bff3ff463
[SimplifyCFG] Make range reduction code deterministic.

This generated IR based on the order of evaluation, which is different
between GCC and Clang. With that in mind you get bootstrap miscompares
if you compare a Clang built with GCC-built Clang vs. Clang built with
Clang-built Clang. Diagnosing that made my head hurt.

This also reverts commit r277337, which "fixed" the test case.

llvm-svn: 277820
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/SimplifyCFG/rangereduce.ll