-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPV-IR to OCL] Fix mutated builtin call attribute copying
When SPIRVToOCL20Pass translates following SPV IR ``` %call = tail call spir_func noundef ptr @_Z42__spirv_GenericCastToPtrExplicit_ToPrivatePvi(ptr addrspace(4) noundef %Ptr, i32 noundef 0) declare spir_func ptr @_Z42__spirv_GenericCastToPtrExplicit_ToPrivatePvi(ptr addrspace(4), i32) ``` to OCL IR: ``` %call = tail call spir_func noundef ptr @__to_private(ptr addrspace(4) noundef %Ptr) declare spir_func ptr @__to_private(ptr addrspace(4)) ``` , there is error `Attribute after last parameter` at copying attribute to the new call because the old call has an additional AttributeSet for the last argument. The last argument is eliminated. Set tail call for new call if old call is tail call. Revert cafd7e0. Test isn't added since I can only reproduce using SPIRVToOCL20Pass.
- Loading branch information
Showing
2 changed files
with
22 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters