forked from OSchip/llvm-project
Fix error in rep_clz on non-LP64 targets. Patch by Christoph Gerum
llvm-svn: 109416
This commit is contained in:
parent
2810bacafb
commit
8770d3d367
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue