[clang] b0ddbfb - [clang][SPIR-V] Set AS for the SPIR-V logical triple (#88939)

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 16 12:09:36 PDT 2024


Author: Justin Bogner
Date: 2024-04-16T12:09:32-07:00
New Revision: b0ddbfb77d15e00e08fc36f6ccd8a4fecde465d1

URL: https://github.com/llvm/llvm-project/commit/b0ddbfb77d15e00e08fc36f6ccd8a4fecde465d1
DIFF: https://github.com/llvm/llvm-project/commit/b0ddbfb77d15e00e08fc36f6ccd8a4fecde465d1.diff

LOG: [clang][SPIR-V] Set AS for the SPIR-V logical triple (#88939)

This was missed in #88455, causing most of the .hlsl to SPIR-V tests to
fail (such as clang\test\Driver\hlsl-lang-targets-spirv.hlsl)

Added: 
    

Modified: 
    clang/lib/Basic/Targets/SPIR.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/Basic/Targets/SPIR.h b/clang/lib/Basic/Targets/SPIR.h
index 9a4a8b501460b6..44265445ff004b 100644
--- a/clang/lib/Basic/Targets/SPIR.h
+++ b/clang/lib/Basic/Targets/SPIR.h
@@ -315,7 +315,7 @@ class LLVM_LIBRARY_VISIBILITY SPIRVTargetInfo : public BaseSPIRVTargetInfo {
     // SPIR-V IDs are represented with a single 32-bit word.
     SizeType = TargetInfo::UnsignedInt;
     resetDataLayout("e-i64:64-v16:16-v24:32-v32:32-v48:64-"
-                    "v96:128-v192:256-v256:256-v512:512-v1024:1024");
+                    "v96:128-v192:256-v256:256-v512:512-v1024:1024-G1");
   }
 
   void getTargetDefines(const LangOptions &Opts,


        


More information about the cfe-commits mailing list