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)
Thu, Apr 11, 10:45 AM
Unknown Object (File)
Tue, Mar 26, 6:28 PM
Unknown Object (File)
Tue, Mar 26, 5:46 PM
Unknown Object (File)
Tue, Mar 26, 4:16 PM
Unknown Object (File)
Thu, Mar 21, 3:34 AM
Unknown Object (File)
Tue, Mar 19, 9:09 PM
Unknown Object (File)
Feb 8 2024, 5:36 PM
Unknown Object (File)
Dec 22 2023, 2:42 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