[llvm] [DirectX][ResourceAccess] Legalize resource handles into unique global resources (PR #176797)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 10 10:15:52 PST 2026


bogner wrote:

This change is doing two somewhat unrelated things - dealing with `select` of resource handles, and trying to do GVN on resource handle pointers. Can we separate the one issue from the other, or do they both need to be handled in this change?

In particular, I'm a bit uncomfortable with the hoops we're going through to undo GVN and instcombine here - I'd rather we try to avoid unhelpful transformations in the first place. For example, in your examples in https://godbolt.org/z/bhhqde77c cases F and G seem to be avoided by simply marking `dx.resource.getpointer` convergent.

https://github.com/llvm/llvm-project/pull/176797


More information about the llvm-commits mailing list