summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGStmtOpenMP.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-07-02 03:40:19 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-07-02 03:40:19 +0000
commit00396513046275f17c0e321bd8a5cc27080a3fa2 (patch)
tree886e885438bf58b01a29223292f21c349571ae76 /clang/lib/CodeGen/CGStmtOpenMP.cpp
parent85225b0a367a488df4920caf3d11c6b04754891b (diff)
downloadbcm5719-llvm-00396513046275f17c0e321bd8a5cc27080a3fa2.tar.gz
bcm5719-llvm-00396513046275f17c0e321bd8a5cc27080a3fa2.zip
[OPENMP] Introduced type trait "__builtin_omp_required_simd_align" for default simd alignment.
Adds type trait "__builtin_omp_required_simd_align" after discussions here http://reviews.llvm.org/D9894 Differential Revision: http://reviews.llvm.org/D10597 llvm-svn: 241237
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r--clang/lib/CodeGen/CGStmtOpenMP.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index 8b4902fac05..8666b464984 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -649,8 +649,10 @@ static void emitAlignedClause(CodeGenFunction &CGF,
// If no optional parameter is specified, implementation-defined default
// alignments for SIMD instructions on the target platforms are assumed.
Alignment =
- CGF.CGM.getTargetCodeGenInfo().getOpenMPSimdDefaultAlignment(
- E->getType());
+ CGF.getContext()
+ .toCharUnitsFromBits(CGF.getContext().getOpenMPDefaultSimdAlign(
+ E->getType()->getPointeeType()))
+ .getQuantity();
}
assert((Alignment == 0 || llvm::isPowerOf2_32(Alignment)) &&
"alignment is not power of 2");
OpenPOWER on IntegriCloud