From 3e86dfe480d6431e94ec7fb9e4558d5f381da364 Mon Sep 17 00:00:00 2001 From: Evghenii Date: Sat, 25 Jan 2014 17:09:11 +0100 Subject: [PATCH] fix for __any --- builtins/target-nvptx.ll | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/builtins/target-nvptx.ll b/builtins/target-nvptx.ll index 4d485a04..dbfedc0d 100644 --- a/builtins/target-nvptx.ll +++ b/builtins/target-nvptx.ll @@ -784,8 +784,9 @@ define i1 @__any(<1 x i1>) nounwind readnone alwaysinline { define i1 @__all(<1 x i1>) nounwind readnone alwaysinline { %v = extractelement <1 x i1> %0, i32 0 - %res = call i32 @__ballot_nvptx(i1 %v) - %cmp = icmp eq i32 %res, 31 + %res0 = call i32 @__ballot_nvptx(i1 %v) + %res1 = call i32 @__ballot_nvptx(i1 true) + %cmp = icmp eq i32 %res0, %res1 ret i1 %cmp }