[PATCH] D92256: [VE] Specify vector alignments
Kazushi Marukawa via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 30 05:09:45 PST 2020
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG33eac0f2830e: [VE] Specify vector alignments (authored by kaz7).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92256/new/
https://reviews.llvm.org/D92256
Files:
clang/lib/Basic/Targets/VE.h
clang/test/CodeGen/target-data.c
llvm/lib/Target/VE/VETargetMachine.cpp
Index: llvm/lib/Target/VE/VETargetMachine.cpp
===================================================================
--- llvm/lib/Target/VE/VETargetMachine.cpp
+++ llvm/lib/Target/VE/VETargetMachine.cpp
@@ -44,6 +44,19 @@
// Stack alignment is 128 bits
Ret += "-S128";
+ // Vector alignments are 64 bits
+ // Need to define all of them. Otherwise, each alignment becomes
+ // the size of each data by default.
+ Ret += "-v64:64:64"; // for v2f32
+ Ret += "-v128:64:64";
+ Ret += "-v256:64:64";
+ Ret += "-v512:64:64";
+ Ret += "-v1024:64:64";
+ Ret += "-v2048:64:64";
+ Ret += "-v4096:64:64";
+ Ret += "-v8192:64:64";
+ Ret += "-v16384:64:64"; // for v256f64
+
return Ret;
}
Index: clang/test/CodeGen/target-data.c
===================================================================
--- clang/test/CodeGen/target-data.c
+++ clang/test/CodeGen/target-data.c
@@ -281,4 +281,4 @@
// RUN: %clang_cc1 -triple ve -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=VE
-// VE: target datalayout = "e-m:e-i64:64-n32:64-S128"
+// VE: target datalayout = "e-m:e-i64:64-n32:64-S128-v64:64:64-v128:64:64-v256:64:64-v512:64:64-v1024:64:64-v2048:64:64-v4096:64:64-v8192:64:64-v16384:64:64"
Index: clang/lib/Basic/Targets/VE.h
===================================================================
--- clang/lib/Basic/Targets/VE.h
+++ clang/lib/Basic/Targets/VE.h
@@ -45,7 +45,9 @@
WCharType = UnsignedInt;
WIntType = UnsignedInt;
UseZeroLengthBitfieldAlignment = true;
- resetDataLayout("e-m:e-i64:64-n32:64-S128");
+ resetDataLayout(
+ "e-m:e-i64:64-n32:64-S128-v64:64:64-v128:64:64-v256:64:64-v512:64:64-"
+ "v1024:64:64-v2048:64:64-v4096:64:64-v8192:64:64-v16384:64:64");
}
void getTargetDefines(const LangOptions &Opts,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92256.308329.patch
Type: text/x-patch
Size: 1784 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201130/f33477c9/attachment-0001.bin>
More information about the cfe-commits
mailing list