Don't use floating point to do an integer's job.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 26 Oct 2011 01:47:48 +0000 (01:47 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 26 Oct 2011 01:47:48 +0000 (01:47 +0000)
commit794439183a29102c784484720c3d0b1960b297e6
tree0b31802fe6b2d5688f68527116c9758fc335ee49
parent73b5bb38650a1a1441fcf210c79f188d08990946
Don't use floating point to do an integer's job.

This code makes different decisions when compiled into x87 instructions
because of different rounding behavior.  That caused phase 2/3
miscompares on 32-bit Linux when the phase 1 compiler was built with gcc
(using x87), and the phase 2 compiler was built with clang (using SSE).

This fixes PR11200.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143006 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp