[clang] [llvm] [DirectX] Add 32- and 64-bit 3-element vectors to DataLayout (PR #160955)

Chris B via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 7 13:30:23 PDT 2025


================
@@ -64,8 +64,11 @@ class LLVM_LIBRARY_VISIBILITY DirectXTargetInfo : public TargetInfo {
     NoAsmVariants = true;
     PlatformMinVersion = Triple.getOSVersion();
     PlatformName = llvm::Triple::getOSTypeName(Triple.getOS());
+    // TODO: We need to align vectors on the element size generally, but for now
+    // we hard code this for 3-element 32- and 64-bit vectors as a workaround.
+    // See https://github.com/llvm/llvm-project/issues/123968
     resetDataLayout("e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:"
-                    "32-f64:64-n8:16:32:64");
+                    "32-f64:64-n8:16:32:64-v48:16:16-v96:32:32-v192:64:64");
----------------
llvm-beanz wrote:

My one concern is that we likely need to change this back to the original value before running into the DXIL bitcode writer.

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


More information about the llvm-commits mailing list