[PATCH] D59500: [ConstantFolding] Fix GetConstantFoldFPValue to avoid cast overflow.
Bixia Zheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 19 13:38:27 PDT 2019
bixia added a comment.
The problem is only reported by ubsan (undefined behavior sanitizer). My test case produces a value of 1.27e+80, which is a value between max(float) and max(double). Without ubsan, llvm opt (compiled with clang for x86) produces the correct result silently. However, since (float)the-double-value has undefined behavior by c++ language, there is no guarantee that the llvm opt produced by any compiler for any platform produces the same result. Do you have suggestion on what is a better test case?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59500/new/
https://reviews.llvm.org/D59500
More information about the llvm-commits
mailing list