[llvm-commits] [llvm] r166049 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/X86/trunc-fp2int.ll

Eli Friedman eli.friedman at gmail.com
Wed Oct 17 16:27:21 PDT 2012


On Wed, Oct 17, 2012 at 3:36 PM, Michael Liao <michael.liao at intel.com> wrote:
> It seems to me this behavior is little hairy regarding to C standard and
> LLVM langref.
>
> For C, it defines that, when an integer is casted to a signed integer
> and the value cannot be represented in it; either the result is
> implementation-defined or an implementation-defined signed is raised.
> (ref section 6.3.1.3)

"Implementation-defined" means we define what it means, and we define
it to mean "perform the obvious truncation" on all platforms supported
by LLVM.

-Eli



More information about the llvm-commits mailing list