Disable the clang/llvm optimizer for a method that triggers wrong codegen.
authorLubomir Litchev <lubol@microsoft.com>
Fri, 18 Sep 2015 17:58:12 +0000 (10:58 -0700)
committerLubomir Litchev <lubol@microsoft.com>
Fri, 18 Sep 2015 18:05:32 +0000 (11:05 -0700)
commitafc38846962c0cf68fb9c8d83388d3ecc746c58b
tree8994874174494c987289be03a20315d8ae48656e
parent1e8887bdf2b575399c821bf01e09aa3655eb660b
Disable the clang/llvm optimizer for a method that triggers wrong codegen.

There is a bug in the clang-3.5 optimizer. The issue is that in release
build the optimizer is mistyping (or just wrongly decides to use 32 bit
operation for a corner case of MIN_LONG) the args of the (ltemp / lval2)
to int (it does a 32 bit div operation instead of 64 bit.)
For the case of lval1 and lval2 equal to MIN_LONG (0x8000000000000000)
this results in raising a SIGFPE.

Commit migrated from https://github.com/dotnet/coreclr/commit/93a90d45e66eefe916295f2812a3c6437b0806b3
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/gentree.cpp