summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/catch-undef-behavior.c
diff options
context:
space:
mode:
authorDavid Tweed <david.tweed@arm.com>2013-01-07 16:43:27 +0000
committerDavid Tweed <david.tweed@arm.com>2013-01-07 16:43:27 +0000
commit042e0883cbcd35641d60fd2d22105ac5c6a402f8 (patch)
tree6fc623b2575c7a12ceb41f7aa7f6fe8be5e72a45 /clang/test/CodeGen/catch-undef-behavior.c
parentd5650bdc1a4bcd4806631781a33ff10e87da33b5 (diff)
downloadbcm5719-llvm-042e0883cbcd35641d60fd2d22105ac5c6a402f8.tar.gz
bcm5719-llvm-042e0883cbcd35641d60fd2d22105ac5c6a402f8.zip
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
Diffstat (limited to 'clang/test/CodeGen/catch-undef-behavior.c')
-rw-r--r--clang/test/CodeGen/catch-undef-behavior.c2
1 files changed, 1 insertions, 1 deletions
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
OpenPOWER on IntegriCloud