From 042e0883cbcd35641d60fd2d22105ac5c6a402f8 Mon Sep 17 00:00:00 2001 From: David Tweed Date: Mon, 7 Jan 2013 16:43:27 +0000 Subject: Scalar shifts in the OpenCL specification (as of v. 1.2) are defined to be with respect to the lower "left-hand-side bitwidth" bits, even when negative); see OpenCL spec 6.3j. This patch both implements this behaviour in the code generator and "constant folding" bits of Sema, and also prevents tests to detect undefinedness in terms of the weaker C99 or C++ specifications from being applied. llvm-svn: 171755 --- clang/test/CodeGen/catch-undef-behavior.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/test/CodeGen/catch-undef-behavior.c') diff --git a/clang/test/CodeGen/catch-undef-behavior.c b/clang/test/CodeGen/catch-undef-behavior.c index d0b6d1969bd..9170666d31a 100644 --- a/clang/test/CodeGen/catch-undef-behavior.c +++ b/clang/test/CodeGen/catch-undef-behavior.c @@ -99,7 +99,7 @@ int lsh_overflow(int a, int b) { // CHECK: @rsh_inbounds int rsh_inbounds(int a, int b) { - // CHECK: %[[INBOUNDS:.*]] = icmp ult i32 %[[RHS:.*]], 32 + // CHECK: %[[INBOUNDS:.*]] = icmp ule i32 %[[RHS:.*]], 31 // CHECK: br i1 %[[INBOUNDS]] // CHECK: %[[ARG1:.*]] = zext -- cgit v1.2.3