[PATCH][X86] Unsafe copysign xform in DAGCombiner

Cameron McInally via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 9 09:25:09 PDT 2016


Hey guys,

There's a copysign xform in the DAGCombiner that replaces safe FP code
with unsafe code. Attached is a patch to guard this xform.

The issue here (see test case) is the first copysign is removed before
the cvt is performed. If the input to the cvt is unordered, it will
raise an exception. The purpose of the first copysign is to create a
safe value (i.e. 1.0 or -1.0) to feed the cvt.

Also, I'm not the most versed in FileCheck. I'd appreciate any
critiques on the test case I've added.

Thanks,
Cam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: copysign.patch
Type: application/octet-stream
Size: 1361 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160909/617fbb11/attachment.obj>


More information about the llvm-commits mailing list