[clang] [Clang][HLSL] Start emitting structured GEP instruction (PR #177332)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 11 10:48:46 PST 2026
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>,
Nathan =?utf-8?q?Gauër?= <brioche at google.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/177332 at github.com>
================
@@ -4498,6 +4498,9 @@ Address CodeGenFunction::EmitArrayToPointerDecay(const Expr *E,
if (!E->getType()->isVariableArrayType()) {
assert(isa<llvm::ArrayType>(Addr.getElementType()) &&
"Expected pointer to array");
+
+ if (getLangOpts().HLSL && getLangOpts().EmitStructuredGEP)
+ return Addr;
----------------
efriedma-quic wrote:
Please add a comment to the code explaining this... but I guess it's fine for now.
https://github.com/llvm/llvm-project/pull/177332
More information about the cfe-commits
mailing list