[llvm] [DirectX] Fix the writing of ConstantExpr GEPs to DXIL bitcode (PR #154446)

Finn Plummer via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 22 13:57:16 PDT 2025


================
@@ -2113,7 +2113,7 @@ void DXILBitcodeWriter::writeConstants(unsigned FirstVal, unsigned LastVal,
         }
         break;
       case Instruction::GetElementPtr: {
-        Code = bitc::CST_CODE_CE_GEP;
+        Code = bitc::CST_CODE_CE_GEP_OLD;
----------------
inbelic wrote:

In the commit comment you mention that `CST_CODE_CE_GEP = 32` but the link specifies that it is `12`.

edit: Oh wait I am dumb, the link is to `DXC`s implementation

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


More information about the llvm-commits mailing list