Page MenuHomePhabricator

Unsafe copysign xform in DAGCombiner
Needs RevisionPublic

Authored by mcinally on Sep 9 2016, 7:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 21 2024, 1:42 AM
Unknown Object (File)
Aug 26 2024, 10:09 PM
Unknown Object (File)
Aug 9 2024, 8:34 AM
Unknown Object (File)
Jul 26 2024, 12:04 PM
Unknown Object (File)
Jul 21 2024, 10:17 AM
Unknown Object (File)
Jul 17 2024, 10:47 AM
Unknown Object (File)
Jul 13 2024, 7:46 AM
Unknown Object (File)
Jul 8 2024, 2:21 AM
Subscribers

Details

Reviewers
chad
Group Reviewers
Blessed Reviewers
Summary

Migrating from the llvm-commits thread of the same name...

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.

Test Plan

IR test case included in patch. I've inspected the new assembly to verify IEEE conformance.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

mcinally retitled this revision from to Unsafe copysign xform in DAGCombiner.
mcinally updated this object.
mcinally edited the test plan for this revision. (Show Details)
chad requested changes to this revision.Sep 9 2016, 7:50 PM
chad added a reviewer: chad.
This revision now requires changes to proceed.Sep 9 2016, 7:50 PM