Fix error in rep_clz on non-LP64 targets. Patch by Christoph Gerum

llvm-svn: 109416
This commit is contained in:
Stephen Canon 2010-07-26 18:17:00 +00:00
parent 2810bacafb
commit 8770d3d367
1 changed files with 2 additions and 2 deletions

View File

@ -57,9 +57,9 @@ static inline int rep_clz(rep_t a) {
return __builtin_clzl(a);
#else
if (a & REP_C(0xffffffff00000000))
return 32 + __builtin_clz(a >> 32);
return __builtin_clz(a >> 32);
else
return __builtin_clz(a & REP_C(0xffffffff));
return 32 + __builtin_clz(a & REP_C(0xffffffff));
#endif
}