[PATCH] D19178: Broaden FoldItoFPtoI to try and establish whether the integer value fits into the float type

Carlos Liam via llvm-commits llvm-commits at lists.llvm.org
Thu May 5 11:08:54 PDT 2016


aarzee added a comment.

I've attached a file containing the latest version of the full proposed patch as well as a Python 3 script to test and verify whether the optimization is applied correctly. It requires a bit of editing, as shown in the top and bottom of the script. It's supposed to write any failed generated IR to exN.ll (where N is some number), but I'm not sure whether it actually does. Python's multiprocessing module is finicky. Note that you must use a floating point type that is supported by the platform you're on (I tried 'half' on x86-64 and got weird results because it was legalized to a float).

F1891037: patch3.txt <http://reviews.llvm.org/F1891037>

F1891038: floattestgen.py <http://reviews.llvm.org/F1891038>


http://reviews.llvm.org/D19178





More information about the llvm-commits mailing list