[PATCH] D152798: [AMDGPU][ValueTracking] Handle amdgcn intrinsics that cannot create poison

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 13 04:12:43 PDT 2023


nikic added a comment.

In D152798#4416957 <https://reviews.llvm.org/D152798#4416957>, @arsenm wrote:

> The nice thing to do would be to route this through a TTI hook.

This would be a pretty big annoyance, because ValueTracking is used everywhere, and this would require adding a TTI dependency to pretty much all passes. The practical outcome would probably be that most callers just wouldn't pass TTI. As such,  prefer the approach in this patch.

> Also I would argue that no target intrinsics can produce poison. Arithmetic poison ultimately exists because of the desire to tolerate different edge case handling on different targets, but target instructions should be well defined

Just to give an obvious counter-example: Load-like intrinsics tend to produce poison (because there might be poison in memory).


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