This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Accept logical NOT for pointer types in CL1.1
ClosedPublic

Authored by Anastasia on Jan 23 2017, 9:49 AM.

Details

Reviewers
arsenm
Summary

A bug is reported regarding incorrect error given for logical NOT operation with a pointer type:
https://llvm.org/bugs/show_bug.cgi?id=30217

Detailed investigation shows that this has only been a problem for CL earlier than v1.2.

This patch fixes the issue as well as improves and simplifies related tests (by refactoring common bits).

Diff Detail

Event Timeline

Anastasia created this revision.Jan 23 2017, 9:49 AM
Anastasia updated this revision to Diff 85418.Jan 23 2017, 9:52 AM

Added missing test!

Anastasia edited the summary of this revision. (Show Details)Jan 23 2017, 9:53 AM
arsenm added a subscriber: arsenm.Jan 23 2017, 11:16 AM
arsenm added inline comments.
test/SemaOpenCL/logical-ops.cl
2–4

Should this have a 2.0 run line for good measure?

2–4

1.0 too I suppose

Anastasia updated this revision to Diff 85878.Jan 26 2017, 3:11 AM
Anastasia edited reviewers, added: arsenm; removed: pekka.jaaskelainen.
Anastasia removed a subscriber: arsenm.

Added other CL versions to testing (from comment by Matt)!

Anastasia marked 2 inline comments as done.Jan 26 2017, 3:11 AM
Anastasia added inline comments.
test/SemaOpenCL/logical-ops.cl
2–4

Sure!

Anastasia updated this revision to Diff 85890.Jan 26 2017, 5:16 AM
Anastasia marked an inline comment as done.
Anastasia retitled this revision from [OpenCL] Accept logical NOT for pointer types in CL1.0 and CL1.1 to [OpenCL] Accept logical NOT for pointer types in CL1.1.
Anastasia added inline comments.
test/SemaOpenCL/logical-ops.cl
2–4

Apparently CL1.0 is not supported! I missed that....

@arsenm, do you think you could complete the review?

arsenm accepted this revision.Feb 3 2017, 12:26 PM

LGTM

test/SemaOpenCL/logical-ops.cl
2–4

That sounds like a bug?

This revision is now accepted and ready to land.Feb 3 2017, 12:26 PM
Anastasia added inline comments.Feb 7 2017, 6:02 AM
test/SemaOpenCL/logical-ops.cl
2–4

Yeah, I can't see why it is this way. Probably nobody ever had 1.0 in their release...

Anastasia closed this revision.Feb 7 2017, 8:25 AM

Committed in r294313

test/SemaOpenCL/invalid-logical-ops-1.1.cl