[PATCH] D123693: Transform illegal intrinsics to V_ILLEGAL
Leon Clark via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 02:15:39 PDT 2022
Leonc added a comment.
In D123693#3580962 <https://reviews.llvm.org/D123693#3580962>, @foad wrote:
> In D123693#3580924 <https://reviews.llvm.org/D123693#3580924>, @Leonc wrote:
>
>> In D123693#3580902 <https://reviews.llvm.org/D123693#3580902>, @foad wrote:
>>
>>>> The issue is our libraries contain code for all targets. We rely on dead code elimination to remove illegal intrinsics, but that doesn't happen on -O0.
>>>
>>> Why can't you put the code for different subtargets in different functions, each with an appropriate `"target-cpu"=` attribute?
>>
>> That's what I would do. I think there's some resistance to it though, and it would probably require a lot more work.
>
> Well I am resistant to selecting intrinsics on subtargets that don't support them :)
>
> How far are you planning to go with this approach? Do you expect to extend it to all AMDGPU intrinsics?
Agreed.
My initial approach was rejected for being too specific. Discussions since then have been about finding a solution for //all// illegal intrinsic calls. That's the plan unless I hear otherwise.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123693/new/
https://reviews.llvm.org/D123693
More information about the llvm-commits
mailing list