| commit | 28c5a2c46d810b70040b711afbb2532374a5b67d | [log] [tgz] |
|---|---|---|
| author | Farzon Lotfi <farzonlotfi@microsoft.com> | Fri Oct 10 15:38:24 2025 -0400 |
| committer | GitHub <noreply@github.com> | Fri Oct 10 15:38:24 2025 -0400 |
| tree | 3563aefae6727844770b93b6d6d105b5523770a0 | |
| parent | bd3ddcf7e16af3358f4f2ef17079b3fcc41d41c4 [diff] |
[Clang][HLSL][GVN] Prevent phi codgen of isTokenLike types (#162363) fixes #161754 When the GVN pass calls `PerformLoadPRE` or `processNonLocalLoad` it can invoke the `SSAUpdater` which adds a phi node for our tokenLike type. If we check for if the load is on a token like type at the `processLoad` we can cover both cases. This is because if we don't GVN will use the SSAUpdater to insert a phi node to reduce duplicate resource.getpointer calls. Because in an earlier commit: https://github.com/llvm/llvm-project/commit/01c0a8409a21344c822deba9467bd9d547f6e5d8 we made the verifier error with `PHI nodes cannot have token type!` This test case will fail today if we try to perform this load optimization https://godbolt.org/z/xM69fY8zM This will impact clang aswell because `isTokenLikeTy` also checks for `isTokenTy` Clang is likely also failing validation with token types but just doesn't have a test case because the validator would error if it were in a phi node.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.