This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Remove extra select functions from opencl-c.h
ClosedPublic

Authored by yaxunl on Aug 2 2017, 10:22 PM.

Details

Summary

OpenCL spec v2.0 s6.13.6:

gentype select (gentype a,
gentype b,
igentype c)

gentype select (gentype a,
gentype b,
ugentype c)

igentype and ugentype must have the same number
of elements and bits as gentype.

Diff Detail

Repository
rL LLVM

Event Timeline

yaxunl created this revision.Aug 2 2017, 10:22 PM
bader accepted this revision.Aug 2 2017, 11:47 PM

Out of curiosity: how did you detect this?
Can we use the same approach for writing tests?

This revision is now accepted and ready to land.Aug 2 2017, 11:47 PM
yaxunl added a comment.Aug 3 2017, 5:05 AM

Out of curiosity: how did you detect this?
Can we use the same approach for writing tests?

Some user code generated call to a select function which we do not have in library, then Brian found that there are extra select function in opencl-c.h.

I guess that's just good luck. We still do not have a systematic approach to test opencl-c.h.

This revision was automatically updated to reflect the committed changes.