This is an archive of the discontinued LLVM Phabricator instance.

[NVPTX] add support for initializing fp16 arrays.
ClosedPublic

Authored by tra on Apr 6 2018, 2:33 PM.

Details

Summary

Previously HalfTy was not handled which would either trigger an assertion,
or result in array initialized with garbage.

Event Timeline

tra created this revision.Apr 6 2018, 2:33 PM
jlebar accepted this revision.Apr 6 2018, 2:55 PM
jlebar added inline comments.
llvm/test/CodeGen/NVPTX/half.ll
6

Should we also test a [N x half] array, in addition to this nested array?

This revision is now accepted and ready to land.Apr 6 2018, 2:55 PM
tra updated this revision to Diff 141434.Apr 6 2018, 3:00 PM

Simplified the test case.

llvm/test/CodeGen/NVPTX/half.ll
6

Being nested is incidental -- I've just copy/pasted it from the test case that triggered the problem.
I've simplified the test to use a 1D array.

bixia accepted this revision.Apr 6 2018, 3:19 PM
This revision was automatically updated to reflect the committed changes.