[cfe-commits] r173352 - /cfe/trunk/test/SemaOpenCL/shifts.cl

Joey Gouly joey.gouly at arm.com
Thu Jan 24 07:14:22 PST 2013


Author: joey
Date: Thu Jan 24 09:14:22 2013
New Revision: 173352

URL: http://llvm.org/viewvc/llvm-project?rev=173352&view=rev
Log:

Fix an OpenCL test case that was OpenCL conformant.
It had program scope variables that were not in the constant address space,
make them to be function scope variables instead.
Also move the test to the SemaOpenCL directory.

Added:
    cfe/trunk/test/SemaOpenCL/shifts.cl
      - copied, changed from r173338, cfe/trunk/test/Sema/shiftOpenCL.cl

Copied: cfe/trunk/test/SemaOpenCL/shifts.cl (from r173338, cfe/trunk/test/Sema/shiftOpenCL.cl)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaOpenCL/shifts.cl?p2=cfe/trunk/test/SemaOpenCL/shifts.cl&p1=cfe/trunk/test/Sema/shiftOpenCL.cl&r1=173338&r2=173352&rev=173352&view=diff
==============================================================================
--- cfe/trunk/test/Sema/shiftOpenCL.cl (original)
+++ cfe/trunk/test/SemaOpenCL/shifts.cl Thu Jan 24 09:14:22 2013
@@ -1,14 +1,14 @@
-// RUN: %clang_cc1 -x cl -O1 -emit-llvm  %s -o - -triple x86_64-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -x cl -O0 -emit-llvm  %s -o - -triple x86_64-linux-gnu | FileCheck %s
 // OpenCL essentially reduces all shift amounts to the last word-size bits before evaluating.
 // Test this both for variables and constants evaluated in the front-end.
 
-//CHECK: @array0 = common global [256 x i8]
-char array0[((int)1)<<40];
-//CHECK: @array1 = common global [256 x i8]
-char array1[((int)1)<<(-24)];
-
 //CHECK: @negativeShift32
 int negativeShift32(int a,int b) {
+  //CHECK: %array0 = alloca [256 x i8]
+  char array0[((int)1)<<40];
+  //CHECK: %array1 = alloca [256 x i8]
+  char array1[((int)1)<<(-24)];
+
   //CHECK: ret i32 65536
   return ((int)1)<<(-16);
 }





More information about the cfe-commits mailing list