[PATCH] D152798: [AMDGPU][ValueTracking] Handle amdgcn intrinsics that cannot create poison
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 13 07:55:26 PDT 2023
nhaehnle added a comment.
My 2 cents:
For the interp intrinsic even the underlying memory is sort of known to never contain poison. I mean, the data ultimately comes from an export out of a vertex shader, and *that* data could be poison, but there's a lot of fixed function hardware machinery in-between and we can always pretend that this machinery has a "freeze" somewhere.
I'm less comfortable about saying that `readlane` cannot create poison. Reading from an out-of-range lane is basically like reading from an arbitrary uninitialized register, which is basically the ur-version of poison. I'm not sure that it matters, but it *may* matter via fun facts like: `readlane` is `memory(none)`, but if you duplicate it you may get different results from the duplicates. Even `readfirstlane` is "interesting": the only way for `readfirstlane` to return poison is if the input is poison; however it is sufficient for the input *in a different thread* to be poison. There may be dragons there.
Apart from that, I'm generally in favor of this change.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152798/new/
https://reviews.llvm.org/D152798
More information about the llvm-commits
mailing list