- -cl-fp32-correctly-rounded-divide-sqrt is already handled in a per-instruction manner to annotate the accuracy required. There's no need to add that fn-attr. So far, there's no backend handling that attr and that option is an OpenCL-specific one, which should not be inserted everywhere.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I'm okay with this change in general. One note though.
There are two aspects of this change:
- I agree that cl-fp32-correctly-rounded-divide-sqrt is OpenCL specific and nothing should not be added in other modes.
- I have concerns WRT removing the attribute in OpenCL mode. Most of the OpenCL back-ends are out-of-tree and might still rely on a function attribute. In addition to that https://reviews.llvm.org/D22940 handles division part of the requirement, but I don't know if sqrt computation will be handled correctly.
Can we split the patch into two: first to add attribute only in OpenCL language mode and second one removing function attribute in OpenCL mode as well?
In case we need to rollback the patch, I expect no issues with the first part.
Comment Actions
Split the original into 2. This is the first part, which add
correctly-rounded-device-sqrt-fp-math for OpenCL only. The second part will
remove that attribute annotating completely.