This is an archive of the discontinued LLVM Phabricator instance.

A module pass "PromoteHalf"
Needs ReviewPublic

Authored by shawfly on Aug 15 2014, 3:10 AM.

Details

Reviewers
joe.abbey
srhines
Summary

When Opts.NativeHalfType is set to 1, Clang will generate IR for half float. Currently, most CPUs don't support fp16 register, fp16 should be promoted to fp32 for computation, then store back the result to fp16.

This is a module pass to transform operations on fp16 to operations on fp32; different back-end could add this pass as needed.

Diff Detail

Event Timeline

shawfly updated this revision to Diff 12546.Aug 15 2014, 3:10 AM
shawfly retitled this revision from to A module pass "PromoteHalf".
shawfly updated this object.
shawfly edited the test plan for this revision. (Show Details)
shawfly updated this object.Aug 15 2014, 3:15 AM
shawfly added reviewers: joe.abbey, srhines.
shawfly added a project: deleted.
shawfly added a subscriber: Unknown Object (MLST).