r350645 - Fix opencl test broken on windows by r350643.

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 8 11:10:43 PST 2019


Author: erichkeane
Date: Tue Jan  8 11:10:43 2019
New Revision: 350645

URL: http://llvm.org/viewvc/llvm-project?rev=350645&view=rev
Log:
Fix opencl test broken on windows by r350643.

Windows doesn't allow common with alignment >32 bits, so these tests
were broken in windows mode.  This patch makes 'common' optional in
these cases.

Change-Id: I4d5fdd07ecdafc3570ef9b09cd816c2e5e4ed15e

Modified:
    cfe/trunk/test/CodeGenOpenCL/address-spaces.cl

Modified: cfe/trunk/test/CodeGenOpenCL/address-spaces.cl
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenOpenCL/address-spaces.cl?rev=350645&r1=350644&r2=350645&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenOpenCL/address-spaces.cl (original)
+++ cfe/trunk/test/CodeGenOpenCL/address-spaces.cl Tue Jan  8 11:10:43 2019
@@ -19,7 +19,7 @@ struct S {
 // CL20-DAG: @g_static_var = internal addrspace(1) global float 0.000000e+00
 
 #ifdef CL20
-// CL20-DAG: @g_s = common {{(dso_local )?}}addrspace(1) global %struct.S zeroinitializer
+// CL20-DAG: @g_s = {{(common )?}}{{(dso_local )?}}addrspace(1) global %struct.S zeroinitializer
 struct S g_s;
 #endif
 
@@ -55,7 +55,7 @@ void fc(constant int *arg) {}
 int i;
 // CL20-DAG: @i = common {{(dso_local )?}}addrspace(1) global i32 0
 int *ptr;
-// CL20SPIR-DAG: @ptr = common {{(dso_local )?}}addrspace(1) global i32 addrspace(4)* null
+// CL20SPIR-DAG: @ptr = {{(common )?}}{{(dso_local )?}}addrspace(1) global i32 addrspace(4)* null
 // CL20AMDGCN-DAG: @ptr = common {{(dso_local )?}}addrspace(1) global i32* null
 #endif
 




More information about the cfe-commits mailing list