diff options
author | JF Bastien <jfbastien@apple.com> | 2018-07-13 20:33:23 +0000 |
---|---|---|
committer | JF Bastien <jfbastien@apple.com> | 2018-07-13 20:33:23 +0000 |
commit | 9aab85a6a07f35a33fb703f40e3e87aca1a08735 (patch) | |
tree | a64e8e597b093f23e815007e2a4855b0f8eac47a /clang/test/CodeGenOpenCL/partial_initializer.cl | |
parent | 2f7de23bea6324fe366d5e5d2676a8a1f981013a (diff) | |
download | bcm5719-llvm-9aab85a6a07f35a33fb703f40e3e87aca1a08735.tar.gz bcm5719-llvm-9aab85a6a07f35a33fb703f40e3e87aca1a08735.zip |
CodeGen: specify alignment + inbounds for automatic variable initialization
Summary: Automatic variable initialization was generating default-aligned stores (which are deprecated) instead of using the known alignment from the alloca. Further, they didn't specify inbounds.
Subscribers: dexonsmith, cfe-commits
Differential Revision: https://reviews.llvm.org/D49209
llvm-svn: 337041
Diffstat (limited to 'clang/test/CodeGenOpenCL/partial_initializer.cl')
-rw-r--r-- | clang/test/CodeGenOpenCL/partial_initializer.cl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/test/CodeGenOpenCL/partial_initializer.cl b/clang/test/CodeGenOpenCL/partial_initializer.cl index cdc469f7d60..ee6be919a7f 100644 --- a/clang/test/CodeGenOpenCL/partial_initializer.cl +++ b/clang/test/CodeGenOpenCL/partial_initializer.cl @@ -38,11 +38,11 @@ void f(void) { // CHECK: %[[v0:.*]] = bitcast [6 x [6 x float]]* %A to i8* // CHECK: call void @llvm.memset.p0i8.i32(i8* align 4 %[[v0]], i8 0, i32 144, i1 false) // CHECK: %[[v1:.*]] = bitcast i8* %[[v0]] to [6 x [6 x float]]* - // CHECK: %[[v2:.*]] = getelementptr [6 x [6 x float]], [6 x [6 x float]]* %[[v1]], i32 0, i32 0 - // CHECK: %[[v3:.*]] = getelementptr [6 x float], [6 x float]* %[[v2]], i32 0, i32 0 - // CHECK: store float 1.000000e+00, float* %[[v3]] - // CHECK: %[[v4:.*]] = getelementptr [6 x float], [6 x float]* %[[v2]], i32 0, i32 1 - // CHECK: store float 2.000000e+00, float* %[[v4]] + // CHECK: %[[v2:.*]] = getelementptr inbounds [6 x [6 x float]], [6 x [6 x float]]* %[[v1]], i32 0, i32 0 + // CHECK: %[[v3:.*]] = getelementptr inbounds [6 x float], [6 x float]* %[[v2]], i32 0, i32 0 + // CHECK: store float 1.000000e+00, float* %[[v3]], align 4 + // CHECK: %[[v4:.*]] = getelementptr inbounds [6 x float], [6 x float]* %[[v2]], i32 0, i32 1 + // CHECK: store float 2.000000e+00, float* %[[v4]], align 4 float A[6][6] = {1.0f, 2.0f}; // CHECK: %[[v5:.*]] = bitcast %struct.StrucTy* %S to i8* |