[OpenCL] Add pure attribute to vload builtins
authorStuart Brady <stuart.brady@arm.com>
Thu, 16 Dec 2021 18:30:58 +0000 (18:30 +0000)
committerStuart Brady <stuart.brady@arm.com>
Thu, 16 Dec 2021 18:30:58 +0000 (18:30 +0000)
commitceb80557e523f1894799ebadd5d985e11ee80461
tree1f6b1d1e9f014ecddad8f1669979ee26908073bc
parentda816ca0cb3b1367fe90b3e6fb73439c93ed80df
[OpenCL] Add pure attribute to vload builtins

Use the "pure" attribute (or "readonly") for the vload, vload_half and
vloada_half builtins.

Includes test changes to SemaOpenCL/fdeclare-opencl-builtins.cl to avoid
triggering unused-result warnings.

Reviewed By: svenvh

Differential Revision: https://reviews.llvm.org/D110742
clang/lib/Headers/opencl-c.h
clang/lib/Sema/OpenCLBuiltins.td
clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl